iOS Build Environment Help Center

App won't start with Admob

append delete cancan2

I build with Admob and when I start the game, I get this error and the game does not open.

I try to build with different admob sdks and try different unity versions. (2020-2022)
I made the necessary admob additions in info.plist.
_ <key>SKAdNetworkIdentifier</key>_
_ <string>cstr6suwn9.skadnetwork</string>_
_<key>GADApplicationIdentifier</key> _
_<string>ca-app-pub-1231231231231234~123123123</string> _
_<key>GADDelayAppMeasurementInit</key> _
_<true /> _
_<key>NSUserTrackingUsageDescription</key> _
_<string>This identifier will be used to deliver personalized ads to you.</string> _

Also, I have been building with Admob for 2-3 years without any problems. But as I said in this new game, the game does not open. If I delete admob it works fine. Thank you <3

-------------

My Flags:
-F"C:/Users/kandi/Desktop/SDK_ios/Google-Mobile-Ads-SDK_10_3/GoogleMobileAds.xcframework/ios-arm64_armv7"
-F"C:/Users/kandi/Desktop/SDK_ios/Google-Mobile-Ads-SDK_10_3/UserMessagingPlatform.xcframework/ios-arm64_armv7"

Extra Linkers;
-F"C:/Users/kandi/Desktop/SDK_ios/Google-Mobile-Ads-SDK_10_3"
-framework GoogleMobileAds
-framework JavaScriptCore
-framework MediaPlayer
-framework MessageUI
-framework MobileCoreServices
-framework SafariServices
-framework WebKit
-lsqlite3
-lz
-framework UserMessagingPlatform
-ObjC

-------------

Podfile
source 'https://github.com/CocoaPods/Specs'
source 'https://cdn.cocoapods.org/'

platform :ios, '11.0'

target 'UnityFramework' do
pod 'Google-Mobile-Ads-SDK', '~> 10.3'
end
target 'Unity-iPhone' do
end

-------------

