Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted.

Discussion in 'iOS and tvOS' started by sahilwestvindh, May 5, 2020.

  1. sahilwestvindh

    sahilwestvindh

    Joined:
    Jun 28, 2018
    Posts:
    2
    Hi, I am using Google Mobile Ads Unity Plugin with mediation in my ios game. However am getting this error from apple - ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability.

    The version on Google Mobile Ads Unity Plugin is 5.1.0
    And I followed this video on how to upgade the google moble ads to the latest version -



    Can someone please tell me what am i missing?
    Thanks.
     
    polyphonic13 likes this.
  2. ShadoVvPic

    ShadoVvPic

    Joined:
    Mar 30, 2015
    Posts:
    1
    Sam in here
     
  3. myasovik

    myasovik

    Joined:
    Feb 4, 2016
    Posts:
    15
    Unity 2018.4 - it worked fine last week.

    Yesterday I try to upload and get this error message. I do not have Ads in my project. And new build just have new 2D assets

    I removed ADS totally from my project and I look for text "UIWebView" in my project and in my build folder. And I did not find any thing.
     
    Last edited: May 6, 2020
  4. ln_unity972

    ln_unity972

    Joined:
    Aug 2, 2019
    Posts:
    1
    Unity 2019.2.17f1 - worked fine last week as well.

    I've been having this issue since the start of the week, as well as - TMS-90078: Missing Push Notification Entitlement.

    i'm not using Ads and have double checked the Package Manager to make sure it's not installed. I am using the Analytics Library version 3.3.5 though, as well as Multiplayer HLAPI, not sure if they use UIWebView.

    As for Push notifications, I have removed it from my permissions script and am not using it anywhere else in my app, but I do have the Mobile Notificaitions packages installed - version 1.0.3. Should I remove it?
     
  5. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    513
    If you are not using it, you should.
     
  6. myasovik

    myasovik

    Joined:
    Feb 4, 2016
    Posts:
    15
    I try to run
    >grep -r "UIWebView" .
    in my build project and got
    Binary file ./ProjectName/Pods/GVRSDK/Libraries/libGVRSDK.a matches

    This project uses Virtual Reality so is this could be a problem?
     
    Last edited: May 8, 2020
  7. myasovik

    myasovik

    Joined:
    Feb 4, 2016
    Posts:
    15
    I removed all my scenes, GVR files, XR in project settings. > Created Hello World scene and I was able to upload the app.
    Now the question how do I exclude UIWebView from GVR?
     
  8. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    749
    same, just uploaded my app... unity 2019.1 doesn't appear in iTunes connect as I got that email saying....
    "Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn m....."
    need to find out what is using UIWebView..... any ideas ?
    if I figure it out, I'll post back here....
     
    Last edited: May 11, 2020
  9. fatyhats

    fatyhats

    Joined:
    Apr 24, 2017
    Posts:
    3
    Last edited: May 11, 2020
  10. kgbv

    kgbv

    Joined:
    Jun 5, 2013
    Posts:
    13
    i faced the same issue .

    Solution
    :
    1.Update Google Admob SDK - Minimum SDK version 5.6.0 required
    Update FB Audience Network SDK (if used) download from FB page
    Unity ADs (if used ) - Minimum SDK version 3.3.0 required .

    according to Email :
    All the GMA SDK versions including and after 7.55.0 released on Feb 4th, 2020, default to WKWebview and have removed UIWebView entirely.
    To ensure your app complies with App Store’s requirement, we recommend that you:
    1) Update the GMA SDK to the most recent one (minimum version: 7.55.0) and release your app with it at the earliest convenience;
    2) If you are using AdMob mediation or Open Bidding, please review the list below with information on the latest minimum SDK of 3P ad networks that utilize WKWebView and make sure the adapter versions match the SDK version.
     
    PNUMIA-Rob and sampoway like this.
  11. markypocock

    markypocock

    Joined:
    May 30, 2019
    Posts:
    1
    I don't know if you solved this but i think i have worked around it (and i emphasise think haha).

    I found the issue for me was in \Pods\GVRSDK\Libraries\libGVRSDK.a via Findstr. It had 3 references to UIWebView and i replaced them with WKWebView using gVim and added WebKit.framework to 'frameworks and libraries' in UnityFramework.

    The build built successfully to device without issues and uploaded to store and processed fine without warnings, it's now in review for external testing so fingers crossed it's all green dots.
     
  12. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    749
    I tried options in that other thread... https://forum.unity.com/threads/itm...ions-of-apps-that-use-uiwebview.736814/page-3
    ads work with 2.0.8 on device build.
    switching from ads 2.0.8 to 3.4.5 just made the ads not work in builds.
    using grep. didn't find any references to UIWebView in my Xcode project
    modifying Xcode file target UnityAdsUnityWrapper.mm disabled the ads from working
    so far no success of both a build, and ads still working. in 2019.1.14f1
    ads 3.3.1, no ads or errors on device
    looks like 2.0.8 is the only "verified" version for 2019.1.14f1 in the package manager :(
     
    Last edited: May 11, 2020
  13. JonnyHilly

    JonnyHilly

    Joined:
    Sep 4, 2009
    Posts:
    749
    fixed it by dumping old unity, old ads version and my code. updating to 2019.3 with latest unity-ads from package manager, and fresh implementation. works. :) but pain to get there.
     
    DBarlok likes this.
  14. myasovik

    myasovik

    Joined:
    Feb 4, 2016
    Posts:
    15

    IT IS WORKING !!!! Thank you!

    To save time for others who are not familiar with this process as I was:

    In Vim open \Pods\GVRSDK\Libraries\libGVRSDK.a

    Type> :%s/UIWebView/WKWebView/g

    Adding Frameworks to Your Xcode Project
    1. Select the project file from the project navigator on the left side of the project window.
    2. Select the target for where you want to add frameworks in the project settings editor.
    3. Select the “Build Phases” tab, and click the small triangle next to “Link Binary With Libraries” to view all of the frameworks in your application.
    4. To Add frameworks, click the “+” below the list of frameworks.
    5. Select WebKit.framework
     
    Last edited: May 15, 2020
  15. RobertCoomber

    RobertCoomber

    Joined:
    Mar 25, 2017
    Posts:
    15
    @myasovik I tested your update and it works! Thank you.
     
  16. hanger102

    hanger102

    Joined:
    Jan 3, 2013
    Posts:
    13
    I tried editing \Pods\GVRSDK\Libraries\libGVRSDK.a but it didn't work. My project is a google cardboard app using Unity 2019.2.21. I even tried updating to the latest Unity and that didn't work either.
     
  17. ExNinja

    ExNinja

    Joined:
    Dec 4, 2013
    Posts:
    30
    >grep -r "UIWebView" .

    @myasovik Thank you very much for the suggestion to run this command in the Xcode folder that Unity created!

    Through that, I was able to discover that it was an old version of the Chartboost plugin that was causing the issue. I also needed to upgrade the Facebook API (and removed old versions of Unity Ads and Unity In-App Purchases, though I don't know if they were culprits or not, as I removed them before finding your answer).
     
  18. argontechdevelopers

    argontechdevelopers

    Joined:
    Oct 15, 2019
    Posts:
    5
    I tried editing \Pods\GVRSDK\Libraries\libGVRSDK.a file but vim is not editing .a file . it is opening in an encrypted form.
    kindly help @myasovik
     

    Attached Files:

    • vim.PNG
      vim.PNG
      File size:
      40.8 KB
      Views:
      649
  19. myasovik

    myasovik

    Joined:
    Feb 4, 2016
    Posts:
    15
    That is correct. Now you can search in this file for "UIWebView" and there should be that actual name without encryption. And to replace it:
    1. Click ESC
    2. Type> :
    3. Paste> %s/UIWebView/WKWebView/g
    4. Click enter

    It is possible that you have reference on it in different files so try to run
    grep -r "UIWebView"
    in your console
     
    gwuwer-mms likes this.
  20. andycahyadi

    andycahyadi

    Joined:
    Jul 13, 2020
    Posts:
    1
    hi @myasovik i have the exact same problem and after following your suggestion, when i try to build the app, it throws lots of error, something like this for example :


    ignoring file /Users/xxxx/Documents/xxx/vrproject/Projects/vr/Builds/iOS/vr-iOS/Pods/GVRSDK/Libraries/libGVRSDK.a, file is universal (4 slices) but does not contain the armv7 architecture:

    where did i go wrong? :(
     
  21. intelligent261

    intelligent261

    Joined:
    Dec 12, 2018
    Posts:
    1
    hi myasovik,

    Could you share me your file "libGVRSDK.a".
    I cannot editing libGVRSDK.a file
     
  22. tesicnor

    tesicnor

    Joined:
    Mar 21, 2020
    Posts:
    1
    hi @myasovik, I'm having same problem and can't resolve it =(. Could you share your file please?

    Thank you!
     
  23. myasovik

    myasovik

    Joined:
    Feb 4, 2016
    Posts:
    15
    Hi,

    I cannot share any files as this is commercial project not my personal.

    Remove UIWebView
    1. You need to get vim for mac. This is one I am using > https://macvim-dev.github.io/macvim/
    2. In Vim open {Path to your build folder}\Pods\GVRSDK\Libraries\libGVRSDK.a
    3. Click ESC
    4. Type ":"
    3. Paste "%s/UIWebView/WKWebView/g"
    4. Click enter
    Adding Frameworks to Your Xcode Project
    1. Select the project file from the project navigator on the left side of the project window.
    2. Select the target for where you want to add frameworks in the project settings editor.
    4. Select the “Build Phases” tab, and click the small triangle next to “Link Binary With Libraries” to view all of the frameworks in your application.
    5. To Add frameworks, click the “+” below the list of frameworks.
    6. Select WebKit.framework
    Here is an image where to click > http://docs.onemobilesdk.aol.com/ios-ad-sdk/adding-frameworks-xcode.html
     
    Starbox and croixbk like this.
  24. myasovik

    myasovik

    Joined:
    Feb 4, 2016
    Posts:
    15
    I do not know such error.

    Try to use Unity version 2018.4 which I am using.

    Two weeks ago I upgraded to 2019 and I just give up on fixing all problems to submit to app store and rolled it back today to 2018
     
  25. msclower

    msclower

    Joined:
    May 26, 2017
    Posts:
    13
    In windows try:

    findstr /S /I /M "UIWebView" *.*


    mine tells me:

    Assets\Plugins\iOS\UnityAds.framework\UnityAds

    is the problem.
     
  26. andrew_pearce_

    andrew_pearce_

    Joined:
    Nov 5, 2018
    Posts:
    167
    I had the same issue. I used command line tool findstr suggested by @msclower and found that there was one file within Library folder and one within Pod (AdMob). Since I was using Unity 2018.4.1f4, I decided to give a try and update it to latest Unity 2018.4.28f1 available at the moment. That fixed half of the problem, there was no more file with UIWebView within Library folder and when I tried to submit build, I was still getting warning message.

    Then I found a post of the user, who said that AdMob fixed that issue. So I decided to update Google-Mobile-Ads-SDK within Podfile to latest available Google-Mobile-Ads-SDK 7.67. Unfortunately, that did not work well because Firebase was wrong version. So to save time, I simply remove version from all cocoa pods, except Google-Mobile-Ads-SDK, so my file looked like:

    Code (csharp):
    1. pod 'Firebase/Analytics'
    2. pod 'Firebase/Core'
    3. pod 'Firebase/RemoteConfig'
    4. pod 'FirebaseInstanceID'
    5. pod 'Google-Mobile-Ads-SDK', '~> 7.67'
    Then I did pod update and got following message:

    Code (csharp):
    1. Installing Firebase 4.0.3 (was 5.20.0)
    2. Installing FirebaseAnalytics 4.0.2 (was 5.8.0)
    3. Installing FirebaseCore 4.0.3 (was 5.4.1)
    4. Installing FirebaseInstanceID 2.0.10 (was 3.8.1)
    5. Installing FirebaseRemoteConfig 2.0.1 (was 3.1.0)
    6. Installing Google-Mobile-Ads-SDK 7.67.1 (was 7.43.0)
    7. Installing GoogleAppMeasurement 7.0.0 (was 5.8.0)
    8. Installing GoogleToolboxForMac (2.3.0)
    9. Installing GoogleUserMessagingPlatform (1.3.0)
    10. Installing GoogleUtilities 7.0.0 (was 5.8.0)
    11. Installing PromisesObjC (1.2.11)
    12. Installing nanopb 2.30906.0 (was 0.3.9011)
    13. Removing FirebaseABTesting
    After that I was still able to see UIWebView within AdMob but Apple accepted a built and it appeared under 'All Builts' and 'TestFlight'. I will keep searching which parts of Podfile needs to be changed and how to be able to install Google-Mobile-Ads-SDK 7.67. I hope this will saves someone time.

    UPD1: I wasted over a half day, trying to make it all work. The sample Podfile above was generating error at app startup. The Analytics 5.8 was not compatible with AdMob 7.67. So I tried to downgrade Analytics to 5.0. App compiled but I got a message from Firebase that it's too old and it will self disable. Then I tried to upgrade to next available version Analytics 6.9 but app was crashing with NSInvalidArgumentException (setMinimumSessionInterval). There was a topic where Firebase team suggested to upgrade Firebase to 6.13 but it was not available in pods. The next version was 7.0 but it required to increase min iOS version from 9 to 10 =(

    So I tried a solution by @myasovik but it did not worked. I added each and then both WebKit libraries available but I was getting handler related error message.

    Finally, I go back to Analytics 6.0 and tried it (assuming that bug was related to 6.9) but it also generated new error at app startup. The next 6.0.4 worked but I came back to the same issue setMinimumSessionInterval and then I decided to check, if I can remove it. Documentation told me that this method is Deprecated and that's why I was getting error =)

    Important, since we manually updated pod's version, Unity no longer was able to give us warning. So if you also change pod version to higher, make sure that your code is not using any deprecated methods or properties. This is the Podfile which worked for me:

    Code (CSharp):
    1. pod 'FirebaseAnalytics', '~> 6.9'
    2. pod 'FirebaseCore', '~> 6.10'
    3. pod 'FirebaseRemoteConfig', '~> 4.9'
    4. pod 'FirebaseInstanceID', '~> 4.8'
    5. pod 'Google-Mobile-Ads-SDK', '~> 7.67'
    UPD2: I hope this message will save your time. I wasted another 14 hours before I learn a lesson =) xCode is a casino roulette! Project's successful build/archive is pure luck! Project > Clean build folder > Build > Error... changing nothing, do it again and it will magically Build this time. There was a times when I achieve successfully but then validation used to tell me that there is no build in it =) Other times it used to say that archive was not created with xCode and etc... pure magic! God save Android!

    The most important NEVER TOUCH PODFILE! If you need to have different version numbers for pods, then update plugins within Unity and let Unity create proper Podfile for you!

    Unity build for iOS is not smart as for Android (with 'force resolution' function), so do not expect that it will resolve version issues within Podfile for you. So I was doing it all wrong... The Google Mobile Ads pod was fixed since 7.45 version (theoretically... because when I tried it, it failed but 7.67 worked). I also tried gad_preferred_webview key solution but Apple still did not approve build.

    You may think that installing new version of Google Mobile Ads plugin 3.18.3 (which includes v7.48) for Unity should fix the problem but not... because that would just increase min version for Google Play Ads in Podfile but that version requires FirebaseCode 6 which was not compatible with my existing Firebase Analytics 5.20.0 =)

    REAL SOLUTION I had to update Google Mobile Ads to 3.18.3 (I believe it was not required) and then Firebase SDK to 6.3.0 which increased FirebaseAnalytics to 6.3 and made it compatible with GoogleMobileAds 7.67. Finally I confirm that this worked on device, archive and even apple approved it.

    p.s. The reason why I am not using latest FirebaseSDK and GoogleMobileAds is that they require external dependency manager which causes conflict with TextMeshPro (duplicate libraries with Firebase)
     
    Last edited: Nov 6, 2020
    Starbox likes this.
  27. PNUMIA-Rob

    PNUMIA-Rob

    Joined:
    Jan 7, 2015
    Posts:
    33
    To everyone not dealing with a more severe version of this issue, try updating Unity Ads to v3.x.x first - that's fixed it for me every time.
     
  28. polyphonic13

    polyphonic13

    Joined:
    Apr 2, 2013
    Posts:
    17
    Why would Unity Ads v3.x.x be needed, if you're using AdMob? According to Unity support, Unity Ads isn't needed for them. Additionally, what version of the AdMob SDK are you using? I'm GoogleMobileAdsSdkiOS-7.69.0 framework files to my iOS builds, but they still get rejected from Apple Connect.
     
  29. Jeff_rey

    Jeff_rey

    Joined:
    Nov 26, 2017
    Posts:
    19
    @myasovik
    Thank you very much for this info!! but I have a small problem...
    My file is saving as it should wonderfully, but when I restart unity it restores the libgvrsdk.a file back to the previous version. I believe it is updating itself via the package.json "repository" url that is provided any thoughts on how to resolve this? and not sure if it matters but I am on windows using gvim (82)

    edit: it seems to be getting rid of the error in my build, but I have to do it every time I build on ios which is a pain, but managable. I do have a reference in my archive though in a gSYM file but from what I've read those have no working code so hopefully it'll slide through.

    @Philipp_Helbig if you typed in your comment exactly what it says, then you have UiWebView. it should be, to my understanding UIWebView. pattern not found means it can't find UiWebView in your document. I believe it is case sensitive, but I could be wrong. (edit: I tried" :%s/UiWebView/WKWebView/g" and I did receive a pattern not found error. So it is case sensitive) Try that and see and reply back for others struggling if it works.
     
    Last edited: Feb 22, 2021
  30. Philipp_Helbig

    Philipp_Helbig

    Joined:
    Feb 22, 2021
    Posts:
    1

    Thanks myasovik,
    seems to me as i need this procedure. Because grep -r "UIWebView" in my xcode project path in Terminal comments with: "binary file libGVRSDK.a matches"...
    My problem now is when i do this command in MacVim i get the message "E486: Pattern not found: UiWebView". Why? is there no pattern or does macvim not search in the file? in finder i do right-click on the GVRSDK.a - file and click "New MacVim Buffer Here". ISs this correct? is this the same like opening the file? Or how can i open the file properly in the batch of macvim? is "open" the correct form? Sorry for loads questions, i am new to this topic and nooby.

    Cheers Phil
     
  31. Jeff_rey

    Jeff_rey

    Joined:
    Nov 26, 2017
    Posts:
    19

    @Philipp_Helbig also in addition to my comment above, just right click the libgvrsdk.a file and open with vim. It should open a file that has a bunch of letters and symbols. (see thumbnail below) if you type in the exact command as @myasovik stated above you should get a 4 substitutions on 4 lines. At least that is what it said for me. Also I might add that for me I had to do this process AFTER unity is opened, otherwise it will rewrite the file. I built into xcode and before I did ANYTHING I found the file in my pods and edited it then. I received a successful upload to testflight, but that is as far as I have gotten. I hope this helps. I'm on here everyday until this app is published, so if any has any incite please share!
     

    Attached Files:

    • gvr.JPG
      gvr.JPG
      File size:
      1.2 MB
      Views:
      340
  32. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    456
    I got that error yesterday. I was waiting for the build to pop up in my Apple control panel but got instead that email.
    Between the former build that got allowed and the new one that got rejected, I simply updated a plugin for ads, IAPs, stuff like that.
    Also, on the topic of weird and gratuitous errors that will either make an archiving fail or an uploading fail, I simply cleaned the project every time. When the archiving had failed and redid it and it worked. Sure. When later on I tried an upload during the night and it failed, I cleaned the build, archived it and push the file towards Apple and this time it passed through.
    Now I'm getting this WebView error so, again, I'm cleaning the folder, doing a new archive and again sending it. Just to see what happens. Not a single change in code or else is brought to the project. I want at least to be sure that I can reproduce the error and obtain the same refusal. In 2021, using Unity Ads and a LTS version, plus a Unity Ads package that's verified, I do not understand why I should even get issues with this UIWebView problem when it would have been dealt with by all parties by now!

    EDIT
    Well, "good" news, at least the re-archiving and upload resulted in the same refusal. So something between Unity, Unity Ads package (within Services) and the plugin could be messing things up.
     
    Last edited: Jul 19, 2021
  33. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    456
    Now in mid 2021, after getting this issue as a reason for rejection, I'm wondering why it wouls happen at all. I look at the project (sort of pre-build) in Xcode 12.4, go to Build Phases and in frameworks, I cannot find Webkit.
    Is there any reason why Unity 2019.4 LTS would not automatically throw this framework into the mix while I'm launching a building from Unity?
    In Xcode, with the Search tool (fourth icon from the left in the left column), I look for WebView but nothing is found at all.

    How may I find a specific line of code within Unity? Is there a native/free tool for that to parse the whole project's code and find references to UIWebView?
    I used Visual Studio's Look in Files for 'WebView', 'UIWeb' and variants, case not sensitive, but never found anything.
    I'm still working on Catalina, could this be of importance?
     
    Last edited: Jul 20, 2021
  34. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    I've just started getting this. i'm using latest unity. anyone got any tips?
     
  35. WsgDev

    WsgDev

    Joined:
    Feb 28, 2022
    Posts:
    2
    Experiencing same issues.. any info?
     
  36. WsgDev

    WsgDev

    Joined:
    Feb 28, 2022
    Posts:
    2
    Did you figure it out, i have exhausted all the paths community has gathered.. i dont exactly even have uiwebView in my project build only in 3 files, twitterkit and google sign inside Pod but only in changelog or readme... so nothing really there but still getting this annoyong bug.. Do i need to have latest xcode, currently on xcode 12.5 and unity 2020.3.20f1??
     
  37. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    I removed facebook SDK and it started working, lucky for this is just an app in development so I figured I'd sort it out later.