I am trying to upload a new version of my app, to App Store, but it was rejected because:
This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.
But my app do not need to access the camera. I already looked into plugins list (ionic plugin list) but there is no plugin for camera access.
This is part of my config.xml
<preference name="loadUrlTimeoutValue" value="3600000"/>
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="android-minSdkVersion" value="15"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="4000"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="orientation" value="portrait"/>
<preference name="KeyboardDisplayRequiresUserAction" value="false"/>
<preference name="exit-on-suspend" value="false"/>
<feature name="Keyboard">
<param name="ios-package" onload="true" value="IonicKeyboard"/>
</feature>
<feature name="StatusBar">
<param name="ios-package" onload="true" value="CDVStatusBar"/>
</feature>
<plugin name="cordova-sqlite-storage" spec="~0.7.14"/>
<plugin name="cordova-plugin-app-version" spec="~0.1.8"/>
<plugin name="cordova-plugin-network-information" spec="~1.2.0"/>
<plugin name="cordova-plugin-insomnia" spec="https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git"/>
<plugin name="com.testfairy.cordova-plugin" spec="https://github.com/testfairy/testfairy-cordova-plugin"/>
<plugin name="cordova-plugin-datepicker" spec="https://github.com/VitaliiBlagodir/cordova-plugin-datepicker.git"/>
<plugin name="onesignal-cordova-plugin" spec="~1.12.5"/>
<plugin name="de.appplant.cordova.plugin.local-notification" spec="https://github.com/katzer/cordova-plugin-local-notifications.git"/>
<plugin name="cordova-plugin-background-mode" spec="https://github.com/katzer/cordova-plugin-background-mode.git"/>
Anyone could help ?
You may have a plugin that has camera functionality that you are not using, but it is still part of the plugin. You also may have a plugin that has been installed previously but is not in your config.xml file. You can try the following:
Reset State
You can run ionic state restore to have Ionic restore the app to the saved parameters. This will re-install the plugins added via the CLI with the --save tag or ones you have manually added to the package.json file. This may clear up some residual code issues.
Add Description
You can just add the tag that Apple wants to see. You can add the tag using cordova-custom-config to edit your -Info.plist via your config.xml file. You should be able to add the following to config.xml to satisfy Apple:
<config-file platform="ios" target="*-Info.plist" parent="NSCameraUsageDescription">
<string>Because racecar</string>
</config-file>
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)
Since 30th of april Apple does not allow apps build with SDK lower than 13. Ive used to build my apps using Phonegap build (https://build.phonegap.com/) but it uses SDK 12. Now im trying to build my apps using Xcode.
Every build i do using Phonegap build and using a test distribution profile to install this build on my phone works like a charm but when i build the app using the same config.xml as i use for my Phonegap build the inappbrowser is not working anymore.
I think it has something to do with the UIWebView being depricated as of SKD 13. Therefor ive used the tutorials provided by Cordova to implement the WkWebview.
I've tried removing all plugins except wkwebview-engine and inappbrowser but this has no effect.
Cordova CLI 9.0.0
inappbrowser 3.2.0
wkwebview-engine 1.2.1
ios platform add 5.1.1
My config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.app.name" version="0.2.13" xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>appname</name>
<description>
</description>
<author email="mymail" href="mywebsite">
my name
</author>
<content src="dist/index.html"/>
<platform name="ios"/>
<platform name="android"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<preference name="permissions" value="none"/>
<preference name="phonegap-version" value="cli-9.0.0"/>
<preference name="orientation" value="portrait"/>
<preference name="target-device" value="universal"/>
<preference name="prerendered-icon" value="true"/>
<preference name="detect-data-types" value="false"/>
<preference name="exit-on-suspend" value="false"/>
<preference name="deployment-target" value="7.0"/>
<preference name="webviewbounce" value="false"/>
<preference name="stay-in-webview" value="false"/>
<preference name="ios-statusbarstyle" value="black-opaque"/>
<preference name="ShowSplashScreenSpinner" value="true"/>
<preference name="AutoHideSplashScreen" value="true"/>
<preference name="android-minSdkVersion" value="19"/>
<preference name="android-targetSdkVersion" value="28"/>
<preference name="android-installLocation" value="auto"/>
<preference name="android-windowSoftInputMode" value="stateVisible|adjustResize"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="ShowSplashScreen" value="true"/>
<preference name="FadeSplashScreen" value="false"/>
<preference name="SplashScreenDelay" value="2000"/>
<preference name="FadeSplashScreenDuration" value="0"/>
<platform name="android">
<preference name="fullscreen" value="false"/>
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true"/>
</edit-config>
</platform>
<platform name="ios">
<preference name="fullscreen" value="false"/>
</platform>
<access origin="*"/>
<allow-navigation href="*"/>
<allow-navigation href="*://*youtube.com"/>
<access origin="mailto:*" launch-external="true"/>
<allow-intent href="http://*/*"/>
<allow-intent href="https://*/*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*" launch-external="yes"/>
<allow-intent href="geo:*"/>
<platform name="android">
<allow-intent href="market:*"/>
</platform>
<platform name="ios">
<allow-intent href="itms:*"/>
<allow-intent href="itms-apps:*"/>
<allow-navigation href="mailto:*" launch-external="yes"/>
</platform>
<feature name="TouchID">
<param name="ios-package" value="TouchID"/>
</feature>
<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-inappbrowser" spec="3.2.0" />
<plugin name="cordova-plugin-wkwebview-engine" spec="1.2.1" />
</widget>
before testing i do this to make sure all plugins are installed fresh:
rm -rf package-lock.json package.json platforms plugins/* node_modules
cordova platform add ios#5.1.1
i receive no response in the xcode console just this information when build is finished:
2020-05-13 16:23:33.805959+0200 App[7410:670156] [Accessibility] ****************** Loading GAX Client Bundle ****************
2020-05-13 16:23:33.996820+0200 App[7410:670156] Apache Cordova native platform version 5.1.1 is starting.
2020-05-13 16:23:33.998789+0200 App[7410:670156] Multi-tasking -> Device: YES, App: YES
2020-05-13 16:23:34.016143+0200 App[7410:670156]
Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/
To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file
2020-05-13 16:23:34.282716+0200 App[7410:670156] CDVWKWebViewEngine will reload WKWebView if required on resume
2020-05-13 16:23:34.283306+0200 App[7410:670156] Using WKWebView
2020-05-13 16:23:34.284438+0200 App[7410:670156] [CDVTimer][console] 0.174999ms
2020-05-13 16:23:34.285355+0200 App[7410:670156] [CDVTimer][handleopenurl] 0.338078ms
2020-05-13 16:23:34.290426+0200 App[7410:670156] Unlimited access to network resources
2020-05-13 16:23:34.291285+0200 App[7410:670156] [CDVTimer][intentandnavigationfilter] 5.457997ms
2020-05-13 16:23:34.292067+0200 App[7410:670156] [CDVTimer][gesturehandler] 0.302076ms
2020-05-13 16:23:34.292696+0200 App[7410:670156] [CDVTimer][TotalPluginStartup] 8.646965ms
I'm out of ideas to fix this. maybe anyone has some fresh look so i can try some new things.
Well managed to find the answer. My file structure was www/dist/index.html and in there was the link to cordova.js
<script type="text/javascript" src="cordova.js"></script>
it needed to be:
<script type="text/javascript" src="../cordova.js"></script>
besides that, during the command:
cordova platform add ios#5.1.1
there were some yellow messages for example:
Failed to install 'cordova-plugin-inappbrowser': Error: Cannot find module 'glob'
I was ignoring them because well... yellow
after some research i came across the solution for this. after the messages execute:
cordova platform rm ios
And then again:
cordova platform add ios#5.1.1
the second time the plugins are installed successfully and this time the inappbrowser works again.
for now this is a workaraound, the question im still having is why i get the Failed to install 'cordova-plugin-inappbrowser': Error: Cannot find module 'glob'messages when adding the platform for the first time..?
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 am using the Cordova (4.2.0) StatusBar plugin. The options I want are:
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="StatusBarBackgroundColor" value="#A7A7A7"/>
All is fine, when I directly edit the config.xml file in XCode before building (in Xcode) and running the app on a device.
My issue is that as soon as a re-run "cordova build ios", the settings in the config.xml file revert to the defaults of:
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarStyle" value="lightcontent" />
Ok - so I know about default.xml and put my required settings in there. Trouble is now I get (unnecessary lines edited out):
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="StatusBarBackgroundColor" value="#A7A7A7" />
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" />
<param name="onload" value="true" />
</feature>
<preference name="StatusBarOverlaysWebView" value="true" />
Note the second "StatusBarOverlaysWebView" entry and this "StatusBarOverlaysWebView" entry overrides the first!!
So I dig deeper and find plugin.xml, which contains:
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarStyle" value="lightcontent" />
That has got to be it, so I change that to my required defaults ... but no, I still get the second "StatusBarOverlaysWebView" and I have no idea why or where it is coming from. Can anyone help?
Thanks in advance
Nick
Try this:
Remove the iOS platform (cordova platform rm ios).
Uninstall the plugin (cordova plugin rm org.apache.cordova.statusbar).
Edit the config.xml in your root directory and add your 3 preferences there.
Reinstall the plugin (cordova plugin add org.apache.cordova.statusbar).
Edit plugin.xml and remove the 2 default preferences.
Add back the iOS platform (cordova platform add ios).
I'm betting that will fix you.
I have a problem with the StatusBar in iOS. My app ID is 234560, StatusBar version "0.1.4" as suggested (here) and phonegap version 3.6.3. I have granted the permissions (CDVStatusBar) and the preferences (StatusBarOverlaysWebView false, StatusBarBackgroundColor A7A7A7 and StatusBarStyle lightcontent) with no sucess. My bar still appears as if StatusBarOverlaysWebView would be set to true and the background color is also not applied. This is how the relevant preferences are set in my config.xml:
<preference name="phonegap-version" value="3.6.3" />
<preference name="orientation" value="both" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="false" />
<preference name="webviewbounce" value="false" />
<preference name="stay-in-webview" value="true" />
<preference name="show-splash-screen-spinner" value="true" />
<gap:plugin name="org.apache.cordova.statusbar" version="0.1.4" />
<preference name="permissions" value="none" />
<feature name="Device">
<param name="ios-package" value="CDVDevice" />
</feature>
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true" />
</feature>
<preference name="StatusBarOverlaysWebView" value="false"/>
<preference name="StatusBarBackgroundColor" value="#A7A7A7"/>
<preference name="StatusBarStyle" value="lightcontent" />
I would love to have any assistance, I have been reading a lot of issues regarding to this topic but non of them were ussing this phonegap version. Thank you in advance!
I had the same problem, then I decided to remove the plugin and then add it again, it worked!!
The github site for the plugin says this which worked for me:
iOS Quirks:
Starting with iOS 11 you must include viewport-fit=cover in your index.html viewport meta tag if you want the status bar to overlay the webview:
<meta name="viewport" content="initial-scale=1, width=device-width, **viewport-fit=cover**">