Error Log
*Oct 10 07:55:55.961 RemoteConsole <stderr>: 2023-10-10 07:55:56.574 GameRace[11281:37351665] UnityIAP UnityEarlyTransactionObserver: Added to the payment queue
Oct 10 07:55:55.966 RemoteConsole <stdout>: CrashReporter: initialized
Oct 10 07:55:55.966 RemoteConsole <stdout>: CrashReporter: saved pending crash report.
Oct 10 07:55:55.966 RemoteConsole <stdout>: CrashReporter: saved copy of pending crash report.
Oct 10 07:55:55.966 RemoteConsole <stdout>: -> applicationDidFinishLaunching()
Oct 10 07:55:55.966 RemoteConsole <stdout>:
Oct 10 07:55:55.966 RemoteConsole <stdout>: Setting UIViewControllerBasedStatusBarAppearance to NO is no longer supported.
Oct 10 07:55:55.966 RemoteConsole <stdout>: Apple actively discourages that, and all application-wide methods of changing status bar appearance are deprecated
Oct 10 07:55:55.966 RemoteConsole <stdout>:
Oct 10 07:55:55.966 RemoteConsole <stderr>: 2023-10-10 07:55:56.579 GameRace[11281:37351701] Uncaught exception: GADInvalidInitializationException: The Google Mobile Ads SDK was initialized without AppMeasurement. Google AdMob publishers, follow instructions here: https://googlemobileadssdk.page.link/admob-ios-update-plist to include the AppMeasurement framework and set the -ObjC linker flag. Google Ad Manager publishers, follow instructions here: https://googlemobileadssdk.page.link/ad-manager-ios-update-plist
Oct 10 07:55:55.966 RemoteConsole <stderr>: (
Oct 10 07:55:55.966 RemoteConsole <stderr>: 0 CoreFoundation 0x0000000181519d8c D2716F2F-688B-3D51-BA8B-17E6553B209E + 630156
Oct 10 07:55:55.966 RemoteConsole <stderr>: 1 libobjc.A.dylib 0x000000019a17e734 objc_exception_throw + 60
Oct 10 07:55:55.966 RemoteConsole <stderr>: 2 CoreFoundation 0x00000001815f0fcc D2716F2F-688B-3D51-BA8B-17E6553B209E + 1511372
Oct 10 07:55:55.966 RemoteConsole <stderr>: 3 UnityFramework 0x000000010ba0dc60 GADApplicationVerifyPublisherInitializedCorrectly + 296
Oct 10 07:55:55.966 RemoteConsole <stderr>: 4 UnityFramework 0x000000010ba0de1c GADApplicationVerifyPublisherInitializedCorrectly + 740*

Reply RSS

Replies

append delete #1. Pierre-Marie Baty

Hello

Just do what the log says :

[…] *include the AppMeasurement framework* and set the -ObjC linker flag […]

append delete #2. cancan2

Hello,
I did it but now i can't build.

It gives a very long error but it seems like this keeps repeating.
*Error*

C:\Users\kandi\iOS Project Builder for Unity\SDK\usr\lib\swift\Dispatch.swiftmodule\arm64-apple-ios.swiftinterface:778:59: error: no type named 'DispatchSource' in module 'Dispatch'
public func dispatch_source_get_handle(_ source: Dispatch.DispatchSource) -> Swift.UInt
^
C:\Users\kandi\iOS Project Builder for Unity\SDK\usr\lib\swift\Dispatch.swiftmodule\arm64-apple-ios.swiftinterface:780:57: error: no type named 'DispatchSource' in module 'Dispatch'
public func dispatch_source_get_mask(_ source: Dispatch.DispatchSource) -> Swift.UInt
^
C:\Users\kandi\iOS Project Builder for Unity\SDK\usr\lib\swift\Dispatch.swiftmodule\arm64-apple-ios.swiftinterface:782:57: error: no type named 'DispatchSource' in module 'Dispatch'
public func dispatch_source_get_data(_ source: Dispatch.DispatchSource) -> Swift.UInt
^
C:\Users\kandi\iOS Project Builder for Unity\SDK\usr\lib\swift\Dispatch.swiftmodule\arm64-apple-ios.swiftinterface:784:59: error: no type named 'DispatchSource' in module 'Dispatch'
public func dispatch_source_merge_data(_ source: Dispatch.DispatchSource, _ value: Swift.UInt)
^
C:\Users\kandi\iOS Project Builder for Unity\SDK\usr\lib\swift\Dispatch.swiftmodule\arm64-apple-ios.swiftinterface:786:58: error: no type named 'DispatchSource' in module 'Dispatch'
public func dispatch_source_set_timer(_ source: Dispatch.DispatchSource, _ start: Dispatch.dispatch_time_t, _ interval: Swift.UInt64, _ leeway: Swift.UInt64)
^
C:\Users\kandi\iOS Project Builder for Unity\SDK\usr\lib\swift\Dispatch.swiftmodule\arm64-apple-ios.swiftinterface:788:73: error: no type named 'DispatchSource' in module 'Dispatch'
public func dispatch_source_set_registration_handler(_ source: Dispatch.DispatchSource, _ handler: (() -> Swift.Void)?)
^
+ [arm64] Linking UnityFramework...
ld64.lld: warning: directory not found for option -LC:/Users/kandi/Desktop/Render/ios/GameRace/$(BUILT_PRODUCTS_DIR)
ld64.lld: error: cannot open build/Release-iphoneos/UnityFramework/arm64/Libraries/com.unity.ads/Plugins/iOS/UnityAdvertisement.swift.obj: no such file or directory
ld64.lld: error: cannot open build/Release-iphoneos/UnityFramework/arm64/Dummy.swift.obj: no such file or directory

append delete #3. Pierre-Marie Baty

Upgrade your builder and iOS SDK.

P.S. Next time post the requested info.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty