Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatusBar is undefined #52

Open
omnoms opened this issue Jul 1, 2015 · 7 comments
Open

StatusBar is undefined #52

omnoms opened this issue Jul 1, 2015 · 7 comments

Comments

@omnoms
Copy link

omnoms commented Jul 1, 2015

I have the same issue as in #26 where StatusBar is undefined in the latest build when run on an iOS8 phone. This normally wouldn't be an issue if it wasn't for the javascript engine halting entirely. When this is encountered, any changes I do to for instance localStorage, is not available/reflected in the rest of the code running until the application is restarted. And to top it off, I'm not even calling StatusBar anywhere, so there's some initialization script that comes along that I assume does which fails because it's not available in the global scope?

So I tried with reverting to 1.0.1 as suggested in that thread, but then suddenly the width and height of the viewport was changed so that all the elements would have to get a custom set of code for iOS so that the width and heights were recalculated to much smaller percentages... at the moment the main body of the Single Page Application is set to 100% width and 100% height, but this makes elements near the right edge and/or bottom edge disappear outside of viewable area and are not reachable with scrolling.

I am using DevExpress framework and built through phonegap build directly from visual studio, so I don't have any build to share from. The ticket at devexpress is this; https://www.devexpress.com/Support/Center/Question/Details/T261533

@BohdanMaslowski
Copy link

I had exactly the same problem, solved it by switching to this plugin:
https://github.com/apache/cordova-plugin-statusbar

@andrewbusch7
Copy link

@BohdanMaslowski That fixed it for me as well, seems like PGB is deprecating the PGB-specific plugins.

@thanhtung1509
Copy link

@andrewb273 Could you share your full config.xml to fix this issue? Thank in advance.

@andrewbusch7
Copy link

@thanhtung1509 <gap:plugin name="cordova-plugin-statusbar" source="npm" />

@thanhtung1509
Copy link

Hi @andrewb273,

Thanks for your answer. Do you use Visual Studio and Dev Express to build your project? I have followed your instruction above? Unfortunately, I got the issue when I try to build Build IOS Template (pls take a look this image https://drive.google.com/file/d/0B8_tTBjgp7e5MFZoelZYVGNJX3c/view?usp=sharing).

and here is my config.xml :

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
  <preference name="android-windowSoftInputMode" value="adjustResize" />
  <preference name="fullscreen" value="false" />
  <preference name="phonegap-version" value="3.6.3" />
  <gap:plugin name="com.devexpress.plugins.devextremeaddon" version="1.0.1"/>
  <gap:plugin name="org.apache.cordova.battery-status" version="0.2.11"/>
  <gap:plugin name="org.apache.cordova.camera" version="0.3.2"/>
  <gap:plugin name="org.apache.cordova.device" version="0.2.12"/>
  <gap:plugin name="org.apache.cordova.dialogs" version="0.2.10"/>
  <gap:plugin name="org.apache.cordova.file" version="1.3.1"/>
  <gap:plugin name="org.apache.cordova.file-transfer" version="0.4.6"/>
  <gap:plugin name="org.apache.cordova.geolocation" version="0.3.10"/>
  <gap:plugin name="org.apache.cordova.inappbrowser" version="0.5.2"/>
  <gap:plugin name="org.apache.cordova.media" version="0.2.13"/>
  <gap:plugin name="org.apache.cordova.media-capture" version="0.3.3"/>
  <gap:plugin name="org.apache.cordova.network-information" version="0.2.12"/>
  <gap:plugin name="org.apache.cordova.splashscreen" version="0.3.4"/>
  <gap:plugin name="cordova-plugin-statusbar" source="npm" />
  <gap:plugin name="com.phonegap.plugins.pushplugin" version="2.4.0"/>
  <gap:plugin name="uk.co.whiteoctober.cordova.appversion" version="0.1.4"/>
  <gap:plugin name="org.wbt11a.canvas2imageplugin" version="0.7.1"/>
  <gap:plugin name="com.synconset.imagepicker" version="1.0.4"/>
  <gap:plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" version="2.1.0"/>
  <gap:plugin name="de.appplant.cordova.plugin.background-mode" version="0.6.4"/>
  <gap:plugin name="com.megster.cordova.bluetoothserial" version="0.3.3"/>
  <gap:plugin name="com.ionic.keyboard" version="1.0.3"/>
  <access origin="tel:*" launch-external="yes" />
  <access origin="geo:*" launch-external="yes" />
  <access origin="*" />
</widget>

@andrewbusch7
Copy link

@thanhtung1509 I build using build.phonegap.com, and that Status bar plugin you're referencing is very different to what I'm using, so not going to be able to help you.

@thanhtung1509
Copy link

@andrewb273 Thanks for your reply :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants