I have created an config.xml file with following preferences for app,then i build the app using phonegap build. In iOS 6 and iOS 7 icon is not showing what mentioned in config.
Here is my config code
<preference name="phonegap-version" value="2.9.0" />
<preference name="orientation" value="portrait" />
<preference name="target-device" value="ios" />
<preference name="prerendered-icon" value="true" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="false" />
<icon src="assets/img/icon/ios/icon-60.png" gap:platform="ios" width="60" height="60" />
<icon src="assets/img/icon/ios/icon-60#2x.png" gap:platform="ios" width="120" height="120" />
Can any one give me any solution for this issue.
You need to setup here using xcode.
Related
I use phonegal build but today i get this error when upload .ipa to apple store
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability
then I removed all cordova plugins in config.xml but still get some error.I researched and find monaca..In monaca configure option I choosed WKWebViewOnly but still i get some error..Here is my config.xml
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" id="com.demircode.bileteviniz" version="1.3.1">
<name>BiletEviniz</name>
<description>BiletEviniz</description>
<author/>
<content src="index.html"/>
<allow-navigation href="*"/>
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
<preference name="Orientation" value="default"/>
<preference name="loglevel" value="DEBUG"/>
<preference name="AndroidLaunchMode" value="singleTop"/>
<preference name="ErrorUrl" value=""/>
<preference name="Fullscreen" value="false"/>
<preference name="KeepRunning" value="true"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="1000"/>
<preference name="AllowInlineMediaPlayback" value="false"/>
<preference name="BackupWebStorage" value="cloud"/>
<preference name="FadeSplashScreenDuration" value="250"/>
<preference name="KeyboardDisplayRequiresUserAction" value="true"/>
<preference name="MediaPlaybackRequiresUserAction" value="false"/>
<preference name="SuppressesIncrementalRendering" value="false"/>
<preference name="TopActivityIndicator" value="gray"/>
<preference name="GapBetweenPages" value="0"/>
<preference name="PageLength" value="0"/>
<preference name="PaginationBreakingMode" value="page"/>
<preference name="PaginationMode" value="unpaginated"/>
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage"/>
</feature>
<preference name="UIWebViewDecelerationSpeed" value="normal"/>
<preference name="monaca:AndroidIsPackageNameSeparate" value="false"/>
<platform name="ios">
<preference name="orientation" value="portrait"/>
<icon src="lobbe.png"/>
<icon platform="ios" height="76" src="lobbe-76-76.png" width="76"/>
<icon platform="ios" height="120" src="lobbe-120-120.png" width="120"/>
<icon platform="ios" height="152" src="lobbe-152-152.png" width="152"/>
<icon platform="ios" height="1024" src="lobbe-1024-1024.png" width="1024"/>
<icon platform="ios" height="40" src="lobbe-40-40.png" width="40"/>
<icon platform="ios" height="167" src="lobbe-167-167.png" width="167"/>
<splash src="/res/ios/screen/Default#2x~universal~anyany.png"/>
<preference name="WKWebViewOnly" value="true"/>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine"/>
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine"/>
</feature>
<config-file platform="ios" parent="CFBundleLocalizations" target="*-Info.plist">
<array>
<string>tr</string>
<string>en</string>
</array>
</config-file>
</platform>
<preference name="WindowsStorePublisherName" value="My Name"/>
<preference name="WindowsStoreIdentityName" value="3e46a957-1e6e-2eb6-9380-b3b37c4dec02"/>
<preference name="ios-XCBuildConfiguration-TARGETED_DEVICE_FAMILY" value="1,2"/>
<preference name="AutoHideSplashScreen" value="true"/>
<preference name="FadeSplashScreen" value="true"/>
<preference name="ShowSplashScreenSpinner" value="false"/>
<access origin="bileteviniz.com"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="EnableViewportScale" value="false"/>
</widget>
and this is package.json
{
"name": "monaca-template-minimum",
"version": "2.0.7",
"displayName": "Monaca Template Minimum",
"dependencies": {
"cordova-custom-config": "5.1.0",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-whitelist": "1.3.3",
"monaca-plugin-monaca-core": "3.3.0"
},
"scripts": {
"monaca:preview": "npm run dev",
"dev": "browser-sync start -s www/ --watch --port 8080 --ui-port 8081"
},
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-splashscreen": {},
"cordova-custom-config": {},
"monaca-plugin-monaca-core": {}
}
},
"devDependencies": {
"browser-sync": "^2.26.7",
"cordova": "^9.0.0"
}
}
Your config.xml should look like this:
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
</platform>
<plugin name="cordova-plugin-wkwebview-engine"/>
<plugin name="cordova-plugin-inappbrowser"/>
It's possible that one of your other plugins calls UIWebView. You may need to try leaving suspect plugins out until the problem goes away, then see if there is an updated version of the plugin.
(The config.xml code above is from the VoltBuilder docs)
I'm developing a hybrid mobile app using PhoneGap as a build tool.
Enviroment:
Visual Studio 2015
DevExteme library
PhoneGap cli version 8.0.0
Cordova iOS version 5.0.0
Plugin added: Cordova Support Google Services and Cordova Plugin Firebase Analytics
Development certificate for iOS unlocked on my PhoneGap account
Steps:
Build a PhoneGap Zip.
Upload the code on PhoneGap account.
Build the app.
The problem: PhoneGap doesn't show iOS build, but only Android (which works perfectly on device)
What am I doing wrong?
Thank you in advance,
Sara
Edit: 2019-03-07
As requested, I add config.xml.
<widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">
<name>ApplicationTemplate</name>
<description>Template</description>
<author email="email#sample.com" href="http://sample.com">Author</author>
<preference name="permissions" value="none" />
<preference name="prerendered-icon" value="true" />
<preference name="android-windowSoftInputMode" value="adjustResize" />
<preference name="SplashScreen" value="splash" />
<preference name="SplashScreenDelay" value="60000" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="FadeSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="android-minSdkVersion" value="14" />
<preference name="android-targetSdkVersion" value="22" />
<preference name="cordova-ios" version="5.0.0" />
<preference name="phonegap-version" value="cli-8.0.0" />
<plugin name="cordova-plugin-splashscreen" onload="true" />
<plugin name="cordova-plugin-whitelist" />
<plugin name="cordova-plugin-ios-longpress-fix" />
<plugin name="cordova-plugin-statusbar" onload="true" />
<access origin="*" />
<plugin name="cordova-plugin-inappbrowser" source="npm"></plugin>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
<plugin name ="cordova-support-google-services" />
<plugin name ="cordova-plugin-firebase-analytics" />
</widget>
I'm working on an iOS (8 and 9) app. I'm using phonegap build to pack everything up and phonegap desktop along with phonegap developer app to do some tests. My UI is already designed and everything looks fine when using the phonegap developer app as well as in mobile safari, but when i port it to my device, the UI looks blurry, including font, borders, divs, even, the status bar and keyboard.
Here's the correct view, using Phonegap app and mobile safari:
Good
And Here's the actual view when installed.:
Bad quality
I have set the viewport and scales but they do not affect the status bar nor the keyboard.
Here's my XML
<preference name="phonegap-version" value="3.7.0" />
<preference name="orientation" value="default" />
<platform name="ios">
<preference name="Orientation" value="all" />
</platform>
<preference name="fullscreen" value="true" />
<preference name="target-device" value="universal" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="true" />
<preference name="ios-statusbarstyle" value="lightcontent" />
<preference name="android-windowSoftInputMode" value="adjustPan" />
<preference name="ShowSplashScreenSpinner" value="false" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="false" />
<preference name="auto-hide-splash-screen" value="false" />
<preference name="SplashScreenDelay" value="5000" />
<preference name="EnableViewportScale" value="true" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="KeyboardDisplayRequiresUserAction" value="false" />
<preference name="HideKeyboardFormAccessoryBar" value="true" />
<preference name="SuppressesIncrementalRendering" value="true" />
<preference name="android-minSdkVersion" value="18" />
<preference name="android-installLocation" value="internalOnly" />
<preference name="ErrorUrl" value="" />
<preference name="BackgroundColor" value="0x000000" />
<preference name="KeepRunning" value="true" />
<preference name="DisallowOverscroll" value="true" />
<preference name="LoadingDialog" value="" />
<preference name="LoadUrlTimeoutValue" value="20000" />
<preference name="disable-cursor" value="true" />
<gap:config-file platform="ios" parent="UIViewControllerBasedStatusBarAppearance" overwrite="true">
<false/>
</gap:config-file>
<content src="index.html" />
<gap:platform name="ios" />
<gap:platform name="android" />
I have to mention that using a newer version of CLI does not solve the issue.
Here's my meta tag
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
Phonegap desktop's example app is also showing this behaviour.
Do you have any ideas of what may be happening?
I Found the issue. It turns out that, since iOS 9, the splashscreen requirements changed. So, when the .ipa was created, there were some files missing (The splashscreen for iPhone 6 and 6+).
Adding the next xml code to my config.xml
<gap:splash src="Splash/Default-667h#2x.png" gap:platform="ios" width="750" height="1334" />
<gap:splash src="Splash/Default-Portrait-736h#3x.png" gap:platform="ios" width="1242" height="2208" />
<gap:splash src="Splash/Default-Landscape-736h#3x.png" gap:platform="ios" width="2208" height="1242" />
and the corresponding files made the trick.
Now the view seems really sharp.
Hope this helps someone.
I'm trying to make this config work with PhoneGap build server:
<gap:plugin name="com.phonegap.plugin.statusbar" version="1.1.0" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#7fbfd3" />
<preference name="StatusBarStyle" value="lightcontent" />
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true" />
</feature>
It works fine when I use cordova build but no luck with PhoneGap build server for now. Plugin is vailable from JS, color is applied but there is no additional space for status bar. I've tried both org.apache.cordova.statusbar and com.phonegap.plugin.statusbar. Any ideas how to make it work with PhoneGap build server?
Here is rest of installed plugins and preferences set
<preference name="permissions" value="none" />
<preference name="phonegap-version" value="3.7.0" />
<preference name="orientation" value="portrait" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="false" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="19" />
<preference name="deployment-target" value="7.0" />
<preference name="android-installLocation" value="auto" />
<preference name="webviewbounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<gap:plugin name="org.apache.cordova.console" />
<gap:plugin name="org.apache.cordova.inappbrowser" />
<gap:plugin name="com.ququplay.websocket.websocket" version="0.1.0" />
<gap:plugin name="org.apache.cordova.device" />
<gap:plugin name="com.telerik.plugins.wkwebview" />
It won't work with Hydration if you're using that; otherwise it should, but not all preferences...
I've shared a similar issue to PGB support today. Here my ticket:
The plugin cordova-plugin-statusbar not works correctly on PGB.
<gap:plugin name="cordova-plugin-statusbar" source="npm" />
Some configuration preferences are not considered on build. I've setted on config.xml following common preferences:
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#0ff000" />
<preference name="StatusBarStyle" value="default" />
I've tested on phonegap CLI, it works fine.
On PGB the iOS StatusBar overlays the webview. But if I turn off the overlays programmatically using the plugin's API, it works fine, and I can see the green StatusBar as setted on preferences,... but not the style default (dark text) also setted on preferences.
I've also tested the previous plugin source but it raises same results:
<gap:plugin name="org.apache.cordova.statusbar" source="pgb" />
I've created an App HelloWorld only for that purpose: 1493471
FYI, I've also tested the deprecated Plugin com.phonegap.plugin.statusbar, it considers the StatusBarOverlaysWebView preference but not the others...
I was dealing with the same issue and i found out that WKWebView has some bugs with position css styling. Using de the default Webview will solve your overlay problem.
However, Im still trying to find a solution that works with WKWebView.
I have added splash screen for my phonegap app.
I am building phonegap app online at http://build.phonegap.com.
Splash Screen is working fine for android.But on ios splash screen hides before the defined time.
Config.xml For Splash Screen
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
xmlns:android = "http://schemas.android.com/apk/res/android"
id = "com.clerisy.arcade"
versionCode = "10"
version = "1.0.0" >
<!-- versionCode is optional and Android only -->
<name>xxxxxxxxxxxxx</name>
<description>
xxxxxxxxxxxxxxxxx
</description>
<author href="https://build.phonegap.com" email="support#phonegap.com">
xxxxxxxxxxxxxxxx
</author>
<preference name="permissions" value="none"/>
<preference name="phonegap-version" value="3.6.3" />
<preference name="orientation" value="default" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="true" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="7" />
<preference name="android-installLocation" value="auto" />
<preference name="backgroundColor" value="0xff38c0f4"/>
<preference name="AutoHideSplashScreen" value="false" />
<preference name="ShowSplashScreenSpinner" value="false" />
<!-- Plugins -->
<!-- Core plugins -->
<gap:plugin name="org.apache.cordova.inappbrowser" version="0.5.2" />
<gap:plugin name="org.apache.cordova.network-information" version="0.2.12" />
<gap:plugin name="nl.x-services.plugins.socialsharing" version="4.3.8" />
<gap:plugin name="org.apache.cordova.device" version="0.2.12" />
<gap:plugin name="com.phonegap.plugin.statusbar" version="1.1.0" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<!-- Set Icon and splash screen -->
<icon src="icon.png" platform="android" width="57" height="57" density="mdpi" />
<gap:splash src="screen.png"/>
<gap:config-file platform="ios" parent="CFBundleShortVersionString">
<string>100</string>
</gap:config-file>
<content src="index.html" />
<access origin="*" />
</widget>
to hide splashscreen i am using
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
// Hide splash Screen
setTimeout(function() {
navigator.splashscreen.hide();
}, 2000);
The Problem is :-
it is working fine on android but on iphone it changes the resolution of splashscreen after few seconds.
Install the splash screen plugin
cordova plugin add org.apache.cordova.splashscreen
For iOS you have to hide splash screen inside timeout function in document ready, you can define the duration after which the splashscreen should hide.
setTimeout(function() {
navigator.splashscreen.hide();
}, 8000);
set autohide splash to false in config.xml
<preference name="AutoHideSplashScreen" value="false" />
Refer the plugin documentation for more detail https://github.com/apache/cordova-plugin-splashscreen/blob/master/doc/index.md
If you have apple device build uisng Xcode and add sleep in main thread of app (in app delegate) and you are done with it