Googleads-mobile-unity: SDK tried to perform a networking task before being initialized [iOS] [Podfile]

Created on 12 Jan 2021  路  2Comments  路  Source: googleads/googleads-mobile-unity

[REQUIRED] Step 1: Describe your environment
Unity version: 2019.4.17
Google Mobile Ads Unity plugin version: 5.4.0
Platform: iOS
Platform OS version: iOS 14

[REQUIRED] Step 2: Describe the problem

Admob does not work for iOS, the same code works just fine for Android.
I'm currently using v5.4.0 of this plugin, which was tested with the iOS SDK 7.68.0.

The plugin displays this message "SDK tried to perform a networking task before being initialized" if such lines are added to the podfile.

target 'Unity-iPhone' do
end

It works fine when there are no such lines, but I really need it for another Snapchat plugin I use in the project which doesn't work without it.

The whole podfile looks like this:

source 'https://github.com/CocoaPods/Specs'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'

target 'UnityFramework' do
pod 'SnapSDK', '1.6.8', :subspecs => ['SCSDKLoginKit', 'SCSDKCreativeKit']
pod 'Google-Mobile-Ads-SDK', '~> 7.68'
end

target 'Unity-iPhone' do
pod 'SnapSDK', '1.6.8', :subspecs => ['SCSDKLoginKit', 'SCSDKCreativeKit']
end

Steps to reproduce:

  • add 5.4.0 Admob plugin version;
  • make the build for iOS;
  • add to the Podfile following lines:
    target 'Unity-iPhone' do
    end
  • do pod install
  • make a build
  • try to load ads

    1

Most helpful comment

Adding this to the podfile fixed the issue
use_frameworks! :linkage => :static

All 2 comments

Same issue here. Where you able to solve it?

Adding this to the podfile fixed the issue
use_frameworks! :linkage => :static

Was this page helpful?
0 / 5 - 0 ratings