ITMS-90809: Deprecated API Usage -- Apple will stop accepting submissions of apps that use UIWebView APIs

70,677

Solution 1

I will answer my own question as I have news about this email. Google told me that there are several tickets about this issue and they are going to resolve this as soon as possible. Also today my app has been approved for the AppStore so it seems to be just a warning for the time being.

Solution 2

Check if you use in your code the UIWebView class; if yes replace your implementation with WKWebView, else need check your Pods.

Go with terminal into your project folder and execute the command: grep -r "UIWebView" .

All matched pod must be updated. Now I'm stuck because I found UIWebView into Google AdMob (version 7.49.0) and I'm waiting a new version from Google.

Solution 3

You can examine each of the frameworks in the archived app to see if any of them refer to UIWebView. From the command line, cd to the archived app, e.g.:

cd ~/Library/Developer/Xcode/Archives/<date>/myapp.xcarchive/Products/Applications/myapp.app

Once there, use the nm command to dump the symbols of your app and each of the app's frameworks:

nm myapp | grep UIWeb
for framework in Frameworks/*.framework; do
  fname=$(basename $framework .framework)
  echo $fname
  nm $framework/$fname | grep UIWeb
done

This will at least tell you which framework is the culprit.

Solution 4

For project with cocoapods:

grep -r UIWebView Pods/ 

Solution 5

WKWebView is the replacement for UIWebView. If you don't have UIWebView usage in your code than by executing the below terminal command you can easily get to know that which library is still using UIWebView reference (don't miss the . (dot)).

From the command line, cd to the archived app, e.g

cd ~/Library/Developer/Xcode/Archives/<date>/myapp.xcarchive/Products/Applications/myapp.app

And then Run

grep -r UIWebView

OR call

 grep -r UIWebView /Path/To/Project/*

This will give you Output for framework match

./<ANY>.framework/Headers/ANY.h:#define ANYUseUIWebView ANY_NAME_PASTE(ANY_PREFIX_NAME, ANYUseUIWebView)

Output for library match

Binary file ./<FRAMEWORK-NAME>.framework/<LIB-FILE>.a matches

Update these Libraries

pod update

also check out this Medium Article

Share:
70,677
Nick
Author by

Nick

Updated on February 20, 2021

Comments

  • Nick
    Nick about 3 years

    Yesterday, I uploaded my App to TestFlight and after a while Apple sent me this warning:

    ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

    The thing is that I don't use UIWebView in my app so I tried to update my pods but still the same thing.By the way this is my 3rd build on TestFlight and this is the first time apple sends me this. Any ideas?

    Update

    These are my pods:

    pod 'Firebase/Core'
    pod 'Firebase/Firestore'
    pod 'Firebase/MLVision'
    pod 'Firebase/MLVisionTextModel'
    pod 'SVProgressHUD'
    pod 'SPPermission/Camera'
    pod 'SPPermission/PhotoLibrary'
    pod 'Mantis'
    pod 'SwiftKeychainWrapper'
    pod 'SwiftyOnboard'
    pod 'Fabric'
    pod 'Crashlytics'
    

    Update 2

    Seems like I found the frameworks with the issue.

    Binary file ./Pods/FirebaseMLCommon/Frameworks/FirebaseMLCommon.framework/FirebaseMLCommon matches
    Binary file ./Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics matches
    Binary file ./Pods/GoogleMobileVision/Detector/Frameworks/GoogleMobileVision.framework/GoogleMobileVision matches
    

    So now do I have to wait for google to fix them and update my pods?

  • Nick
    Nick over 4 years
    Thank you for your answer it helped a lot. I will update my question with further informations.
  • Nick
    Nick over 4 years
    So now the only thing I can do is to wait for google to resolve the issues?
  • Rudedog
    Rudedog over 4 years
    Yes, you will need to wait (or fix them yourself and submit a pull request). I’m not sure what the exact deadline is to remove all uses of UIWebView, but I highly doubt that it will be before iOS 13 is released this fall.
  • johnny
    johnny over 4 years
    @Rudedog how can I fix the frame works my self? First of all thank you for your answer... after following your answer it seems like I have 4 frameworks that are using UIWebView>>>>>> Alamofire Cosmos NMSSH Stripe
  • Rudedog
    Rudedog over 4 years
    @johnny you would have to clone each repository and find out where they use UIWebView, remove or replace the code that uses it, and possibly submit pull requests if you want your changes to go back into the main repository. Or, you could just wait for the maintainers to fix it themselves. As I mentioned before, right now Apple is just warning devs about this and not actually rejecting binaries, so you have some time to wait for the upstream maintainers to fix things.
  • Myxtic
    Myxtic over 4 years
    This is brilliant! I know it doesn't solve the issue, but it at least helps identify the problematic framework.
  • Durai Amuthan.H
    Durai Amuthan.H over 4 years
    When I entered the command in terminal , I'm getting the following warning "grep: warning: recursive search of stdin" and It doesn't return any response even after 30 mins.Any ideas ?
  • Jules Lee
    Jules Lee over 4 years
    So this is what I did and apparently it says Installing FirebaseInstanceID 4.2.5 (was 4.2.2) and didnt solve my problem
  • Stoph
    Stoph over 4 years
    I have a mixed native / React Native app and although this grep script doesn't reveal any UIWebView instances I'm still getting the warning from Apple. Is there any other way for me to determine where this issue might be coming from?
  • Rudedog
    Rudedog over 4 years
    It might be in a dsym and not a framework. Try the grep -rl UIWebView . command as suggested below.
  • apollosoftware.org
    apollosoftware.org about 4 years
    Worked perfectly. I used this to find out UnityAds.framework is using UIWebView. They need to update to WKWebView.
  • ShaoJen Chen
    ShaoJen Chen about 4 years
    Maybe you will get result like below.. Binary file /Users/xxx/xxxx/xxxx.xcworkspace/xcuserdata/xxx.xcuserdatad/‌​UserInterfaceState.x‌​cuserstate matches. I solved it by delete my xcworkspace and pod install again.
  • 10623169
    10623169 about 4 years
    Do you still get this @WilliamNardo? Even though I've updated past the supposed release to fix it: "7.55.0 Removed all references to UIWebView. UIWebView is no longer supported.", Installing Google-Mobile-Ads-SDK 7.56.0 (was 7.53.1) , I still get Binary file Pods/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramewo‌​rk-Current/GoogleMob‌​ileAds.framework/Goo‌​gleMobileAds matches
  • Wheelie
    Wheelie about 4 years
    @DuraiAmuthan.H check you added the period/full-stop (.) at the end of the grep command. I initially made the same mistake
  • mohsinulhaq
    mohsinulhaq about 4 years
    I get the following output when I run nm myapp | grep UIWeb: U _OBJC_CLASS_$_UIWebView But what does it mean? I can't find the reference when normally searching through code
  • Akash Sharma
    Akash Sharma about 4 years
    I have updated all UIWebViews to WKWebView. I also updated all pods in the projects. When I globally search for UIWebView, then it shows no result. Also, I used the command "nm myapp | grep UIWeb ...... done " and it shows no pods with UIWebView. But still, the iOS app does not appear on iTunes account activity. It was removed by Apple. Does anyone have any idea why the app is removed?
  • Rudedog
    Rudedog about 4 years
    It is unlikely that the app was removed due to use of UIWebView. While Apple has said that they won't accept submissions that use it, they've never said that they would be proactively removing apps from the store for using it.
  • Akash Sharma
    Akash Sharma about 4 years
    Sorry for the misunderstanding. Apple removed the build, not the live app. On running command it show: "Binary file ./dSYMs/Eureka.framework.dSYM/Contents/Resources/DWARF/Eurek‌​a matches". Is it fine or we have to change?
  • Jacksonkr
    Jacksonkr about 4 years
    That covers ios apps but doesn't help android or other mobile apps.
  • Manish
    Manish about 4 years
    use "grep -r -F "UIWebView" ." istead of "grep -r UIWebView"
  • Carolus
    Carolus almost 4 years
    How to execute that for loop in this answer? Do I need to make a bash script file? I tried to add backslash on each line before newline in bash prompt, but this didn't work for me.
  • Rudedog
    Rudedog almost 4 years
    @Carolus bash (and ksh, sh, csh, etc.) lets you input that directly in the terminal exactly as you see it. No need to add backslashes or anything like that.
  • Carolus
    Carolus almost 4 years
    @Rudedog Ah so it is intended that the nm myapp | grep UIWeb runs separately from the for loop? Also I made a mistake by attributing the error I got (lack of Frameworks dir, possibly due to being a Cordova project archive) to a syntax error.
  • slothstronaut
    slothstronaut almost 4 years
    This is an iOS specific issue, Android does not have the same issue
  • Vins
    Vins almost 4 years
    In Mac use "grep -r UIWebView ." in project path (with space and point at the end)
  • Dinesh Rawat
    Dinesh Rawat almost 4 years
    Hi can you direct to some solution, I am also facing the same issue. App is not approving even after so may hit and trials..
  • Carl Hung
    Carl Hung almost 4 years
    i saw "U _OBJC_CLASS_$_UIWebView" and a list of pod dependencies. but i cant find "UIWebView" in the source Code in those dependencies. what does it mean?
  • Sunil Targe
    Sunil Targe almost 4 years
    Already upgraded all pods those were using UIWebView (e.g AFNetworking, ZDCChat) and also checked updated pods as they're already upgraded for WKWebView but still grep -r UIWebView . gives me same pod list for UIWebView matches and apple also gives warning while submitting app on the iTunesconnect
  • Sunil Targe
    Sunil Targe almost 4 years
    ./Pods/Target Support Files/AFNetworking/AFNetworking-umbrella.h:#import "UIWebView+AFNetworking.h" Binary file ./Pods/ZDCChat/ZDCChatAPI.framework/ZDCChatAPI matches Binary file ./Pods/ZDCChat/ZDCChat.framework/ZDCChat matches Binary file ./Pods/.git/index matches
  • Jawad Ali
    Jawad Ali almost 4 years
    ZDCChatAPI this pod uses uiwebview
  • Sunil Targe
    Sunil Targe almost 4 years
    @jawadAli any solution on that?
  • David Velarde
    David Velarde over 3 years
    I want to buy you a beer
  • Ash
    Ash over 3 years
    This seems to be giving me a LOT of false positives, despite me not being able to find a reference to UIWebView in any of them.
  • Renascent
    Renascent about 3 years
    @DuraiAmuthan.H go to project folder in ternminal try: grep -r -F "UIWebView" . with full stop at end which indicates current directory and it will return all the UIWebView location in terminal.
  • user9088454
    user9088454 over 2 years
    I tried this but not working.
  • user9088454
    user9088454 over 2 years
    I tried this too, but not working.
  • Hiti3
    Hiti3 about 2 years
    and what is the solution here? just printed out inside comments, should comments be removed for to solve the issue?