I did quite a research on this one, and even though it is a very common issue none of the solutions worked for me so I keep getting the dreaded:
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability
My configuration is this:
Ionic:
Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/#ionic/cli)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.1.0, ios 4.2.0, windows 4.4.2
Cordova Plugins : cordova-plugin-ionic-webview 5.0.0, (and 13 other plugins)
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v10.16.2 (/usr/local/bin/node)
npm : 6.14.5
OS : macOS Catalina
Xcode : Xcode 11.5 Build version 11E608c
Plugins:
com.verso.cordova.clipboard 0.1.0 "Clipboard"
cordova-clipboard 1.3.0 "Clipboard"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-crop 0.3.1 "CropPlugin"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.1 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
cordova-plugin-x-socialsharing 5.6.3 "SocialSharing"
cordova-plugin-x-toast 2.6.0 "Toast"
cordova-sqlite-storage 2.2.0 "Cordova sqlite storage plugin"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 7.0.2 "BarcodeScanner"
uk.co.workingedge.cordova.plugin.sqliteporter 1.1.1 "sqlite porter"
Could anyone identify something that screams "this one uses UIWebView and you should change it!" ?
UPDATE:
In order to fix the issue I followed these steps:
Made sure that cordova-plugin-ionic-webview was in version >= 5.0.0
Added
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
...
</platform>
To config.xml
updated ionic npm install -g ionic#latest
updated cordova npm install -g cordova#latest
updated ionic scripts npm install #ionic/app-scripts#latest
Then removed the iOS platform ionic cordova platform rm ios
Re-added the iOS platform ionic cordova platform add ios
and rebuild it ionic cordova prepare ios
I have fixed my app for the exact issue recently and Here are the steps I have followed to fix the issue:
1) Ensure your cordova-plugin-ionic-webview is updated to the latest version 5.0.0. You need to run these two commands to do that.
ionic cordova plugin remove cordova-plugin-ionic-webview
ionic cordova plugin add cordova-plugin-ionic-webview#latest
2) Ensure your cordova-ios is updated to the latest version 6.0.0. Run this command to update it.
npm install cordova-ios#latest --save
3) Check your package.json to see if the versions are updated for both cordova-ios and cordova-plugin-ionic-webview.
4) Ensure you add WKWebViewOnly preference to config.xml file.
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
...
</platform>
5) This is the most important step. Ensure you remove the ios platform and add it again. Run these commands to remove and add the ios platform.
ionic cordova platform rm ios
ionic cordova platform add ios
Now, when you build the ios app and publish it to the app store, you can see the issue will be fixed.
Related
Ionic 5 with Capacitor getting 'plugin_not_installed' with plugin 'cordova.plugins.diagnostic'. Tried installing with this doc.
I have:
config.xml has
<plugin name="cordova.plugins.diagnostic" spec="^5.30.0" />.
package.json has
"cordova": {
"plugins": {
...
"cordova.plugins.diagnostic": {}
...
}
}
and
"dependencies": {
...
"#ionic-native/diagnostic": "^5.30.0",
...
"cordova.plugins.diagnostic": "^6.0.2",
...
}
Here's my output for cordova plugin list
com.googlemaps.ios 3.9.0 "Google Maps SDK for iOS"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-geolocation 4.1.0 "Geolocation"
cordova-plugin-googlemaps 2.7.1 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-nativegeocoder 3.4.1 "NativeGeocoder"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova.plugins.diagnostic 6.0.2 "Diagnostic"
And have tried these commands:
ionic capacitor sync ios
cordova build
ionic build
ionic cordova run ios -l
First, when using Cordova plugin inside a capacitor project, use this commands.
npm install cordova.plugins.diagnostic #ionic-native/diagnostic
Refer docs for details
Secondly, remove your platform and ios folders that have been already created.
Then, for Capacitor follow these commands.
ionic capacitor add ios
ionic build
ionic capacitor sync ios
ionic capacitor open ios
For any subsequent changes to your code, you just have to run
ionic build && ionic capacitor sync ios (if you have added any new package/plugin)
ionic build && ionic capacitor copy ios (if only code has been changed)
You say your project is built on capacitor, then you don't have to run ionic cordova run ios command, or any cordova commands
Refer this command docs
ionic 3 cordova branch sdk plugin not working in ios build its giving “branch.h file not found” error
System info:
Ionic:
Ionic CLI : 6.10.2 (/usr/local/lib/node_modules/#ionic/cli) Ionic
Framework : ionic-angular 3.9.2 #ionic/app-scripts : 3.2.4
Cordova:
Cordova CLI : 8.1.1 (cordova-lib#8.1.0) Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3,
cordova-plugin-ionic-webview 1.2.1, (and 15 other plugins)
Utility:
cordova-res (update available: 0.15.1) : 0.6.0 native-run (update
available: 1.0.0) : 0.2.9
System:
ios-deploy : 1.9.4 NodeJS : v10.16.3 (/usr/local/bin/node) npm :
6.13.4 OS : macOS Catalina Xcode : Xcode 11.5 Build version 11E608c
A .h file is a header file that belongs to the plugin's native code.
If that file is not found, its the plugin's code that is not properly available in the project. It either has been deleted after installation, or it was not included when the plugin was installed.
Check the plugin's code on Github to be sure which of these is the case. If the code being installed is missing the file, try installing a different branch of the plugin.
When I’m uploading a build to AppStoreConnect (to test it via
TestFlight for example), I’m getting the well-known deprecation
message:
ITMS-90809: Deprecated API Usage - New apps that use
UIWebView are no longer accepted. Instead, use WKWebView for
improved security and reliability. Learn more
(https://developer.apple.com/documentation/uikit/uiwebview).
What I did:
1) Remove ios platform and added V5.1.0 ios platform.
2) Added below in config.xml
3) Ran ionic cordova build ios
List of cordova plugins I’m using:
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-chooser 1.2.6 "Chooser"
cordova-plugin-contacts 3.0.1 "Contacts"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filepath 1.5.8 "cordova-plugin-filepath"
cordova-plugin-googleplus 5.2.1 "Google SignIn"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-media-capture 3.0.3 "Capture"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-stripe 1.5.3 "cordova-plugin-stripe"
cordova-plugin-telerik-imagepicker 2.3.3 "ImagePicker"
cordova-plugin-video-editor 1.1.3 "VideoEditor"
cordova-plugin-whitelist 1.3.3 "Whitelist"
ionic-plugin-deeplinks 1.0.20 "Ionic Deeplink Plugin"
Ionic Info:
Ionic:
ionic (Ionic CLI) : 4.10.3 (/usr/local/lib/node_modules/ionic) Ionic Framework :
enter code here
ionic-angular 3.9.9 #ionic/app-scripts : 3.2.4
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova
Platforms : ios 5.1.0
Cordova Plugins :
cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview
4.2.1, (and 17 other plugins)
System:
ios-deploy : 1.9.4 ios-sim : 8.0.2
NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 11.3.1 Build version 11C504
Does anybody have an idea what could cause the issue?
Thank you so much in advance!
As they said in Understanding ITMS-90809: UIWebView API Deprecation:
Add cordova plugin add cordova-plugin-ionic-webview#latest
Check all of your plugins. Update used (for example InAppBrowser 3.2.0) or remove unused plugins.
Also, use Cordova iOS 5.1.1
The most notable fix in this patch release was to make the prepare
step to wait for the platform add step to finish. This resolved the
bug that was seen when setting the WKWebViewOnly flag before adding
the platform.
ionic cordova platform remove ios
ionic cordova platform add ios#5.1.1
In config.xml add:
<platform name="ios">
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
</platform>
More about this you can find in the article How To Use 'WKWebViewOnly'.
The above example uses the cordova-plugin-wkwebview-engine plugin:
Add plugin cordova-plugin-wkwebview-engine, preferably the latest version 1.2.1
Add preference attribute CordovaWebViewEngine to the config.xml
Add feature attribute CDVWKWebViewEngine to the config.xml
Add preference WKWebViewOnly to the config.xml
And last but not least:
ionic cordova prepare ios
I hope this helps. I've followed these steps and didn't have any problems with an update to the App Store.
Check the CordovaLib target -> Build Stettings -> User Defined (very bottom) of your project. There you find WK_WEB_VIEW_ONLY = 0 set this to WK_WEB_VIEW_ONLY = 1 Setting the macro via GCC_PREPROCESSOR_DEFINITIONS does not work. You can also search for WK_WEB_VIEW_ONLY with Xcode and it will display quickly if the Flag is set to 0.
This flag will be changed by Cordova only if the configure.xml contains <preference name="WKWebViewOnly" value="true" /> at the time you create a new ios project. So changing it manually in XCode to 1 in addition to adding the preference makes sense.
With latest update apple removed UIWebView usage so app submitted with this UIWebView will be rejected, they want app to be build using WKWebView for improved security and reliability.
NOTE : If you some how added this plugin "cordova-plugin-wkwebview-engine" and ran "npm i cordova-plugin-wkwebview-engine" kindly undo these steps i.e (Remove plugin and npm uninstall it). As this will fail the build ios step with error 65.
To achieve this in our existing project we need to follow these steps in sequence so that our app gets deployed in App Store.
1). ionic cordova platform remove ios
2). ionic cordova plugin remove cordova-plugin-ionic-webview
3). ionic cordova plugin add cordova-plugin-ionic-webview#latest
4). npm install #ionic-native/ionic-webview#latest
5). Add following XML code in config.xml file under platform ios
// These preferences and feature will automatically replace UIWebView to WKWebView in all the places of code during compile time.
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
6). Check in package.json file under dependencies key "cordova-ios": "5.1.1" should exist, if not exist then add "cordova-ios": "5.1.1"
7). ionic cordova platform add ios
8). ionic cordova prepare ios
9). ionic cordova build ios
Now these steps will successfully build the ios App and will be ready for deployment.
NOTE: I tested these steps in ionic 3 and ionic 4.
Hope this will help you or somebody else!
Thanks!
I have upgraded my environment from ionic 1 to ionic 3.19.1. However, my project is still ionic v1 (or if im not mistaken below v1, not sure)
I ran the command
ionic cordova build ios --v1
and there is this failure.
Discovered plugin "cordova-plugin-console" in config.xml. Adding it to the project
Installing "cordova-plugin-console" for ios
Plugin doesn't support this project's cordova-ios version. cordova-ios: 4.5.4, failed version requirement: <4.5.0
Skipping 'cordova-plugin-console' for ios
what does it mean and how to resolve it?
My environment is below:
ionic version 3.19.1
cordova version 8.0.0
npm version 5.6.0
macos High Sierra 10.13.1
xcode 9.2
You simply need to uninstall cordova-plugin-console.
Check cordova-ios 4.5.0 release here.
Important! If you have included cordova-plugin-console in your project, you must remove it, otherwise your project will not build.
It is now integrated into cordova-ios platform(4.5.0 onwards).
Your current version is cordova-ios: 4.5.4 according to the error message.
Here is the issue tracker of integration into cordova-ios.
Do:
ionic cordova plugin remove cordova-plugin-console
Good Morning!
Well I've been maintaining an ionic Cordova app but I'm having to upgrade it to the Iphone and I'm not getting it I've already searched a lot in various corners but I still can not solve my problem.
Log error
https://pastebin.com/f6c9N32p
Ionic V1 Info
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
Cordova Platforms : android 6.3.0 ios 4.5.0
Ionic Framework : ionic1 1.1.0
System:
ios-deploy : 1.9.2
Node : v8.9.3
npm : 5.5.1
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
Plugin List
cordova-plugin-console 1.0.7 "Console"
cordova-plugin-device 1.1.3 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-inappbrowser 1.6.0-dev "InAppBrowser"
cordova-plugin-splashscreen 4.0.0 "Splashscreen"
cordova-plugin-statusbar 2.2.0 "StatusBar"
cordova-plugin-whitelist 1.3.0 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 2.1.2 "PushPlugin"
Setting the "Build Active Architecture Only" to 'Yes' resolved the same issue on my end.
Build Active Architecture Only is on Xcode -> Build Settings
Did you try to change value to "No" of Enable Bitcode
XCode ss
Ok, so here is my solution, Go to the general properties, and uncheck the "Automatically manage signing" checkbox, and then check it again