Game will fail to build if Admob is integrated

Hello Gdevelop friends!

I have completed a super fun and addicting game yet again using GDevelop. Problem is that when I have my admob code integrated, it fails to build successfully. I have tested this both for Android, and IOS. When I disable all the admob code, it runs smooth as butter and I can successfully download it onto my phone. After following the correct steps and attempting to build it using cordova followed by Xcode, the errors I get when I have the Admob code integrated are:

/Users/user/Desktop/GB_IOS2/platforms/ios/GummyInvaders/Plugins/cordova-admob-plus/AMSPlugin-Bridging-Header.h:2:9: error: ‘GoogleMobileAds/GoogleMobileAds.h’ file not found
#import <GoogleMobileAds/GoogleMobileAds.h>
1 error generated.
:0: error: failed to emit precompiled header ‘/Users/user/Library/Developer/Xcode/DerivedData/GummyInvaders-edxofrqgbdfavgcjhidplrrfziot/Build/Intermediates.noindex/PrecompiledHeaders/Bridging-Header-swift_QYYYR72AURLY-clang_308FH8N4D1J4G.pch’ for bridging header ‘/Users/user/Desktop/GB_IOS2/platforms/ios/GummyInvaders/Bridging-Header.h’
/Users/user/Desktop/GB_IOS2/platforms/ios/GummyInvaders/Bridging-Header.h:29:9: note: in file included from /Users/user/Desktop/GB_IOS2/platforms/ios/GummyInvaders/Bridging-Header.h:29:
#import “AMSPlugin-Bridging-Header.h”

Hi and welcome back :slight_smile:
Are you building your game with the Admob actions available in GDevelop?
Have you tried using the GDevelop online build service?

Hi Gruk, it’s good to be back.

Yes. The situation is as follows: when the admob actions available in GDevelop are not used or toggled off, I can go through the build actions using cordova, and xcode, and it works just fine on IOS devices.

When they are enabled, and I try to add the cordova platform through the terminal, I get the following message

I make sure to install cocoapods beforehand, but yet it still fails. The last errors occur when I try to build using the “cordova build ios” command and it shows the following:

By online build services do you mean generating a link on Liluo?

Ah, iOS… Can’t help you with that.
I meant using the online APK packager.

Yeah it seems no one really knows how to get IOS related stuff working. We have Apple to thank for that.
I did use the APK packager and it would not open on Android devices. There was an error code it would exit the app immediately.

And the error code was… ?
Can you share a dummy project reproducing the issue?
There shouldn’t be any issue with the GDevelop APK builder and Admob.

I figured it out, its complicated.

Hey, I have the same problem here. What did you do to fix this?

The short answer is install cocoapods/ make sure it is up to date. Same goes for Cordova. Then, instead of building it in the command line, open up the xcode.workspace file. Change the target IOS to 12.0 in general or build settings, and pray that God smiles upon you when you press run.

I don’t get it working. Is there something else that you did?

Hi, Did you also change things in your files? I really don’t get it working.

I continue this discussion.
So any update ? I have the same issues