【发布时间】:2014-04-15 17:36:13
【问题描述】:
我刚刚使用 PhoneGap 构建了一个应用程序,在 iOS7 上运行。构建很顺利,安装也很好,但是有些问题我想不通。
首先,应用高度不是全尺寸 - 看起来是 c。 iOS 6 大小。如果我使用 PhoneGap Build 调试工具调用 alert(window.innerHeight);,我得到的响应是 480。
其次,应用程序没有响应任何触摸事件。同样,如果我使用调试工具,我可以将点击事件传递给应用程序,它会按预期响应,所以我知道应用程序是响应式的,但是如果我尝试在设备上执行相同的事件,则什么也不会发生。
我确信这些可能是常见问题,但我似乎无法弄清楚!相同的应用程序在 Andoird 上完美运行,这让我怀疑这是一个配置问题。作为参考,我的 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"
id = "com.xxxxxx.walkingguide"
versionCode="100"
version = "1.0.0">
<!-- versionCode is optional and Android only -->
<name>XXXXXXXXXXXX Walking Guide</name>
<description>
Find your way around our campuses, and find out more about 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 and 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>
【问题讨论】:
-
请确保您的代码在 ios 中运行时不会出现错误。您的应用程序是否有错误并且所有事件都不起作用。 PhoneGap Build 调试工具不显示错误 javascript 代码。请按单元登录测试
标签: ios cordova phonegap-build