ITMS-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).
2020-05-01起,新app不得包含任何UIWebview相关api,否则直接提交上去后被打回。
检查方法
Thanks for contacting Developer Technical Support.
In
all instances I’m aware of, apps that are getting the UIWebView usage
warning are in fact linking to the UIWebView framework. It may be in
third party libraries or frameworks.
Please
check again what your app and its libraries link against. You can do so
by running the grep command in Terminal. For example,
1. Open Terminal
2. Type the following on the command line to change to the directory where the application binary is:
cd ~/Library/Developer/Xcode/Archives/
3. To search for UIWebView type the following:
grep -R UIWebView *
This
should give you a list of files that contain a reference to UIWebView.
From that list you should then be able to determine where the UIWebView
reference is.
To make this a bit more concrete,
the other day I created a test app named SingleViewApp and archived it,
so this is what I did to check for the UIWebView:
% cd ~/Library/Developer/Xcode/Archives/
% ls
2019-08-26 2020-03-09
% cd 2020-03-09
% ls
SingleViewApp 3-9-20, 11.38 AM.xcarchive SingleViewApp 3-9-20, 11.41 AM.xcarchive
SingleViewApp 3-9-20, 11.39 AM.xcarchive SingleViewApp 3-9-20, 11.47 AM.xcarchive
% cd "SingleViewApp 3-9-20, 11.47 AM.xcarchive"
% grep -R UIWebView *
Binary file Products/Applications/SingleViewApp.app/Base.lproj/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib matches
Binary file dSYMs/SingleViewApp.app.dSYM/Contents/Resources/DWARF/SingleViewApp matches
So we now know that there are references to UIWebView in the dSYM file and the nib.
Next we need to search the project for where the occurrences of the UIWebView exist.
Go to the folder where your project lives. In my case it was here:
cd ~/src/SingleViewApp
Now run the same grep command for UIWebView to determine if there are any occurrences in the project:
grep -R UIWebView *
In my case there weren't which means it’s not referenced in code.
Now run a search for UIWebView that will show up in storyboards by running this search:
grep -R webView *
In my case that returns the following results:
SingleViewApp/Base.lproj/Main.storyboard:
fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xsA-nw-Njb"> SingleViewApp/Base.lproj/Main.storyboard:
This tells us that the Main storyboard has a UIWebView in it.
Copy the id of the storyboard object, in this case it’s:
xsA-nw-Njb
And
in Xcode perform a project-wide search for that value by going to Find
> Find In Project… and searching for the storyboard ID.
In
the returned results, click on the ID and it will take you to the
specific scene in the storyboard that contains the UIWebView.
Hope this helps.
—Thaddeus O. Cooper
Apple DTS