Giter Club home page Giter Club logo

godot-admob-android's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot-admob-android's Issues

[FEATURE] Add export to Android and iOS

Steps:

  • Create the .yml file
  • Download and Extract the "*stable_linux_headless.64.zip"
  • Download and Extract the "*stable_export_templates.tpz"
  • Extract the "android_source.zip" from .tpz, to "examples/android/build"

[BUG] [IOS]adView:didFailToReceiveAdWithError: Request Error: No ad to show.

On android it works great with this plugin
This issue is only on IOS
When I use the test app id and unit id I get the test ad showing but when I change the ids to mine nothing shows and I have this error:
Invalid Request. Cannot determine request type. Is your ad unit id correct?
adView:didFailToReceiveAdWithError: Request Error: No ad to show.
interstitial:didFailToReceiveAdWithError: Request Error: No ad to show.
I'm using those same ids with Shin-NiL plugin and the ads are showing. so I'm pretty sure I did something work while implementing the plugin
An other question: How can I print the error code number ?

Banner appear

Xcode is returning
Error Thread 1: EXC_BAD_ACCESS (code=1, address=0x40)

When enable banner ads

[FEATURE] Add gravity banner as the same of iOS code

The banner layout params have a gravity param, that define the position of the banner: https://developer.android.com/reference/android/view/Gravity, the variables that sets the gravity is being setted on GD code, the value of the variables are the constant value of gravity position.

The objective is do the same as are on Android, but the constants on iOS are very different, so the option now is doing with some if case or switch case

  • BOTTOM
  • TOP
  • CENTER
  • NO GRAVITY

the center and no gravity could be removed to Android version if not very good use

How do I use the code for this module

Hello, I am a bit confused on how to implement the ad code with this module, also, do I need to do anything with the debug.a and release.a files?

[BUG] EGL_BAD_DISPLAY error

Describe the bug
With latest admob scene game freezes on startup with 03-23 15:35:42.255 3192-3504/com.luminarcy.echoes E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY) error

To Reproduce
Steps to reproduce the behavior:

  1. Enable and configure admob scene.
  2. Deploy game to device.
  3. See error.

Expected behavior
Game should not freeze.

Screenshots
image

Smartphone (please complete the following information):

  • Device: Xiaomi Redmi Note 4X
  • OS: Android
  • Version 6.0

[BUG] Error compiling Godot for iOS with module for version 3.2.4 beta 5

Describe the bug
I'm trying to compile godot using Godot-AdMob-Android-iOS as a module, but I'm getting forward declaration errors in the iOS source:

Screen Shot 2021-01-11 at 10 03 26 PM

To Reproduce
Steps to reproduce the behavior:

  1. Place ios/admob contents into godot/modules/admob
  2. Place google *.framework directories into godot/modules/admob/lib
  3. Run scons p=iphone target=debug

Expected behavior
Builds an ios *.a file

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Latest Godot-AdMob-Android-iOS as of this writing
  • Latest godot from git

[BUG] MultiDex error | Does this work with 3.3 stable ?

Describe the bug
On my project I have firebase and facebook (DrMoriarty), it build and run but every time I add this plugin I get this error :
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.

Smartphone (please complete the following information):
I'm building on an android S9 using macos

Destroy the Banner

Must do it to avoid the error: Multiple locks on web thread not allowed

How do it: removeFromSuperview the bannerView and set nil on him

[BUG] framework not found

When trying to build with xcode 12.4 with godot 3.2.3 stable xcode show an error : Framework not found GoogleAppMeasurement

I tryied deleting and adding the framework several times and is not working, also adding the framework from general, frameworks, libraries, and embededded content is the same.

  • Device: Iphone 8 plus
  • OS: Mac OS catalina 10.15.6
  • Version 3.2.3 stable

[BUG] Fix warnings compile iOS

