cordova-plugin-admob-free icon indicating copy to clipboard operation
cordova-plugin-admob-free copied to clipboard

ITM-90809 IOS Deprecated API Usage

Open pirpy76 opened this issue 4 years ago • 49 comments

When I send my application for IOS to app store, I receive this message:

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

I tried to send app, removing only admob-free plugin and the above message disappeared; so, it's obviously admob-free plugin creates the issue.

Please update your plugin, removing all references to UIWebView and using the new Admob SDK version, that removes any reference to UIWebView

pirpy76 avatar Mar 28 '20 17:03 pirpy76

I can confirm the issue. Everytime I upload my iOS app to the App Store, I get the following email:

App Store Connect: Your app (...) has one or more issues
ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of app updates that use UIWebView APIs starting from December 2020. See https://developer.apple.com/documentation/uikit/uiwebview for more information. 

If I remove cordova-plugin-admob-free, then I don't receive this e-mail anymore:

cordova plugin remove cordova-plugin-admob-free

It looks like this is due to the fact that the plugin uses an older version of the Google AdMob SDK (7.42.1): https://gitlab.com/ratson/cordova-admob-sdk

The Mobile Ads SDK (iOS) release notes show that all references to UIWebView have been removed in the version 7.55.0: https://developers.google.com/admob/ios/rel-notes

However, I'm not 100% sure if the newest version (7.57.0) fixes the problem... see https://groups.google.com/forum/#!category-topic/google-admob-ads-sdk/QuZMbjIyxn8

francoisduchemin avatar Mar 29 '20 08:03 francoisduchemin

I think that ADMOB SDK is the problem, and until Google ADMOB SDK team doesn't solve the problem, the plugin will cause App Store ISSUE. But, I think that Google will solve it in a few days, because if they don't, no more IOS apps with ADMOB will be approved....

pirpy76 avatar Mar 29 '20 09:03 pirpy76

Yes the Mobile Ads SDK is definitely the issue. It looks like the last version (7.57.0) still doesn't fix the issue... so I guess we have to wait for Google to fix it!

The problem is that the App Store will no longer accept new apps using UIWebView as of April 2020 and app updates using UIWebView as of December 2020 (see https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation/).

francoisduchemin avatar Mar 29 '20 13:03 francoisduchemin

It seems that version 7.55 of Admob SDK removed all references to UIWebView: 7.55.0 | 2020‑02‑04 | Removed all references to UIWebView. UIWebView is no longer supported.

https://developers.google.com/admob/ios/rel-notes

Which Admob SDK version does this plugin use?

sergip76 avatar May 04 '20 09:05 sergip76

I have also received an email from Google indicating that "all the GMA SDK versions including and after 7.55.0 released on Feb 4th, 2020, default to WKWebview and have removed UIWebView entirely".

This plugin uses an older version of the Google AdMob SDK (7.42.1): https://gitlab.com/ratson/cordova-admob-sdk

francoisduchemin avatar May 04 '20 09:05 francoisduchemin

