PhoneGap文档说我可以通过config.xml设置它(三个月前这是真的)。我没有Apple机器所以我无法通过Xcode设置图标...所以请避免指导我找到需要Apple osx命令行的答案并分享一个config.xml解决方案,如果你知道的话 - 谢谢 < / p>
我在build.phonegap.com上构建我的应用程序
三个月前构建Android和Apple上的app图标都很好。
我有一个平面目录结构。我的index.html(我的主要jquery移动应用程序代码),config.xml和icon.png位于同一目录中。
有人可以告诉我哪里出错吗?我的config.xml如下所示,以供参考......(谢谢)
<!-- config.xml reference: https://build.phonegap.com/docs/config-xml -->
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.myapp.app16"
version = "16.5.11">
<preference name="permissions" value="none"/>
<!-- name, descriptiona and author tags omitted from here on purpose -->
<preference name="orientation" value="default" /> <!-- all: default means both landscape and portrait are enabled -->
<preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal -->
<preference name="fullscreen" value="true" /> <!-- all: hides the status bar at the top of the screen -->
<preference name="webviewbounce" value="true" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top -->
<preference name="prerendered-icon" value="true" /> <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen -->
<preference name="stay-in-webview" value="false" /> <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in -->
<preference name="ios-statusbarstyle" value="black-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar -->
<preference name="detect-data-types" value="true" /> <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system -->
<preference name="exit-on-suspend" value="false" /> <!-- ios: if set to true, app will terminate when home button is pressed -->
<preference name="show-splash-screen-spinner" value="true" /> <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading -->
<preference name="auto-hide-splash-screen" value="true" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API -->
<preference name="disable-cursor" value="false" /> <!-- blackberry: prevents a mouse-icon/cursor from being displayed on the app -->
<preference name="android-installLocation" value="internalOnly" /> <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. -->
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="FadeSplashScreen" value="false"/>
<plugin name="cordova-plugin-whitelist" spec="1.2.2" />
<plugin name="org.apache.cordova.device-orientation" spec="1.0.3" />
<plugin name="org.apache.cordova.geolocation" spec="2.2.0" />
<plugin name="org.apache.cordova.network-information" spec="1.2.1" />
<plugin name="org.apache.cordova.splashscreen" spec="3.2.2" />
<plugin name="org.apache.cordova.statusbar" spec="2.1.3" />
<gap:config-file platform="ios" parent="CFBundleShortVersionString">
<string>100</string>
</gap:config-file>
<access origin="*"/>
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<icon src="icon.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<icon src="icon.png" /> <!-- Default icon -->
</platform>
</widget>
答案 0 :(得分:1)
我相信你实际上需要添加苹果为每个设备使用的每个不同的图标大小。
这是我的实际config.xml,其中我有android和ios的图标。 请注意,我的文件夹上的图标位于: res / icon / ios 和 res / icon / android
<div id="box" style="display:block; width: 500px; height: 100px; margin: 0 auto; background-color:red;"></div>