EddyVerbruggen / cordova-plugin-webviewcolor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iOS 7 color doesn't change

zolakt opened this issue · comments

I'm trying to use your plugin on a PhoneGap Build project, but I can't get it to work on iOS7.

Here is what I have done:
included this line in config.xml:

<gap:plugin name="nl.x-services.plugins.ioswebviewcolor" />

In my JS, I do this:

if (window.plugins && window.plugins.webviewcolor) {
    window.plugins.webviewcolor.change('#FFFFFF', function(){ alert('color changed') });
}

The alert displays, meaning the plugin is loaded, the change function is called, it returns success. But the select box is still black when opened.

Do you have any suggestions?

At what point do you try to change the color? Immediately after "deviceready", or later by a button? I think you need to give the webview a little time before changing the background color.

Can you confirm the plugin in this demo repo works fine on PhoneGap Build? https://github.com/EddyVerbruggen/X-Services-PhoneGap-Build-Plugins-Demo/

I'm calling it from

$(document).ready(function () {

I'll try to set a timeout and see if it works.
And try your repo later if it doesn't.

Setting the timeout works.
Thanks for the suggestion.