In that case, we have to wait for an update of this plugin in order to use it in new iOS apps :-(

sergip76 avatar May 04 '20 13:05 sergip76

Can we get an eta on this? I'm unable to add my apps to the app store

pedrumgolriz avatar May 05 '20 02:05 pedrumgolriz

Nor do I. But the only alternative at the moment is admob-plus. It uses a recent version of Admob SDK. I would like to implement this plugin, but I have just tested and I think it has still too many bugs for a production purpose.

sergip76 avatar May 05 '20 04:05 sergip76

Indeed. It looks like admob-plus uses the version 7.57: https://github.com/admob-plus/admob-plus/blob/master/packages/cordova/plugin.xml

I guess a merge request is needed for cordova-admob-sdk and then a pull request for cordova-plugin-admob-free... @ratson seems to be quite active on the admob-plus project.

francoisduchemin avatar May 05 '20 07:05 francoisduchemin

For now I think we can download SDK from Google then replace in cordova-admob-sdk plugin. But it is good if ratson update this plugin.

I tried admob-plus so many time and it still have bugs (also make app size bigger because of swift) so I required use admob-free plugin.

stionic avatar May 06 '20 10:05 stionic

For now I think we can download SDK from Google then replace in cordova-admob-sdk plugin. But it is good if ratson update this plugin.

I tried admob-plus so many time and it still have bugs (also make app size bigger because of swift) so I required use admob-free plugin.

It's so simple to solve the problem? Download and replace admob SDK? Where is located in the app directory?

pirpy76 avatar May 06 '20 10:05 pirpy76

@pirpy76 yeah, simple download .zip package file from https://developers.google.com/admob/ios/download

In your project remove /plugins/cordova-admob-sdk/src/ios/GoogleMobileAds.framework

Extract file .zip downloaded and copy GoogleMobileAds.framework to /plugins/cordova-admob-sdk/src/ios/

Remove ios platform and add again: ionic cordova platform rm ios ionic cordova platform add ios

Done!

================== Update 2021/02/20

Current Google released new Admob SDK 8. This comment mention version 7.67 If you have problem when replace with new SDK please try download old version here

https://dl.google.com/dl/cpdc/b7bc0f4694d26380/Google-Mobile-Ads-SDK-7.67.0.tar.gz

found above link from Cocoapods (https://github.com/CocoaPods/Specs/blob/master/Specs/5/9/a/Google-Mobile-Ads-SDK/7.67.0/Google-Mobile-Ads-SDK.podspec.json)

stionic avatar May 06 '20 11:05 stionic

@stionic is readding the platform necessary? Shouldn't ionic cordova ios prepare suffice?

pedrumgolriz avatar May 06 '20 14:05 pedrumgolriz

@pirpy76 yeah, simple download .zip package file from https://developers.google.com/admob/ios/download

In your project remove /plugins/cordova-admob-sdk/src/ios/GoogleMobileAds.framework

Extract file .zip downloaded and copy GoogleMobileAds.framework to /plugins/cordova-admob-sdk/src/ios/

Remove ios platform and add again: ionic cordova platform rm ios ionic cordova platform add ios

Done!

It works for me!!

After doing the changes that @stionic suggests I have tried it with a banner ad and an interstitial ad. They both shows correctly and I could upload the app to the Test Flight without problems with UIWebview.

Thanks @stionic

sergip76 avatar May 06 '20 14:05 sergip76

it didn't work for me. I tried to follow

@pirpy76 yeah, simple download .zip package file from https://developers.google.com/admob/ios/download

In your project remove /plugins/cordova-admob-sdk/src/ios/GoogleMobileAds.framework

Extract file .zip downloaded and copy GoogleMobileAds.framework to /plugins/cordova-admob-sdk/src/ios/

Remove ios platform and add again: ionic cordova platform rm ios ionic cordova platform add ios

Done!

it didn't work for me. I tried to follow your steps, but after submission I received "ITMS-90809: Deprecated API Usage" message.

pirpy76 avatar May 07 '20 19:05 pirpy76

@pirpy76 yeah, simple download .zip package file from https://developers.google.com/admob/ios/download

In your project remove /plugins/cordova-admob-sdk/src/ios/GoogleMobileAds.framework

Extract file .zip downloaded and copy GoogleMobileAds.framework to /plugins/cordova-admob-sdk/src/ios/

Remove ios platform and add again: ionic cordova platform rm ios ionic cordova platform add ios

Done!

It definitely works. Thanks!

mmysgr avatar May 08 '20 00:05 mmysgr

it didn't work for me. I tried to follow your steps, but after submission I received "ITMS-90809: Deprecated API Usage" message.

It mean your project have other plugins using UIWebView.

You can check follow:

  • Latest cordova-ios platform
  • Latest cordova-plugin-ionic-webview
  • <preference name="WKWebViewOnly" value="true" /> in config.xml
  • If use cordova-plugin-inappbrowser plugin then it should >= 3.2.0

Also search more about your plugins list.

stionic avatar May 08 '20 01:05 stionic

it didn't work for me. I tried to follow your steps, but after submission I received "ITMS-90809: Deprecated API Usage" message.

Try inserting this lines: <feature name="CDVWKWebViewEngine"> <param name="ios-package" value="CDVWKWebViewEngine" /> </feature> <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" /> <preference name="WKWebViewOnly" value="true" />

between: <platform name="ios"> </platform>

sergip76 avatar May 08 '20 04:05 sergip76

Hi guys, thanks for providing answers in regard to fixing this - however, just adding the admob free plugin adds the UI framework to the build frameworks which then causes the deprecation notice. I am confident it is only the admob-free plugin that is adding the UI kit because it isn't present before installation and is present after installation. Any tips on this? Has anyone submitted an app with admob-free included (in an Ionic / Flutter etc Hybrid app) without deprecation notices?

gbrits avatar May 15 '20 01:05 gbrits

Hi guys, thanks for providing answers in regard to fixing this - however, just adding the admob free plugin adds the UI framework to the build frameworks which then causes the deprecation notice. I am confident it is only the admob-free plugin that is adding the UI kit because it isn't present before installation and is present after installation. Any tips on this? Has anyone submitted an app with admob-free included (in an Ionic / Flutter etc Hybrid app) without deprecation notices?

I have already submited several apps to App Store this month, using admob-free plugin, and I hadn't any problem with UIView. I did the changes suggested here. I don't use Ionic, just Apache Cordova, but I think it works for both.

Be sure you do the changes suggested for cordova-admob-sdk plugin (installed with admob-free plugin). That's the most important thing to do.

sergip76 avatar May 15 '20 10:05 sergip76

Thank you @sergip76 and @mmysgr - I can confirm that the most important step is to replace the SDK bundle for now. (And also the config adjustments, <preference name="WKWebViewOnly" value="true" />)

1.) Download .zip package file from https://developers.google.com/admob/ios/download 2.) Remove /plugins/cordova-admob-sdk/src/ios/GoogleMobileAds.framework Extract folder and copy (from .zip) GoogleMobileAds.framework to replace it at /plugins/cordova-admob-sdk/src/ios/ 3.) Remove ios platform and add again: ionic cordova platform rm ios ionic cordova platform add ios

A submission right before updating this folder, even with the config.xml changes still turned up with rejection, but after I updated the framework via the zip file and submitted again it accepted it. :)

