Ionic Framework

Invalid Binary: when you don’t set Ionic project to use WKWebView

เรื่องที่เกี่ยวข้อง - Ionic, Ionic Framework for iOS
Ionic-Framework-Blue-Banner

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 your config.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!

เริ่มต้นยุค AI ด้วยคอร์สฟรี และพรีเมี่ยม กับพล

หากชอบสิ่งที่พลเล่า เรื่องที่พลสอน สามารถสนับสนุนพลโดยการเข้าเรียนคอร์สออนไลน์ของพลนะคร้าบ

  • เข้าใจง่าย ใช้ได้จริง ออกแบบการสอนอย่างเข้าใจโดยโค้ชพล
  • มีคอร์สสำหรับคนใช้งานทั่วไป จนถึงเรียนรู้เพื่อใช้งานในสายอาชีพขั้นสูง
  • ทุกคอร์สมีใบประกาศณียบัตรรับรองหลังเรียนจบ

เราใช้คุกกี้เพื่อพัฒนาประสิทธิภาพ และประสบการณ์ที่ดีในการใช้เว็บไซต์ของคุณ คุณสามารถศึกษารายละเอียดได้ที่ นโยบายความเป็นส่วนตัว และสามารถจัดการความเป็นส่วนตัวเองได้ของคุณได้เองโดยคลิกที่ ตั้งค่า

Privacy Preferences

คุณสามารถเลือกการตั้งค่าคุกกี้โดยเปิด/ปิด คุกกี้ในแต่ละประเภทได้ตามความต้องการ ยกเว้น คุกกี้ที่จำเป็น

Allow All
Manage Consent Preferences
  • Always Active

Save