[SOLVED] SDKBOX AdMob reward video on iOS?!

I’m stuck. Trying to load reward video on iOS for several hours and nothing works. Please help.
It is working just fine on Android devices. My config:

"AdMob": {
            "test": false,
            "ads": {
                "test_unit": {
                    "type": "interstitial",
                    "id": "ca-app-pub-9006426178832869/5460184831"
                },
                "restore_unit":{
                    "id":"ca-app-pub-9006426178832869/4622580035",
                    "type":"rewarded_video"
                }
            }
        }

Enabling/Disabling Arbitrary Loads did not change a thing…

Errors I get:

libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9806)

Have u just enabled/created Admob id for rewarded video? It could be that it is not yet active. Also could be that u didnt added that HTTP site requests in info.plist.

In iOS9, ATS enforces best practices during network calls, including the use of HTTPS.

From Apple documentation:

ATS prevents accidental disclosure, provides secure default behavior, and is easy to adopt. You should adopt ATS as soon as possible, regardless of whether you’re creating a new app or updating an existing one. If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible.

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

Also your error looks like something else not related to Admob:

https://www.google.com/search?q=550%3A+no+access+to+InverseDeviceID&rlz=1C5CHFA_enLT690LT690&oq=550%3A+no+access+to+InverseDeviceID&aqs=chrome..69i57&sourceid=chrome&ie=UTF-8

I’ve created both android and ios at the same time so this shouldn’t be the problem, as android videos work. When Arbitrary Loads is TRUE i get the NSURLSession error and when its FALSE i get the InverseDeviceID error.

Ok. I managed to fix all errors… but reward video in iOS is still not showing. pluginAdMob::isAvalable always returns false :confused:

Hello its me again :slight_smile: Quick tutorial for people having my problem:

  1. First of all - use EXCEPTIONS so you don’t get rejected by app store

    NSAllowsArbitraryLoads NSExceptionDomains google.com NSAllowsArbitraryLoadsForMedia NSAllowsAribtraryLoadsInWebContent NSExceptionAllowsInsecureHTTPLoads NSIncludesSubdomains
  2. AdMob plugin caches the first unit of a type and it looks like interstitial and rewarded_video happens to be from the same type… so just removing the test_unit solved my problem.
    Thats it. Hope this saves few hours to someone :slight_smile:

1 Like

Did u get reward video callbacks (when user skips the video in between or when completes the video to add price).?

Yes, you just need to cache every time after an ad is loaded.

I will try that. AlthoughI couldn’t receive callbacks in case of cocos creator.