gbrits avatar May 18 '20 05:05 gbrits

@pirpy76 yeah, simple download .zip package file from https://developers.google.com/admob/ios/download

In your project remove /plugins/cordova-admob-sdk/src/ios/GoogleMobileAds.framework

Extract file .zip downloaded and copy GoogleMobileAds.framework to /plugins/cordova-admob-sdk/src/ios/

Remove ios platform and add again: ionic cordova platform rm ios ionic cordova platform add ios

Done!

14 Builds Later and then read this comment. This worked for me. Thanks so much.

Would be great if this can be fixed in a next release or something

heinrichcoetzee avatar May 18 '20 16:05 heinrichcoetzee

I use a cloud CI/CD server so manually updating the plugin in my project didn't seem like an option from what I could tell.

So I created my own git repos for cordova-admob-sdk and cordova-plugin-admob-free, then updated them with 7.63.0 of Google Mobile Ads SDK. Next I just added it like any other cordova plugin using the git url. Works fine so far when building for iOS and Android. App was submitted successfully to Apple. I'll let you know if anything breaks or gets denied.

https://github.com/jarodms/cordova-admob-sdk https://github.com/jarodms/cordova-plugin-admob-free

jarodms avatar Aug 07 '20 02:08 jarodms

@jarodms : we gave a try to your fork, and we don't get the UIWebView "ITMS-90809: Deprecated API Usage" anymore when publishing to the AppStore; Nice job !!


By the way, and not sure this is related, but when trying to load an Ad (Interstitial or Banner) using our own adUnit, we always receive the event "LOAD_FAIL" with error: "(null)" on iOS, and error: 3, reason: "No fill" on Android

Using the Google test adUnits works fine (‘ca-app-pub-3940256099942544/1033173712’ and ‘ca-app-pub-3940256099942544/4411468910’)

We can see the ad requests received increase on the AdMob Report, but the match rate is still 0

Anyone having the same issue ?

