Skip to content

Commit

Permalink
#27 Update insering Array to testDeviceIdentifiers and new NSLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
gumaciel committed Jan 17, 2021
1 parent b5ac43a commit a472569
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Binary file modified ios/.sconsign.dblite
Binary file not shown.
Binary file not shown.
16 changes: 11 additions & 5 deletions ios/admob_plugin/admob_plugin_implementation.mm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
{
[UMPConsentInformation.sharedInstance reset];
UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init];
debugSettings.testDeviceIdentifiers = [NSString stringWithCString: getDeviceId()];
debugSettings.testDeviceIdentifiers = @[ [NSString stringWithCString: getDeviceId()] ];
debugSettings.geography = UMPDebugGeographyEEA;
parameters.debugSettings = debugSettings;
}
Expand Down Expand Up @@ -136,7 +136,7 @@
GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @[ kGADSimulatorID ];
NSLog(@"on Testing Simulator: %@", kGADSimulatorID);
#else
GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = [NSString stringWithCString: getDeviceId()];
GADMobileAds.sharedInstance.requestConfiguration.testDeviceIdentifiers = @ [ [NSString stringWithCString: getDeviceId()] ];
NSLog(@"on Testing Real Device: testDeviceIdentifiers: %@", [NSString stringWithCString: getDeviceId()]);
#endif
}
Expand Down Expand Up @@ -164,20 +164,26 @@
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {
[[GADMobileAds sharedInstance] startWithCompletionHandler:^(GADInitializationStatus *_Nonnull status)
{
NSLog(@"%s", "BEFORE adapterStatusesByClassName");
NSDictionary<NSString *, GADAdapterStatus *>* states = [status adapterStatusesByClassName];

NSLog(@"%s", "AFTER adapterStatusesByClassName");
NSLog(@"%s", "BEFORE states");
GADAdapterStatus * adapterStatus = states[@"GADMobileAds"];
NSLog(@"%s", "AFTER states");
NSLog(@"%s : %ld", "GADMobileAds", adapterStatus.state);

objectDB->call_deferred("_on_AdMob_initialization_complete", (int) adapterStatus.state, "GADMobileAds");
}];
}];
}
else{
[[GADMobileAds sharedInstance] startWithCompletionHandler:^(GADInitializationStatus *_Nonnull status) {
NSLog(@"%s", "BEFORE adapterStatusesByClassName");
NSDictionary<NSString *, GADAdapterStatus *>* states = [status adapterStatusesByClassName];

NSLog(@"%s", "AFTER adapterStatusesByClassName");
NSLog(@"%s", "BEFORE states");
GADAdapterStatus * adapterStatus = states[@"GADMobileAds"];
NSLog(@"%s", "AFTER states");
NSLog(@"%s : %ld", "GADMobileAds", adapterStatus.state);

objectDB->call_deferred("_on_AdMob_initialization_complete", (int) adapterStatus.state, "GADMobileAds");
Expand Down

0 comments on commit a472569

Please sign in to comment.