You might wonder what will happen if you upload an iOS application that use UIWebView to WKWebView to iTune connect. I and my partner were experienced the result few days ago.
I want to thank you Mr. Theerasak for allowing me to share this experience. 😀
Ionic framework, was originally use Cordova as mobile platform solution. Cordova used UIWebView for iOS platform for a long time, but now, Apple need everyone move to use WKWebView instead.
So that is the reason. Cordova and Ionic team suggest developer to use cordova-ios
5.1+, which already applied with WKWebView. but updating to use its from your current Ionic project, isn’t enough.
The result of incomplete setting
Everything seems ok, until you entered publishing process.
You can use Xcode to publish your application to iTune Connect, or publish by yourselves. Regardless of which way, after the archive uploaded to iTune Connect, you will face ‘Invalid Binary’.
This messages consumed our time for a night and a day. Sometimes, Apple sent their detail too slow. We’ve got an email after that. The email’s content sparked us something very important.
TMS-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).
Though you are not required to fix the following issues, we wanted to make you aware of them:
that is. Why do we got this message even:
- Latest cordova-ios, already moved to WKWebView
- Even Apple has mentioned: “you are not required to fix the following issues” but this caused us ‘Invalid Binary’ problem.
What you have to do.
Finally, only solution described on Ionic blog.
Update 11/25/2019: The Cordova team has released Cordova iOS 5.1.0, which disables UIWebview at compile time. To use it, ensure you have a WKWebView plugin installed, then add
<preference name="WKWebViewOnly" value="true" />
to yourconfig.xml
file. Complete details below.
So just go to config.xml
, then add following line to its:
<preference name="WKWebViewOnly" value="true" />
and even Apple mentioned “you are not required to fix the following issues”, Ionic team wrote that any application’s update that contains UIWebView will be rejected after December 2020.
Hope this help you. Cheer!