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>
Related
My Cordova iOS App is showing White Screen with some Random Text while running the application on simulator after using WKWebView. It's working fine in UIWebView.
We are using Cordova 8.0.0 and Cordova iOS 5.1.1
This is my Config.xml
[<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#000000" />
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<allow-navigation href="http://localhost:8080/*" />
</platform>
<plugin name="cordova-plugin-whitelist" spec="1" />
<plugin name="cordova-plugin-fullscreen" spec="~1.3.0" />
<plugin name="cordova-plugin-inappbrowser" spec="~4.0.0" />
<plugin name="cordova-plugin-network-information" spec="~2.0.2" />
<plugin name="cordova-plugin-screen-orientation" spec="~3.0.2" />
<plugin name="cordova-plugin-statusbar" spec="~2.4.3" />
<plugin name="cordova-plugin-crypt-file" spec="~1.3.3" />
<plugin name="cordova-plugin-sslcertificatechecker" spec="~6.0.0" />
<plugin name="cordova-plugin-iroot" spec="~2.1.0" />
<plugin name="es6-promise-plugin" spec="^4.2.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^5.0.0" />
<engine name="ios" spec="^5.1.1" />][1]
the index.html file is not rendering.
Thanks in advance.
I'm developing the push notification feature with FCM on my app, both for Android and iOS.
After I successuflly managed the push notifications on Android devices, I was trying to do the same on a iOS one.
So, I started creted the template, like I made for Android.
But, creating the template, I got an error:
Build for ios is started
Uploading iOS keys...
Completed
Uploading an application template...
Completed
Building status: pending (13 attempts)
Building status: error ("plugman install --platform ios --project /tmp/gimlet/2719563/project --plugin phonegap-plugin-push#1.9.0": Fetching plugin "phonegap-plugin-push#1.9.0" via npm
Installing "phonegap-plugin-push" at "1.9.0" for ios
Failed to install 'phonegap-plugin-push':undefined
undefined
)
Removing iOS keys...
Completed
Removing the application template...
Completed
Error: Building status: error ("plugman install --platform ios --project /tmp/gimlet/2719563/project --plugin phonegap-plugin-push#1.9.0": Fetching plugin "phonegap-plugin-push#1.9.0" via npm
Installing "phonegap-plugin-push" at "1.9.0" for ios
Failed to install 'phonegap-plugin-push':undefined
undefined
)
This is my config.xml file:
<widget id="com.devexpress.apptemplate" version="1.0" versionCode="1">
<name>ApplicationTemplate</name>
<description>Template</description>
<preference name="phonegap-version" value="cli-6.4.0" />
<preference name="permissions" value="none" />
<preference name="prerendered-icon" value="true" />
<preference name="android-windowSoftInputMode" value="adjustPan" />
<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="15" />
<preference name="android-targetSdkVersion" value="22" />
<plugin name="cordova-plugin-geolocation" />
<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" />
<plugin name="phonegap-plugin-push" spec="1.9.0"/>
<access origin="*" />
</widget>
The config.xml file is in the project APP.mobile (not in APP.shared). I don't understand why I can build the native template for Android (and it works like a charm) and in iOS not.
UPDATE: Summarized all the steps here: https://programmingistheway.wordpress.com/2017/07/19/devextremephonegap-how-to-manage-push-notifications-with-fcm/
To use FCM you should use v2.x.x version of the plugin
Latest published version is v2.0.0-rc5, try with that, or even install from github with cordova plugin add https://github.com/phonegap/phonegap-plugin-push/
In your config.xml you have to add the google-services json and plist files like this
<platform name="android">
<resource-file src="google-services.json" target="google-services.json" />
</platform>
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
In your other question you seem to be using github url, not sure why you went back to 1.9.0
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