ios - iOS7 and PhoneGap build - app height and touch response -
i've built app using phonegap build, running on ios7. build went fine, , install fine, there problems can't figure out.
firstly, app height isn't full size - looks c. ios 6 size. if use phonegap build debug tool call alert(window.innerheight);, response 480.
secondly, app isn't responding touch events. again, if use debug tool, can pass click events app , responds expected, know app responsive, if try perform same event on device, nothing happens.
i'm sure these common issues, can't seem figure them out! same app works on andoird, makes me suspect it's configuration issue. reference, config.xml looks like:
<?xml version="1.0" encoding="utf-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" id = "com.xxxxxx.walkingguide" versioncode="100" version = "1.0.0"> <!-- versioncode optional , android --> <name>xxxxxxxxxxxx walking guide</name> <description> find way around our campuses, , find out more our buildings. </description> <author href="http://www.axxxxxxxsign.co.uk" email="hello@xxxxxxxxx.co.uk"> xxxxx xxxxxx </author> <preference name="phonegap-version" value="3.3.0" /> <preference name="orientation" value="portrait" /> <preference name="fullscreen" value="true" /> <preference name="webviewbounce" value="false" /> <preference name="detect-data-types" value="false" /> <preference name="show-splash-screen-spinner" value="false" /> <preference name="android-installlocation" value="auto" /> <preference name="auto-hide-splash-screen" value="false" /> <preference name="splash-screen-duration" value="10000" /> <icon src="icon.png" /> <!-- iphone , ipod touch --> <gap:splash src="images/splash-ios" gap:platform="ios" width="320" height="480" /> <gap:splash src="images/splash-ios@2x.png" gap:platform="ios" width="640" height="960" /> <!-- iphone 5 / ipod touch (5th generation) --> <gap:splash src="images/splash-568h@2x.pnh" gap:platform="ios" width="640" height="1136" /> <gap:splash src="images/android-splash.9.png" gap:platform="android" /> <gap:plugin name="org.apache.cordova.geolocation" version="0.3.6" /> <gap:plugin name="org.apache.cordova.network-information" version="0.2.7" /> <gap:plugin name="org.apache.cordova.dialogs" /> <gap:plugin name="org.apache.cordova.media-capture" version="0.2.8" /> <gap:plugin name="org.apache.cordova.splashscreen" version="0.2.7" /> <access origin="*" /> </widget>
having looked further, problem related how ios 7 treats status bar.
by default, status bar sits on top of webview, , apparently means app can't interacted (not sure if happens on apps, tried both app , simple demo app , had same problems).
there phonegap plugin (also available on phonegap build) allows hide status bar - https://github.com/phonegap-build/statusbarplugin
following , setting configs
<gap:config-file platform="ios" parent="uistatusbarhidden"> <true/> </gap:config-file> <gap:config-file platform="ios" parent="uiviewcontrollerbasedstatusbarappearance"> <false/> </gap:config-file>
the status bar hidden, , appears work should.
Comments
Post a Comment