提交Xamarin Forms iOS应用遇ITMS-90909警告,求解决方案
Hey there, let's work through this ITMS-90909 error—this is almost always tied to Apple's deprecation of UIWebView, which Xamarin Forms might be using under the hood (or via third-party libraries). Here's a step-by-step breakdown to resolve it:
1. Upgrade Xamarin.Forms to the Latest Stable Version
Apple has been pushing developers to use WKWebView instead of the deprecated UIWebView, and newer versions of Xamarin.Forms default to WKWebView out of the box.
- Open your solution in Visual Studio.
- Right-click your solution → Manage NuGet Packages for Solution.
- Search for
Xamarin.Forms, select it, and update to the latest stable release. Make sure to apply the update to all projects in your solution (shared, iOS, etc.).
2. Audit Third-Party NuGet Packages
Many third-party libraries still reference UIWebView without you realizing it.
- Go through all the NuGet packages your project uses. Check their release notes to see if they've migrated to
WKWebView. - Update any packages that have newer versions supporting
WKWebView. For packages that haven't been updated (and are no longer maintained), look for alternative libraries that use modern web views.
3. Remove Manual UIWebView References
If you've written custom code that directly uses UIWebView, you'll need to replace it with WKWebView:
- Search your entire solution for
UIWebView(use Visual Studio's search across files feature). - Replace instances of
UIWebViewwithWKWebView. Here's a quick example of the switch:// Old UIWebView code var webView = new UIWebView(); webView.LoadRequest(new NSUrlRequest(new NSUrl("https://example.com"))); // New WKWebView code var webView = new WKWebView(); webView.LoadRequest(new NSUrlRequest(new NSUrl("https://example.com"))); - Don't forget to add the
WebKitnamespace at the top of your files:using WebKit;
4. Clean and Rebuild Your Project
Cached build artifacts can sometimes hold onto old references.
- Right-click your solution → Clean Solution.
- Delete the
binandobjfolders from all your project directories (iOS, shared, Android if applicable). - Rebuild your solution from scratch.
5. Verify No UIWebView References Remain
To double-check you haven't missed anything:
- Open Terminal (on Mac) or Command Prompt (on Windows, navigate to your project root).
- Run this command to search for any leftover
UIWebViewmentions:grep -r "UIWebView" . - If any results pop up, investigate those files and fix the references.
Once you've completed all these steps, re-archive your iOS app and submit it to the App Store—this should resolve the ITMS-90909 error.
内容的提问来源于stack exchange,提问作者Samantha J T Star

