问题
After adding cordova-plugin-mfp
, cordova-plugin-statusbar
no longer works.
Steps to recreate:
Create a new Cordova project with statusbar plugin:
cordova create test cd test cordova platform add ios cordova plugin add --save cordova-plugin-statusbar
Add the following text to config.xml:
<feature name="StatusBar"> <param name="ios-package" value="CDVStatusBar" onload="true" /> </feature> <preference name="StatusBarStyle" value="default" />
Run the project and note the status bar text is black (default!).
Change the added line in config.xml:
<preference name="StatusBarStyle" value="blacktranslucent" />
Run the project and note the status bar text is white (hooray!).
Add the cordova-plugin-mfp plugin:
cordova plugin add --save cordova-plugin-mfp
Run the project and note the status bar text is black (boo!).
At this point, the StatusBarStyle changes have no effect at all.
回答1:
Update: Please see the following blog post which addresses this issue: https://mobilefirstplatform.ibmcloud.com/blog/2016/06/13/fixing-the-incompatibility-between-cordova-status-bar-plug-in-and-mobilefirst-foundation-8-0/
Confirmed.
We've opened a defect and this is currently scheduled to be resolved for the GA release of MFPF 8.0. Thanks for reporting!
There is currently no workaround available, but if there will be I'll be sure to update this answer.
来源:https://stackoverflow.com/questions/36961042/mobilefirst-platform-8-0-beta-breaks-cordova-plugin-statusbar