My app crashes on screen launch - Unity 2017.2.0f3 and Xcode 10.2 (10E125)

Hello guys,

I don’t usually ask on any forum so i’m kinda new here. So, I am trying to build my game on Xcode 10.2 (10E125) from Unity 2017.2.0f3 and I’m getting these errors on Xcode. My build on Unity always finishes as succeded and the game works perfectly on the editor… I would like to know if any of you had the same problem as me and if you have a solution I would be very very happy.

By the way, I can build on Xcode aswell on my iPhone 8Plus iOS 12.2 but it crashes when I try to launch the game.

Thank you very much, Alex.

2019-04-11 14:57:44.309712+0200 AppName[1970:696029] [DYMTLInitPlatform] platform initialization successful
2019-04-11 14:57:44.334457+0200 AppName[1970:695878] UnityIAP UnityEarlyTransactionObserver: Created
2019-04-11 14:57:44.335307+0200 AppName[1970:695878] UnityIAP UnityEarlyTransactionObserver: Registered for lifecycle events
CrashReporter: initialized
2019-04-11 14:57:44.398434+0200 AppName[1970:695878] → registered mono modules 0x103bcdbf0
→ applicationDidFinishLaunching()
Player data archive not found at /var/containers/Bundle/Application/6B4A0241-D08E-4BC2-B7BC-175EC1AFAFA8/AppName.app/Data/data.unity3d, using local filesystem
2019-04-11 14:57:45.031595+0200 AppName[1970:695878] Metal GPU Frame Capture Enabled
2019-04-11 14:57:45.031977+0200 AppName[1970:695878] Metal API Validation Disabled
2019-04-11 14:57:45.560352+0200 AppName[1970:695878] [Warning] Trying to set delaysTouchesBegan to NO on a system gate gesture recognizer - this is unsupported and will have undesired side effects
2019-04-11 14:57:45.565506+0200 AppName[1970:695878] UnityIAP UnityEarlyTransactionObserver: Added to the payment queue
2019-04-11 14:57:45.568833+0200 AppName[1970:696024] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2019-04-11 14:57:45.572722+0200 AppName[1970:696024]
[MC] Reading from public effective user settings.
2019-04-11 14:57:45.688838+0200 AppName[1970:695878] Uncaught exception: GADInvalidInitializationException: The Google Mobile Ads SDK was initialized incorrectly. Google AdMob publishers should follow instructions here: https://googlemobileadssdk.page.link/admob-ios-update-plist to include the AppMeasurement framework, set the -ObjC linker flag, and set GADApplicationIdentifier with a valid App ID. Google Ad Manager publishers should follow instructions here: https://googlemobileadssdk.page.link/ad-manager-ios-update-plist
(
0 CoreFoundation 0x00000001ce480530 + 252
1 libobjc.A.dylib 0x00000001cd65b9f8 objc_exception_throw + 56
2 CoreFoundation 0x00000001ce39dec0 + 0
3 AppName 0x00000001031d4654 GADVerifyApplicationID + 152
4 AppName 0x00000001031d52b8 GADVerifyApplicationID + 3324
5 libdispatch.dylib 0x00000001cdec0a38 + 24
6 libdispatch.dylib 0x00000001cdec17d4 + 16
7 libdispatch.dylib 0x00000001cdea19e4 + 1008
8 CoreFoundation 0x00000001ce411ec0 + 12
9 CoreFoundation 0x00000001ce40cdf8 + 1924
10 CoreFoundation 0x00000001ce40c354 CFRunLoopRunSpecific + 436
11 GraphicsServices 0x00000001d060c79c GSEventRunModal + 104
12 UIKitCore 0x00000001fa9f7b68 UIApplicationMain + 212
13 AppName 0x0000000102a2da10 main + 160
14 libdyld.dylib 0x00000001cded28e0 + 4
)

like the error says, you have to set GADApplicationIdentifier in the xcode plist settings

hopefully theres a way to do it in unity, as it is very annoying having to do that every build

I finally found a solution! I made 2 things to build correctly…
As max-pi said GADApplicationIdentifier was one of them. I opened the Info.plist archive and I wrote the appID on GADApplicationIdentifier but doing that I still had one issue with pods…

The other one was a problem with the Google AdMob SDK:

target ‘Unity-iPhone’ do

pod ‘Google-Mobile-Ads-SDK’, ‘~> 7.41’

end

You have to put this in the podfile which is inside your build project and make a simple “pod install” instruction on the terminal and that’s it.

I didn’t have to do that with my other projects but well hope someone find this usefull