modules/admob/src/AdMob.mm:36:13:{36:13-36:24}: warning: receiver 'AdMobBanner' is a forward class and corresponding @interface may not exist [-Wreceiver-forward-class,2]
banner = [[AdMobBanner alloc] init];
^~~~~~~~~~~
modules/admob/src/AdMob.h:8:8: note: forward declaration of class here [2]
@Class AdMobBanner;
^
/Applications/Xcode_12.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/objc/NSObject.h:71:1: note: method 'alloc' is used for the forward class [2]

  • (instancetype)alloc OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
    ^
    modules/admob/src/AdMob.mm:36:32: warning: 'init' is deprecated: first deprecated in iOS 10.0 - Use initWithActivityType: with a specific activity type string [-Wdeprecated-declarations,32]
    banner = [[AdMobBanner alloc] init];
    ^
    /Applications/Xcode_12.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserActivity.h:28:1: note: 'init' has been explicitly marked deprecated here [2]
  • (instancetype)init API_DEPRECATED("Use initWithActivityType: with a specific activity type string", macosx(10.10, 10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
    ^
    modules/admob/src/AdMob.mm:37:10:{37:10-37:34}: warning: instance method '-initialize::' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [banner initialize :instance_id: is_personalized];
    ^~~~~~~~~~~~~~~~~~~~~~~~
    modules/admob/src/AdMob.h:8:8: note: receiver is instance of class declared here [2]
    @Class AdMobBanner;
    ^
    modules/admob/src/AdMob.mm:39:19:{39:19-39:36}: warning: receiver 'AdMobInterstitial' is a forward class and corresponding @interface may not exist [-Wreceiver-forward-class,2]
    interstitial = [[AdMobInterstitial alloc] init];
    ^~~~~~~~~~~~~~~~~
    modules/admob/src/AdMob.h:10:8: note: forward declaration of class here [2]
    @Class AdMobInterstitial;
    ^
    /Applications/Xcode_12.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/objc/NSObject.h:71:1: note: method 'alloc' is used for the forward class [2]
  • (instancetype)alloc OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
    ^
    modules/admob/src/AdMob.mm:39:44: warning: 'init' is deprecated: first deprecated in iOS 10.0 - Use initWithActivityType: with a specific activity type string [-Wdeprecated-declarations,32]
    interstitial = [[AdMobInterstitial alloc] init];
    ^
    /Applications/Xcode_12.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserActivity.h:28:1: note: 'init' has been explicitly marked deprecated here [2]
  • (instancetype)init API_DEPRECATED("Use initWithActivityType: with a specific activity type string", macosx(10.10, 10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
    ^
    modules/admob/src/AdMob.mm:40:16:{40:16-40:41}: warning: instance method '-initialize::' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [interstitial initialize :instance_id : is_personalized];
    ^~~~~~~~~~~~~~~~~~~~~~~~~
    modules/admob/src/AdMob.h:10:8: note: receiver is instance of class declared here [2]
    @Class AdMobInterstitial;
    ^
    modules/admob/src/AdMob.mm:42:15:{42:15-42:28}: warning: receiver 'AdMobRewarded' is a forward class and corresponding @interface may not exist [-Wreceiver-forward-class,2]
    rewarded = [[AdMobRewarded alloc] init];
    ^~~~~~~~~~~~~
    modules/admob/src/AdMob.h:12:8: note: forward declaration of class here [2]
    @Class AdMobRewarded;
    ^
    /Applications/Xcode_12.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/objc/NSObject.h:71:1: note: method 'alloc' is used for the forward class [2]
  • (instancetype)alloc OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
    ^
    modules/admob/src/AdMob.mm:42:36: warning: 'init' is deprecated: first deprecated in iOS 10.0 - Use initWithActivityType: with a specific activity type string [-Wdeprecated-declarations,32]
    rewarded = [[AdMobRewarded alloc] init];
    ^
    /Applications/Xcode_12.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserActivity.h:28:1: note: 'init' has been explicitly marked deprecated here [2]
  • (instancetype)init API_DEPRECATED("Use initWithActivityType: with a specific activity type string", macosx(10.10, 10.12), ios(8.0,10.0), watchos(2.0,3.0), tvos(9.0,10.0));
    ^
    modules/admob/src/AdMob.mm:43:12:{43:12-43:37}: warning: instance method '-initialize::' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [rewarded initialize :instance_id : is_personalized];
    ^~~~~~~~~~~~~~~~~~~~~~~~~
    modules/admob/src/AdMob.h:12:8: note: receiver is instance of class declared here [2]
    @Class AdMobRewarded;
    ^
    modules/admob/src/AdMob.mm:55:10:{55:10-55:53}: warning: instance method '-load_banner:::' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [banner load_banner: ad_unit_id_NSString : gravity: size_NSString];
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    modules/admob/src/AdMob.h:8:8: note: receiver is instance of class declared here [2]
    @Class AdMobBanner;
    ^
    modules/admob/src/AdMob.mm:62:10:{62:10-62:24}: warning: instance method '-destroy_banner' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [banner destroy_banner];
    ^~~~~~~~~~~~~~
    modules/admob/src/AdMob.h:8:8: note: receiver is instance of class declared here [2]
    @Class AdMobBanner;
    ^
    modules/admob/src/AdMob.mm:72:16:{72:16-72:33}: warning: instance method '-load_interstitial:' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [interstitial load_interstitial: ad_unit_id_NSString];
    ^~~~~~~~~~~~~~~~~
    modules/admob/src/AdMob.h:10:8: note: receiver is instance of class declared here [2]
    @Class AdMobInterstitial;
    ^
    modules/admob/src/AdMob.mm:79:16:{79:16-79:33}: warning: instance method '-show_interstitial' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [interstitial show_interstitial];
    ^~~~~~~~~~~~~~~~~
    modules/admob/src/AdMob.h:10:8: note: receiver is instance of class declared here [2]
    @Class AdMobInterstitial;
    ^
    modules/admob/src/AdMob.mm:89:12:{89:12-89:25}: warning: instance method '-load_rewarded:' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [rewarded load_rewarded: ad_unit_id_NSString];
    ^~~~~~~~~~~~~
    modules/admob/src/AdMob.h:12:8: note: receiver is instance of class declared here [2]
    @Class AdMobRewarded;
    ^
    modules/admob/src/AdMob.mm:96:12:{96:12-96:25}: warning: instance method '-show_rewarded' not found (return type defaults to 'id') [-Wobjc-method-access,2]
    [rewarded show_rewarded];
    ^~~~~~~~~~~~~
    modules/admob/src/AdMob.h:12:8: note: receiver is instance of class declared here [2]
    @Class AdMobRewarded;
    ^
    15 warnings generated.
    Compiling ==> modules/admob/src/AdMobBanner.mm
    clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
    In file included from modules/admob/src/AdMobBanner.mm:1:
    modules/admob/src/AdMobBanner.h:15:25: warning: 'instance_id' used as the name of the previous parameter rather than as part of the selector [-Wmissing-selector-name,4]
  • (void)initialize:(int)instance_id:(bool)is_personalized;
    ^
    modules/admob/src/AdMobBanner.h:15:25: note: introduce a parameter name to make 'instance_id' part of the selector [4]
    modules/admob/src/AdMobBanner.h:15:36: note: or insert whitespace before ':' to use 'instance_id' as parameter name and have an empty entry in the selector [4]
  • (void)initialize:(int)instance_id:(bool)is_personalized;
    ^
    modules/admob/src/AdMobBanner.mm:30:9:{30:9-30:19}: warning: format string is not a string literal (potentially insecure) [-Wformat-security,33]
    NSLog(ad_unit_id);
    ^~~~~~~~~~
    modules/admob/src/AdMobBanner.mm:30:9: note: treat the string as an argument to avoid this [2]
    NSLog(ad_unit_id);
    ^
    @"%@",
    fix-it:"modules/admob/src/AdMobBanner.mm":{30:9-30:9}:"@"%@", "
    modules/admob/src/AdMobBanner.mm:79:3: warning: local declaration of 'bannerView' hides instance variable [-Wshadow-ivar,2]
    bannerView.translatesAutoresizingMaskIntoConstraints = NO;
    ^
    modules/admob/src/AdMobBanner.mm:80:35: warning: local declaration of 'bannerView' hides instance variable [-Wshadow-ivar,2]
    [rootController.view addSubview:bannerView];
    ^
    modules/admob/src/AdMobBanner.mm:82:44: warning: local declaration of 'bannerView' hides instance variable [-Wshadow-ivar,2]
    [NSLayoutConstraint constraintWithItem:bannerView
    ^
    modules/admob/src/AdMobBanner.mm:89:44: warning: local declaration of 'bannerView' hides instance variable [-Wshadow-ivar,2]
    [NSLayoutConstraint constraintWithItem:bannerView
    ^
    6 warnings generated.
    Compiling ==> modules/admob/src/AdMobInterstitial.mm
    clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
    In file included from modules/admob/src/AdMobInterstitial.mm:1:
    modules/admob/src/AdMobInterstitial.h:14:26: warning: 'instance_id' used as the name of the previous parameter rather than as part of the selector [-Wmissing-selector-name,4]
  • (void)initialize: (int)instance_id: (bool)is_personalized;
    ^
    modules/admob/src/AdMobInterstitial.h:14:26: note: introduce a parameter name to make 'instance_id' part of the selector [4]
    modules/admob/src/AdMobInterstitial.h:14:37: note: or insert whitespace before ':' to use 'instance_id' as parameter name and have an empty entry in the selector [4]
  • (void)initialize: (int)instance_id: (bool)is_personalized;
    ^
    modules/admob/src/AdMobInterstitial.mm:28:9:{28:9-28:19}: warning: format string is not a string literal (potentially insecure) [-Wformat-security,33]
    NSLog(ad_unit_id);
    ^~~~~~~~~~
    modules/admob/src/AdMobInterstitial.mm:28:9: note: treat the string as an argument to avoid this [2]
    NSLog(ad_unit_id);
    ^
    @"%@",
    fix-it:"modules/admob/src/AdMobInterstitial.mm":{28:9-28:9}:"@"%@", "
    modules/admob/src/AdMobInterstitial.mm:33:8:{33:8-33:18}: warning: format string is not a string literal (potentially insecure) [-Wformat-security,33]
    NSLog(ad_unit_id);
    ^~~~~~~~~~
    modules/admob/src/AdMobInterstitial.mm:33:8: note: treat the string as an argument to avoid this [2]
    NSLog(ad_unit_id);
    ^
    @"%@",
    fix-it:"modules/admob/src/AdMobInterstitial.mm":{33:8-33:8}:"@"%@", "
    3 warnings generated.
    Compiling ==> modules/admob/src/AdMobRewarded.mm
    clang: warning: optimization flag '-fomit-frame-pointer' is not supported for target 'armv7' [-Wignored-optimization-argument]
    In file included from modules/admob/src/AdMobRewarded.mm:1:
    In file included from modules/admob/src/AdMobRewarded.h:1:
    modules/admob/lib/GoogleMobileAds.xcframework/ios-armv7_arm64/GoogleMobileAds.framework/Headers/GADRewardedAd.h:53:1: warning: no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed [-Wobjc-property-no-attribute,2]
    @Property(nonatomic, nullable) GADServerSideVerificationOptions *serverSideVerificationOptions;
    ^
    modules/admob/lib/GoogleMobileAds.xcframework/ios-armv7_arm64/GoogleMobileAds.framework/Headers/GADRewardedAd.h:53:1: warning: default property attribute 'assign' not appropriate for object [-Wobjc-property-no-attribute,2]
    In file included from modules/admob/src/AdMobRewarded.mm:1:
    modules/admob/src/AdMobRewarded.h:14:26: warning: 'instance_id' used as the name of the previous parameter rather than as part of the selector [-Wmissing-selector-name,4]
  • (void)initialize: (int)instance_id: (bool)is_personalized;
    ^
    modules/admob/src/AdMobRewarded.h:14:26: note: introduce a parameter name to make 'instance_id' part of the selector [4]
    modules/admob/src/AdMobRewarded.h:14:37: note: or insert whitespace before ':' to use 'instance_id' as parameter name and have an empty entry in the selector [4]
  • (void)initialize: (int)instance_id: (bool)is_personalized;
    ^
    modules/admob/src/AdMobRewarded.mm:27:9:{27:9-27:19}: warning: format string is not a string literal (potentially insecure) [-Wformat-security,33]
    NSLog(ad_unit_id);
    ^~~~~~~~~~
    modules/admob/src/AdMobRewarded.mm:27:9: note: treat the string as an argument to avoid this [2]
    NSLog(ad_unit_id);
    ^
    @"%@",
    fix-it:"modules/admob/src/AdMobRewarded.mm":{27:9-27:9}:"@"%@", "
    modules/admob/src/AdMobRewarded.mm:32:8:{32:8-32:18}: warning: format string is not a string literal (potentially insecure) [-Wformat-security,33]
    NSLog(ad_unit_id);
    ^~~~~~~~~~
    modules/admob/src/AdMobRewarded.mm:32:8: note: treat the string as an argument to avoid this [2]
    NSLog(ad_unit_id);
    ^
    @"%@",
    fix-it:"modules/admob/src/AdMobRewarded.mm":{32:8-32:8}:"@"%@", "
    modules/admob/src/AdMobRewarded.mm:74:8:{74:8-74:21}: warning: format string is not a string literal (potentially insecure) [-Wformat-security,33]
    NSLog(rewardMessage);
    ^~~~~~~~~~~~~
    modules/admob/src/AdMobRewarded.mm:74:8: note: treat the string as an argument to avoid this [2]
    NSLog(rewardMessage);
    ^
    @"%@",
    fix-it:"modules/admob/src/AdMobRewarded.mm":{74:8-74:8}:"@"%@", "

[PRIORITY/FEATURE] Create a plugin editor to help use AdMob

Repository: https://github.com/Poing-Studios/Godot-AdMob-Editor-Plugin

Is your feature request related to a problem? Please describe.
The way in which Godot's AdMob attributes are handled is not so friendly to all users, an editor plugin will make data manipulation much simpler.

Describe the solution you'd like
Currently there is already a very complete editor plugin, this is the repository: https://github.com/fenix-hub/godot-engine.github-integration. Our plugin will be much simpler than this one, I believe it will only have 2 scripts

It contains 3 things that I found super interesting:

One of which is that the GitHub feature appears on the Top, next to the 2D, 3D, Script, AssetLib scene (I manually disabled 3D and AssetLib):
Captura de Tela 2021-01-09 às 00 29 45

The second thing, is that this tab is a screen for logging into GitHub and later committing, etc (in our case, it will serve to inform the data, example: AdMob Enabled, Banner Size, Unit Ids, etc.):
Captura de Tela 2021-01-09 às 00 31 17

And the last thing is to add singletons automatically (this would add "admob_api.gd" and any Script from Godot will be able to call the functions to open an interstitial, reward, etc.):
Captura de Tela 2021-01-09 às 00 34 18

Describe alternatives you've considered
Continue using "admob_api.gd" for now until complete the plugin editor

Additional context
To make this happen, it will be necessary to create a new separate repository, because to add to AssetLib you need to include the repository link, if we did in that repository you would have problems importing the plugin

[FEATURE] Easily change gdpr settings after they have already been set

Is your feature request related to a problem? Please describe.
To be gdpr compliant, it is required that the user can easily change the gdpr settings from within the app at any moment they want. For example, having a button called gdpr in the settings of your game could show the original gdpr prompt when you first launch the game. For iOS and Android

Describe the solution you'd like
Just have a function that can be called from GD that would show the gdpr prompt again.

Describe alternatives you've considered
None that I can think of

Additional context
Reference https://www.sourcepoint.com/blog/optimizing-user-opt-in-on-ios-14-idfa-changes/

[BUG] Crashing on iOS Godot 3.2.2

I tested the plugin on iOS in my iPhone 8 Plus with Godot 3.2.3 and the 3.2.3 template and is working, but Godot 3.2.3 has a huge bug with buttons delay and my game is unplayable

So tried exporting my game with Godot 3.2.2 and works perfectly, but adding the plugin with the 3.2.2 template it is crashing with the next log.

2021-01-17 16:47:42.033876-0300 frichen[501:26981] Godot Engine v3.2.2.stable.custom_build - https://godotengine.org
2021-01-17 16:47:42.034215-0300 frichen[501:27193]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-9081047336041164~6080891688
2021-01-17 16:47:42.034855-0300 frichen[501:27199]  - <Google>[I-ACS023007] Analytics v.70100000 started
2021-01-17 16:47:42.035029-0300 frichen[501:27199]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 16:47:42.041920-0300 frichen[501:27194]  - <Google>[I-ACS023171] Resetting App Measurement data
2021-01-17 16:47:42.043417-0300 frichen[501:26981] OpenGL ES 3.0 Renderer: Apple A11 GPU
2021-01-17 16:47:42.045867-0300 frichen[501:26981] fopen failed for data file: errno = 2 (No such file or directory)
2021-01-17 16:47:42.045929-0300 frichen[501:26981] Errors found! Invalidating cache...
2021-01-17 16:47:42.054845-0300 frichen[501:27195]  - <Google>[I-ACS023014] Failed to delete old database file. Error: Error Domain=NSCocoaErrorDomain Code=4 "“google-app-measurement.sql” couldn’t be removed." UserInfo={NSUserStringVariant=(
    Remove
), NSFilePath=/var/mobile/Containers/Data/Application/ECD1206A-2FE3-4B36-94E8-8B91A28C0551/Library/Application Support/Google/Measurement/google-app-measurement.sql, NSUnderlyingError=0x282394b10 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-01-17 16:47:42.580870-0300 frichen[501:26981] 
2021-01-17 16:47:42.701920-0300 frichen[501:27195]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-01-17 16:47:42.818680-0300 frichen[501:27198]  - <Google>[I-ACS023012] Analytics collection enabled
2021-01-17 16:47:42.870302-0300 frichen[501:26981] fopen failed for data file: errno = 2 (No such file or directory)
2021-01-17 16:47:42.870404-0300 frichen[501:26981] Errors found! Invalidating cache...
2021-01-17 16:47:42.875134-0300 frichen[501:26981] fopen failed for data file: errno = 2 (No such file or directory)
2021-01-17 16:47:42.875183-0300 frichen[501:26981] Errors found! Invalidating cache...
2021-01-17 16:47:43.131771-0300 frichen[501:26981] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x2838d4400
2021-01-17 16:47:43.142919-0300 frichen[501:26981] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x2838d4400'
*** First throw call stack:
(0x1970029d8 0x1ab36bb54 0x196f12bbc 0x19700501c 0x197006f8c 0x102e6afd8 0x102e6d5dc 0x105251528 0x105252e6c 0x102e6bfd0 0x10302b558 0x103e9798c 0x103133b70 0x19a1388e4 0x19a20ae04 0x196f5fb54 0x196f83420 0x196f82834 0x196f7c9f4 0x196f7bba0 0x1adcb9598 0x19986b3d8 0x199870958 0x102ffde80)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x2838d4400'
terminating with uncaught exception of type NSException
(lldb) 

[FEATURE] Add App Tracking Transparency on iOS

Apple has indicated that obtaining permission to track users will be required starting early 2021 and not with the release of iOS14 as initially indicated: "To give developers time to make necessary changes, apps will be required to obtain permission to track users starting early next year." (from https://developer.apple.com/news/?id=hx9s63c5)

https://developer.apple.com/documentation/apptrackingtransparency

https://developers.google.com/admob/ios/ios14

[BUG] Sometimes when banner is destroyed, the keyboard opens

Describe the bug
Sometimes now on banner disable click the keyboard opens

To Reproduce
Steps to reproduce the behavior:

  1. Click "Enable Banner"
  2. Click "Disable Banner"

Smartphone (please complete the following information):

  • OS: iOS
  • Version 3.2.1

[BUG] Confusion when building for iOS/How AdMob works on iOS

Describe the bug
I've ran into some issues when trying to build for iOS. This section is confusing me

Copy the library libgodot.iphone.release.fat.a you have downloaded from releases tab inside the exported Xcode project. You must override the '.a' file with "your_project_name", should be like: 'your_project_name.a'.

I'm not sure what it means. I took it to mean I had to copy libgodot.iphone.release.fat.a into the project, and then rename it the name of my project, but that didn't work, and then I realized there was already a my_project_name.a in the project.

If I don't copy libgodot.iphone.release.fat.a into my project, it builds and runs (although it doesn't currently work), but if I add libgodot.iphone.release.fat.a I get compiler errors about duplicate symbols.

However, if I remove my_project_name.a from the directory, it complains about it missing. I tried removing my_project_name.a, and renaming libgodot.iphone.release.fat.a into my_project_name.a, but that leads build errors with some of the Google frameworks.

At this point I'm just unsure about what exactly I'm supposed to be doing with libgodot.iphone.release.fat.a and my_project_name.a

To Reproduce
Steps to reproduce the behavior:
Just try and build iOS as described.

Smartphone (please complete the following information):

  • Device: iPhone 7
  • Xcode: 11.2.1
  • iOS Version: 13.3

[FEATURE] Change "gravity" variable to "position" on Android and iOS

The gravity of the view of banner ads should be only bottom centered or top centered due good practices of using AdMob Banners, changing the name for "position" will be more easily to understand how works and limiting for Bottom or Top will avoid to some user use wrong the Banner Ad.

  • Bottom
  • Top

[BUG] Error compiling Godot for iOS with module for version 3.2.3

Describe 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 {
^
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
^
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 {
^
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

[BUG] No Signals working

Hi, I tried both 3.2.2 and 3.2.3 example projects, they seem to work but only partially - banner and unified_native can be shown.
The problem is I can't find a place where any signal is connected to the plugin singleton. No any signals are emitted from AdMob.tscn.

After adding these lines:

_admob_singleton.initialize(is_for_child_directed_treatment, is_personalized, max_ad_content_rating, is_real, get_instance_id())
		_is_initialized = !_is_initialized
_admob_singleton.connect("banner_loaded", self, "_on_admob_singleton_banner_loaded")

I got an error:

12-07 01:29:37.508 11965 12056 E godot   : **ERROR**: In Object of type 'JNISingleton': Attempt to connect nonexistent signal 'banner_loaded' to method 'Control._on_admob_singleton_banner_loaded'.
12-07 01:29:37.508 11965 12056 E godot   :    At: core/object.cpp:1503:connect() - Condition "!signal_is_valid" is true. Returned: ERR_INVALID_PARAMETER

To Reproduce
Steps to reproduce the behavior:

  1. open example project
  2. add any signal
  3. output signal to logcat/debug
  4. no signals working

Expected behavior
Any signals working

Smartphone (please complete the following information):

  • Device: Android cellphone

[BUG] Game crashing after enabling AdMob

Describe the bug
Game crashing after enabling AdMob

To Reproduce
Steps to reproduce the behavior:

  1. Use Godot v3.2.4.beta4
  2. Run project on device

Expected behavior
Game starts with no crashes

Screenshots
image

Smartphone (please complete the following information):
image

[BUG] has_singleton("AdMob") fails in sample project

Describe the bug
I'm attempting to run the sample project on an LG G3 Android. The project works and deploys correctly, but none of the buttons seemed to be doing anything for me. After some digging, I've made the following modification to admob_api/AdMob.gd's ready function:

func _ready():
	if admob_enabled:
		if (Engine.has_singleton("AdMob")):
			_admob_singleton = Engine.get_singleton("AdMob")
			#_admob_singleton = self
			print("admob singleton: %s" % _admob_singleton)
			_initialize()
			# warning-ignore:return_value_discarded
			get_tree().connect("screen_resized", self, "_on_get_tree_resized")
		else:
			print("Singleton check fails")

And when debugging, it prints "Singleton check fails". I'm a little confused about the fact that AdMob.tscn is a Autoload Singleton that gets checked, when the check is already being called from within AdMob.gd, which I think is the script for AdMob.tscn.

Regardless, am I missing something setup wise? I've gone through the install instructions, setup Android custom build and everything seems alright from that standpoint, it's just this Singleton loading I can't get working.

To Reproduce
Steps to reproduce the behavior:
Just run the example project with the modifications listed above.

Expected behavior
Expected AdMob singleton to load, and ad callbacks on button presses.

Screenshots
Don't believe any are necessary just yet.

Smartphone (please complete the following information):

  • Device: LG G3
  • OS: Android 5.0.2
  • Godot Version: 3.2.3

[FEATURE] Make the API's AdMob.gd as AdMob.tscn with Script built-in

Is your feature request related to a problem? Please describe.
It's frustrating to have to open the code every time to change the API logic

Describe the solution you'd like

  • Change AdMob.gd to be .tscn and put the script as built-in,
  • Change the variables for export to be changed directly from the AdMob Scene
  • Create a folder called "api" and place the AdMob Scene inside

[BUG] Error in iOS code when trying to compile godot with module

Describe the bug
I'm trying to compile godot using Godot-AdMob-Android-iOS as a module, but I'm getting forward declaration errors in the iOS source:

Screen Shot 2021-01-11 at 10 03 26 PM

To Reproduce
Steps to reproduce the behavior:

  1. Place ios/admob contents into godot/modules/admob
  2. Place google *.framework directories into godot/modules/admob/lib
  3. Run scons p=iphone target=debug

Expected behavior
Builds an ios *.a file

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Latest Godot-AdMob-Android-iOS as of this writing
  • Latest godot from git

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.