Reputation: 547
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
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...
Upvotes: 6
Views: 1549
Reputation: 547
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```
Upvotes: 3