We have a new app we are trying to submit to the app store (using TestFlight for pre-release beta testing) but are getting an Invalid binary message due to the reference of UIWebView:
TMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.
We've followed the guide provide by Xamarin here: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/webview?tabs=macos#uiwebview-deprecation-and-app-store-rejection-itms-90809
We have:
I've also deleted my packages, bin, and object folders to ensure I get a full build, yet continue to get this response when uploading.
EDIT: I added the warning flag to my MTOUCH to see where it's used as well, and I do now see a warning, so it's there... somewhere.
Warning code added:
--warn-on-type-ref=UIKit.UIWebView
Build warning:
How can I go about finding which package is utilizing UIWebView without haphazardly updating them all and hoping that does the trick (without other unintended consequences)?
EDIT #2: I got GREP search working as recommended below - here are my results
grep -r 'UIWebView' .
Binary file ./.vs/NorthernLights/xs/sqlite3/storage.ide matches
./iOS/NorthernLights.iOS.csproj: <MtouchExtraArgs>--optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView</MtouchExtraArgs>
Binary file ./packages/Xamarin.Forms.4.6.0.726/buildTransitive/XCODE10/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/buildTransitive/XCODE11/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/build/XCODE10/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/build/XCODE11/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/HockeySDK.Xamarin.5.2.0/lib/Xamarin.iOS10/HockeySDK.iOSBindings.dll matches
Looks to me like HockeyApp may be one of my culprits. I've already updated the package, but I do know HockeyApp's been migrated to AppCenter, so perhaps this code is no longer maintained. Also see a reference SQLite, which is one set of packages I can't get updated without breaking other parts of my app.
EDIT #3
We've removed HockeyApp but still have the two reference warnings. I've removed SQLIte PCL and re-added it to the most recent version but still see the reference to the storage.ide file, which I think is just a local database file I can ignore. It looks like all that's left is Xamarin.Forms references, but all of this should be dealt with via my mtouch arguments:
<MtouchExtraArgs>--optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView</MtouchExtraArg
Can't figure out what I'm missing...
Apple is phasing out UIWebView, which is used by developers for integrating web content into an app in a quick and secure manner. Apple is replacing UIWebView (and WebView) with WKWebView, an updated version, as UIWebView has been deprecated.
What is UIWebView? UIWebView is a deprecated iOS user interface control in Apple's UIKit framework. It loads HTML files and web content into an app view, rendering them as they would appear in a browser window.
New apps containing these frameworks are no longer accepted by the App Store. And last year, we announced that the App Store will no longer accept app updates containing UIWebView as of December 2020.
It means that your web site was viewed using the UIWebView functionality on an iOS device (iPhone, iPad, iPod Touch). The UIWebView is different from the ordinary Safari browser, as it is not a stand-alone browser, but merely browser functionality that is embedded in a third party app.
A few months after this, Apple announced that as of April 2020 they reject new apps still referencing UIWebView. For updates to apps the deadline is December 2020. Of course, we want to be ready well before then, and we are. With Xamarin.Forms we strive to maintain backwards compatible the best we can.
While it has been available in Forms for a long time now, the default was still the UIWebViewRenderer. Shortly after the introduction of iOS 13, Apple decided to send out warning messages about the UIWebView deprecation. The warning would read: ITMS-90809: Deprecated API Usage – Apple will stop accepting submissions of apps that use UIWebView APIs.
Unfortunately, removing the UIWebView type from Xamarin.iOS.dll is a binary breaking change. This change will break existing 3rd party libraries, including some that might not be supported or even re-compilable anymore (for example, closed source). This will only create additional problems for developers.
Shortly after the introduction of iOS 13, Apple decided to send out warning messages about the UIWebView deprecation. The warning would read: ITMS-90809: Deprecated API Usage – Apple will stop accepting submissions of apps that use UIWebView APIs.
Alright, I figured my own instance out. The grep tool was great, once I knew what to look for and what to ignore:
grep -r UIWebView .
I could safely ignore the Xamarin.Forms references because of the MTOUCH rule, and while I don't know what the SQLLite reference is, it wasn't the problem. In my case, the only one that mattered was HockeyApp, which is a crash logging tool we used but has been deprecated and replaced by Microsoft AppCenter. The code appears to not be maintained (no surprise) and it still had that reference in it. Once we removed HockeyApp and related code, we were able to submit without issue / warnings.
On a side note... my dev environment still shows the references in Xamarin.Forms... you just have to be aware that you can ignore them if you have the proper MTOUCH arguments in place per the original article.
Here are my grep results, the only thing that mattered was the HockeyApp reference.
Binary file ./.vs/NorthernLights/xs/sqlite3/storage.ide matches
./iOS/NorthernLights.iOS.csproj: <MtouchExtraArgs>--optimize=experimental-xforms-product-type --warn-on-type-ref=UIKit.UIWebView</MtouchExtraArgs>
Binary file ./packages/Xamarin.Forms.4.6.0.726/buildTransitive/XCODE10/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/buildTransitive/XCODE11/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/build/XCODE10/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/Xamarin.Forms.4.6.0.726/build/XCODE11/Xamarin.Forms.Platform.iOS.dll matches
Binary file ./packages/HockeySDK.Xamarin.5.2.0/lib/Xamarin.iOS10/HockeySDK.iOSBindings.dll matches```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With