UPDATE 08/27/2020 : The "LOAD_FAIL" issue only occurs on one of our App / Bundle ID and when further testing jarodms:admob-free with some other of our Apps (same AdMob publisher id / adUnit), we can load ads (test and prod mode) with success <- it must be something about our App config / ranking / whatever_on_the_AdMob side that we still need to investigate, but admob-free has nothing to do with the "LOAD_FAIL" issue

XavM avatar Aug 14 '20 14:08 XavM

@pirpy76 yeah, simple download .zip package file from https://developers.google.com/admob/ios/download

In your project remove /plugins/cordova-admob-sdk/src/ios/GoogleMobileAds.framework

Extract file .zip downloaded and copy GoogleMobileAds.framework to /plugins/cordova-admob-sdk/src/ios/

Remove ios platform and add again: ionic cordova platform rm ios ionic cordova platform add ios

Done!

Thank you! This workaround works for me. I also require to use AdmobFree.

I encountered another issue with NSBluetoothAlwaysUsageDescription because of this plugin. You can simply remove CoreBluetooth from your project in Xcode (another manual action) if you don't use Bluetooth. More detailed answer here https://github.com/ratson/cordova-plugin-admob-free/issues/396

I also see that some folks still have issues. I'm not sure if all guys use Ionic, but if yes then be sure to follow Ionic manual for ITMS-90809 as well https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation/

Happy coding!

PabloVortex avatar Aug 20 '20 15:08 PabloVortex

How about requesting app tracking transparency authorization for IDFA access which would be required for iOS 14 distribution?

Starting in iOS 14, IDFA will be unavailable until an app calls the App Tracking Transparency framework to present the app-tracking authorization request to the end user. If an app does not present this request, the IDFA will automatically be zeroed out which may lead to a significant loss in ad revenue. https://developers.google.com/admob/ios/ios14

While modification of the Info.plist is easy a call to the ATTrackingManager.requestTrackingAuthorization is required. I'm not keen on iOS native development, but the code for calling the request is:

#import <AppTrackingTransparency/AppTrackingTransparency.h>
#import <AdSupport/AdSupport.h>
...
- (void)requestIDFA {
  [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
    // Tracking authorization completed. Start loading ads here.
    // [self loadAd];
  }];
}

Maybe someone better in native could provide a PR for this?

rafaellop avatar Aug 27 '20 08:08 rafaellop

if you use this forked update it includes the tracking auth and an update to the SDK https://github.com/tomitank/cordova-plugin-admob-tomitank

martijnmichel avatar Sep 18 '20 14:09 martijnmichel

I use a cloud CI/CD server so manually updating the plugin in my project didn't seem like an option from what I could tell.

So I created my own git repos for cordova-admob-sdk and cordova-plugin-admob-free, then updated them with 7.63.0 of Google Mobile Ads SDK. Next I just added it like any other cordova plugin using the git url. Works fine so far when building for iOS and Android. App was submitted successfully to Apple. I'll let you know if anything breaks or gets denied.

https://github.com/jarodms/cordova-admob-sdk https://github.com/jarodms/cordova-plugin-admob-free

how do i run in my ionic project, your new cordova-plugin-admob-free? is it still? $ ionic cordova plugin add cordova-plugin-admob-free --save --variable ADMOB_APP_ID="ca-app-pub-0121577198857509~3332380085" or $ ionic cordova plugin add https://github.com/ratson/cordova-plugin-admob-free/ --save --variable ADMOB_APP_ID="ca-app-pub-0121577198857509~3332380085" or $ ionic cordova plugin add https://github.com/jarodms/cordova-plugin-admob-free --save --variable ADMOB_APP_ID="ca-app-pub-0121577198857509~3332380085"

i mean i dont understand how to reference the new version https://github.com/jarodms/cordova-plugin-admob-free

lookang avatar Nov 04 '20 07:11 lookang

@lookang

I am using Ionic with Capacitor and use npm to install cordova plugin with the following syntax (the trick is the git+ part before the git url):

npm install git+https://github.com/jarodms/cordova-plugin-admob-free

I think the same syntax can be used with cordova plugin add... hope this helps.

mnapoli76 avatar Nov 06 '20 17:11 mnapoli76

Correct. ionic cordova plugin add git+https://github.com/jarodms/cordova-plugin-admob-free

jarodms avatar Nov 11 '20 14:11 jarodms