[BUG] Error compiling Godot for iOS with module for version 3.2.3
See original GitHub issueDescribe the bug Trying to compile for ios but getting this error at 9%: `anischandoul@aniss-MacBook-Pro godot-3.2.3-stable % scons p=iphone tools=no target=release arch=arm scons: Reading SConscript files … Checking for C header file mntent.h… (cached) no scons: done reading SConscript files. scons: Building targets … [ 9%] Compiling ==> modules/admob/src/AdMob.mm clang: warning: optimization flag ‘-fomit-frame-pointer’ is not supported for target ‘armv7’ [-Wignored-optimization-argument] In file included from modules/admob/src/AdMob.mm:1: In file included from modules/admob/src/AdMob.h:7: modules/admob/src/Interstitial.h:9:36: error: no type or protocol named ‘GADInterstitialDelegate’ [25] @interface Interstitial: NSObject <GADInterstitialDelegate> { ^ modules/admob/src/Interstitial.h:10:5: error: unknown type name ‘GADInterstitial’; did you mean ‘GADInterstitialAd’? [2] GADInterstitial *interstitial; ^~~~~~~~~~~~~~~ GADInterstitialAd fix-it:“modules/admob/src/Interstitial.h”:{10:5-10:20}:“GADInterstitialAd” modules/admob/lib/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADInterstitialAd.h:28:12: note: ‘GADInterstitialAd’ declared here [2] @interface GADInterstitialAd : NSObject <GADFullScreenPresentingAd> ^ In file included from modules/admob/src/AdMob.mm:1: In file included from modules/admob/src/AdMob.h:8: modules/admob/src/Rewarded.h:10:32: error: no type or protocol named ‘GADRewardedAdDelegate’ [25] @interface Rewarded: NSObject <GADRewardedAdDelegate> { ^ In file included from modules/admob/src/AdMob.mm:6: In file included from modules/admob/lib/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GoogleMobileAds.h:40: In file included from modules/admob/lib/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADCustomNativeAd.h:11: modules/admob/lib/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaView.h:27:1: warning: no ‘assign’, ‘retain’, or ‘copy’ attribute is specified - ‘assign’ is assumed [-Wobjc-property-no-attribute,2] @property(nonatomic, nullable) GADMediaContent *mediaContent; ^ modules/admob/lib/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/Headers/GADMediaView.h:27:1: warning: default property attribute ‘assign’ not appropriate for object [-Wobjc-property-no-attribute,2] In file included from modules/admob/src/AdMob.mm:8: In file included from modules/admob/lib/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UserMessagingPlatform.h:1: In file included from modules/admob/lib/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPConsentForm.h:1: In file included from modules/admob/lib/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPConsentInformation.h:3: In file included from modules/admob/lib/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPRequestParameters.h:1: modules/admob/lib/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPDebugSettings.h:15:1: warning: no ‘assign’, ‘retain’, or ‘copy’ attribute is specified - ‘assign’ is assumed [-Wobjc-property-no-attribute,2] @property(nonatomic, nullable) NSArray<NSString *> *testDeviceIdentifiers; ^ modules/admob/lib/UserMessagingPlatform.xcframework/ios-arm64_armv7/UserMessagingPlatform.framework/Headers/UMPDebugSettings.h:15:1: warning: default property attribute ‘assign’ not appropriate for object [-Wobjc-property-no-attribute,2] modules/admob/src/AdMob.mm:84:60: warning: ‘stringWithCString:’ is deprecated: first deprecated in iOS 2.0 - Use +stringWithCString:encoding: instead [-Wdeprecated-declarations,32] debugSettings.testDeviceIdentifiers = @[ [NSString stringWithCString: getDeviceId()] ]; ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:525:1: note: ‘stringWithCString:’ has been explicitly marked deprecated here [2]
- (nullable id)stringWithCString:(const char *)bytes API_DEPRECATED(“Use +stringWithCString:encoding: instead”, macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0)); ^ modules/admob/src/AdMob.mm:124:104: warning: ‘stringWithCString:’ is deprecated: first deprecated in iOS 2.0 - Use +stringWithCString:encoding: instead [-Wdeprecated-declarations,32] GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @ [ [NSString stringWithCString: getDeviceId()] ]; ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:525:1: note: ‘stringWithCString:’ has been explicitly marked deprecated here [2]
- (nullable id)stringWithCString:(const char *)bytes API_DEPRECATED(“Use +stringWithCString:encoding: instead”, macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0)); ^ modules/admob/src/AdMob.mm:125:87: warning: ‘stringWithCString:’ is deprecated: first deprecated in iOS 2.0 - Use +stringWithCString:encoding: instead [-Wdeprecated-declarations,32] NSLog(@“on Testing Real Device: testDeviceIdentifiers: %@”, [NSString stringWithCString: getDeviceId()]); ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h:525:1: note: ‘stringWithCString:’ has been explicitly marked deprecated here [2]
- (nullable id)stringWithCString:(const char *)bytes API_DEPRECATED(“Use +stringWithCString:encoding: instead”, macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0)); ^ modules/admob/src/AdMob.mm:158:56:{158:56-158:75}{158:34-158:41}: warning: enum values with underlying type ‘NSInteger’ should not be used as format arguments; add an explicit cast to ‘long’ instead [-Wformat,33] NSLog(@“%s : %ld”, “GADMobileAds”, adapterStatus.state); ~~~ ^~~~~~~~~~~~~~~~~~~ %ld (long) fix-it:“modules/admob/src/AdMob.mm”:{158:34-158:37}:“%ld” fix-it:“modules/admob/src/AdMob.mm”:{158:56-158:56}:“(long)” modules/admob/src/AdMob.mm:172:52:{172:52-172:71}{172:30-172:37}: warning: enum values with underlying type ‘NSInteger’ should not be used as format arguments; add an explicit cast to ‘long’ instead [-Wformat,33] NSLog(@“%s : %ld”, “GADMobileAds”, adapterStatus.state); ~~~ ^~~~~~~~~~~~~~~~~~~ %ld (long) fix-it:“modules/admob/src/AdMob.mm”:{172:30-172:33}:“%ld” fix-it:“modules/admob/src/AdMob.mm”:{172:52-172:52}:“(long)” 9 warnings and 3 errors generated. scons: *** [modules/admob/src/AdMob.iphone.opt.arm.o] Error 1 scons: building terminated because of errors. anischandoul@aniss-MacBook-Pro godot-3.2.3-stable % `
before this error there was another error about on interstitial.h: #import <GoogleMobileAds/GADInterstitial.h> I changed it to #import <GoogleMobileAds/GADInterstitialAd.h>
To Reproduce terminal and scons p=iphone tools=no target=release arch=arm tried with master and 3.0_3.2.3 branch and GoogleMobileAdsSdkiOS-8.3.0 and 7.69.0
Smartphone (please complete the following information):
- OS: Big Sur 11.2.3
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
I’m going to delete everything and start from a clean slate, will get back to you tomorrow but I did try both library tho. thank you for getting back to me
Only iOS have this issue, Android will work fine without add the app on AdMob website.
To fix this you need to publish your game to App Store and wait to appear to add, it can take some days.
I strong recommend you to use only one Plugin, using two plugin to the same thing it’s not recommended.