Skip to content

Commit

Permalink
Update AdMob SDK 8.4.0 (Firebase 7.11.0)
Browse files Browse the repository at this point in the history
Update iOS Audience Network SDK 6.4.1
Update iOS Facebook Adapter 6.4.1.0
Update InMobi SDK 9.1.7
Update InMobiAdapter 9.1.7.0
  • Loading branch information
Astrovic committed Apr 30, 2021
1 parent 5949565 commit 40bb1d7
Show file tree
Hide file tree
Showing 145 changed files with 7,648 additions and 60 deletions.
26 changes: 24 additions & 2 deletions ios/Classes/TiAdmobModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
#import <AppTrackingTransparency/ATTrackingManager.h>
#import <FBAudienceNetwork/FBAdSettings.h>
#import <InMobiAdapter/InMobiAdapter.h>
#endif

@implementation TiAdmobModule
Expand Down Expand Up @@ -273,12 +275,32 @@ - (void)requestTrackingAuthorization:(id)args

- (void)setAdvertiserTrackingEnabled:(id)advertiserTrackingEnabled
{
DEPRECATED_REMOVED(@"Admob.advertiserTrackingEnabled", @"4.0.0", @"4.0.0")
// this method is required by Facebook Audience Network for iOS >= 14
if (@available(iOS 14, *)) {
ENSURE_TYPE(advertiserTrackingEnabled, NSNumber);
[FBAdSettings setAdvertiserTrackingEnabled:[TiUtils boolValue:advertiserTrackingEnabled]];
} else {
NSLog(@"[WARN] Ti.AdMob: The function `setAdvertiserTrackingEnabled` should be used on ios version 14 and above only");
}
}

- (void)setInMobi_updateGDPRConsent:(id)updateGDPRConsent
{
DEPRECATED_REMOVED(@"Admob.inMobi_updateGDPRConsent", @"4.0.0", @"4.0.0")
NSMutableDictionary *consentObject = [[NSMutableDictionary alloc] init];

ENSURE_TYPE(updateGDPRConsent, NSNumber);
if ([TiUtils boolValue:updateGDPRConsent]) {
// this method is required by InMobi to set GDPR
[consentObject setObject:@"1" forKey:@"gdpr"];
[consentObject setObject:@"true" forKey:IM_GDPR_CONSENT_AVAILABLE];
NSLog(@"[INFO] Ti.AdMob: inMobi_updateGDPRConsent --> true");
} else {
[consentObject setObject:@"0" forKey:@"gdpr"];
[consentObject setObject:@"true" forKey:IM_GDPR_CONSENT_AVAILABLE];
NSLog(@"[INFO] Ti.AdMob: inMobi_updateGDPRConsent --> false");
}

[GADMInMobiConsent updateGDPRConsent:consentObject];
}

#pragma mark Constants
Expand Down
28 changes: 28 additions & 0 deletions ios/admob.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
3ABFE39626335E0000887180 /* GoogleAppMeasurement.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3ABFE38A26335E0000887180 /* GoogleAppMeasurement.xcframework */; };
3ABFE39726335E0000887180 /* GoogleUtilities.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3ABFE38B26335E0000887180 /* GoogleUtilities.xcframework */; };
3AF5B7731C233383002E3DC7 /* TiAdmobTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AF5B7711C233383002E3DC7 /* TiAdmobTypes.h */; };
5E497DF2263B088C0059081A /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E497DF1263B088C0059081A /* WebKit.framework */; };
5E497DF4263B08A00059081A /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E497DF3263B08A00059081A /* libz.tbd */; };
5E497DF6263B08BE0059081A /* libsqlite3.0.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E497DF5263B08BE0059081A /* libsqlite3.0.tbd */; };
5EFC8F4F263ABC430011A0C2 /* FacebookAdapter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EFC8F4B263ABC430011A0C2 /* FacebookAdapter.xcframework */; };
5EFC8F50263ABC430011A0C2 /* InMobiSDK.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EFC8F4C263ABC430011A0C2 /* InMobiSDK.xcframework */; };
5EFC8F51263ABC430011A0C2 /* InMobiAdapter.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EFC8F4D263ABC430011A0C2 /* InMobiAdapter.xcframework */; };
5EFC8F52263ABC430011A0C2 /* FBAudienceNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EFC8F4E263ABC430011A0C2 /* FBAudienceNetwork.framework */; };
AA747D9F0F9514B9006C5449 /* TiAdmob_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* TiAdmob_Prefix.pch */; };
/* End PBXBuildFile section */

Expand All @@ -40,6 +47,13 @@
3ABFE38A26335E0000887180 /* GoogleAppMeasurement.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = GoogleAppMeasurement.xcframework; path = platform/GoogleAppMeasurement.xcframework; sourceTree = "<group>"; };
3ABFE38B26335E0000887180 /* GoogleUtilities.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = GoogleUtilities.xcframework; path = platform/GoogleUtilities.xcframework; sourceTree = "<group>"; };
3AF5B7711C233383002E3DC7 /* TiAdmobTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TiAdmobTypes.h; path = Classes/TiAdmobTypes.h; sourceTree = "<group>"; };
5E497DF1263B088C0059081A /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/System/iOSSupport/System/Library/Frameworks/WebKit.framework; sourceTree = DEVELOPER_DIR; };
5E497DF3263B08A00059081A /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libz.tbd; sourceTree = DEVELOPER_DIR; };
5E497DF5263B08BE0059081A /* libsqlite3.0.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.0.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libsqlite3.0.tbd; sourceTree = DEVELOPER_DIR; };
5EFC8F4B263ABC430011A0C2 /* FacebookAdapter.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = FacebookAdapter.xcframework; path = platform/FacebookAdapter.xcframework; sourceTree = "<group>"; };
5EFC8F4C263ABC430011A0C2 /* InMobiSDK.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = InMobiSDK.xcframework; path = platform/InMobiSDK.xcframework; sourceTree = "<group>"; };
5EFC8F4D263ABC430011A0C2 /* InMobiAdapter.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = InMobiAdapter.xcframework; path = platform/InMobiAdapter.xcframework; sourceTree = "<group>"; };
5EFC8F4E263ABC430011A0C2 /* FBAudienceNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FBAudienceNetwork.framework; path = platform/FBAudienceNetwork.framework; sourceTree = "<group>"; };
AA747D9E0F9514B9006C5449 /* TiAdmob_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TiAdmob_Prefix.pch; sourceTree = SOURCE_ROOT; };
D2AAC07E0554694100DB518D /* libTiAdmob.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTiAdmob.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
Expand All @@ -49,6 +63,13 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
5E497DF6263B08BE0059081A /* libsqlite3.0.tbd in Frameworks */,
5E497DF4263B08A00059081A /* libz.tbd in Frameworks */,
5E497DF2263B088C0059081A /* WebKit.framework in Frameworks */,
5EFC8F4F263ABC430011A0C2 /* FacebookAdapter.xcframework in Frameworks */,
5EFC8F50263ABC430011A0C2 /* InMobiSDK.xcframework in Frameworks */,
5EFC8F51263ABC430011A0C2 /* InMobiAdapter.xcframework in Frameworks */,
5EFC8F52263ABC430011A0C2 /* FBAudienceNetwork.framework in Frameworks */,
3ABFE38E26335E0000887180 /* nanopb.xcframework in Frameworks */,
3ABFE39526335E0000887180 /* UserMessagingPlatform.xcframework in Frameworks */,
3ABFE38F26335E0000887180 /* PersonalizedAdConsent.framework in Frameworks */,
Expand Down Expand Up @@ -84,6 +105,13 @@
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
5E497DF5263B08BE0059081A /* libsqlite3.0.tbd */,
5E497DF3263B08A00059081A /* libz.tbd */,
5E497DF1263B088C0059081A /* WebKit.framework */,
5EFC8F4B263ABC430011A0C2 /* FacebookAdapter.xcframework */,
5EFC8F4E263ABC430011A0C2 /* FBAudienceNetwork.framework */,
5EFC8F4D263ABC430011A0C2 /* InMobiAdapter.xcframework */,
5EFC8F4C263ABC430011A0C2 /* InMobiSDK.xcframework */,
3ABFE38A26335E0000887180 /* GoogleAppMeasurement.xcframework */,
3ABFE38126335E0000887180 /* GoogleMobileAds.xcframework */,
3ABFE38B26335E0000887180 /* GoogleUtilities.xcframework */,
Expand Down
9 changes: 9 additions & 0 deletions ios/documentation/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Change Log
v4.1.0 Update AdMob SDK 8.4.0 (Firebase 7.11.0)
Update iOS Audience Network SDK 6.4.1
Update iOS Facebook Adapter 6.4.1.0
Update InMobi SDK 9.1.7
Update InMobiAdapter 9.1.7.0

v4.0.0 Update AdMob SDK to 8 (Removed all deprecated classes)
Added support for new Rewarded Video Ads
Added UMP SDK 2.0.0

v3.1.0 Update iOS Audience Network SDK 6.2.1
Update iOS Facebook Adapter 6.2.1.0
Expand Down
2 changes: 1 addition & 1 deletion ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 4.0.0
version: 4.1.0
architectures: armv7 x86_64 arm64
mac: false
description: AdMob module for ad delivery via AdMob
Expand Down
2 changes: 1 addition & 1 deletion ios/module.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
OTHER_LDFLAGS=$(inherited) -framework AdSupport -framework CoreGraphics -framework CoreMedia -framework CoreMotion -framework CoreTelephony -framework CoreVideo -framework GLKit -framework JavaScriptCore -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework iAd -framework StoreKit -framework SystemConfiguration -framework GoogleMobileAds -framework GoogleUtilities -framework GoogleAppMeasurement -framework PromisesObjC -framework PersonalizedAdConsent
OTHER_LDFLAGS=$(inherited) -framework AdSupport -framework CoreGraphics -framework CoreMedia -framework CoreMotion -framework CoreTelephony -framework CoreVideo -framework GLKit -framework JavaScriptCore -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework iAd -framework StoreKit -framework SystemConfiguration -framework GoogleMobileAds -framework GoogleUtilities -framework GoogleAppMeasurement -framework PromisesObjC -framework PersonalizedAdConsent -framework FacebookAdapter -framework FBAudienceNetwork -framework FBSDKCoreKit -framework InMobiSDK -framework InMobiAdapter
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2004-present Facebook. All Rights Reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/***
* This is a bridge file for Audience Network Unity SDK.
*
* This file may be used to build your own Audience Network iOS SDK wrapper,
* but note that we don't support customisations of the Audience Network codebase.
*
***/

#import <UIKit/UIKit.h>

#import <FBAudienceNetwork/FBAdBridgeContainer.h>
#import <FBAudienceNetwork/FBAdDefines.h>

FB_EXTERN_C_BEGIN

// External to this project
typedef NS_ENUM(NSInteger, FBGLViewController) {
FBGLViewControllerNone,
FBGLViewControllerUnity,
FBGLViewControllerCocos2D,
};

__attribute__((weak)) extern UIViewController *UnityGetGLViewController(void);
__attribute__((__always_inline__)) extern FBGLViewController fbad_Cocos2DGetGLViewController(
UIViewController **glViewController);

__attribute__((__always_inline__)) extern UIViewController *fbad_GetGLViewController(void);
__attribute__((__always_inline__)) extern FBGLViewController fbad_UnityGetGLViewController(
UIViewController **glViewController);

FB_EXTERN_C_END
103 changes: 103 additions & 0 deletions ios/platform/FBAudienceNetwork.framework/Headers/FBAdBridgeContainer.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
// Copyright 2004-present Facebook. All Rights Reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

/***
* This is a bridge file for Audience Network Unity SDK.
*
* This file may be used to build your own Audience Network iOS SDK wrapper,
* but note that we don't support customisations of the Audience Network codebase.
*
***/

#import <Foundation/Foundation.h>

#import <FBAudienceNetwork/FBAdBridgeCommon.h>
#import <FBAudienceNetwork/FBAdView.h>
#import <FBAudienceNetwork/FBInterstitialAd.h>
#import <FBAudienceNetwork/FBRewardedVideoAd.h>

typedef void (*FBAdBridgeCallback)(uint32_t uniqueId);
typedef void (*FBAdBridgeErrorCallback)(uint32_t uniqueId, char const *error);

@interface FBAdBridgeContainer : NSObject

@property (nonatomic, assign) int32_t uniqueId;

// Explicitly remove callbacks
- (void)dispose;

@end

@interface FBAdViewBridgeContainer : FBAdBridgeContainer <FBAdViewDelegate>

@property (nonatomic, strong) FBAdView *adView;

@property (nonatomic, assign) FBAdBridgeCallback adViewDidClickCallback;
@property (nonatomic, assign) FBAdBridgeCallback adViewDidFinishHandlingClickCallback;
@property (nonatomic, assign) FBAdBridgeCallback adViewDidLoadCallback;
@property (nonatomic, assign) FBAdBridgeErrorCallback adViewDidFailWithErrorCallback;
@property (nonatomic, assign) FBAdBridgeCallback adViewWillLogImpressionCallback;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

- (instancetype)initWithAdView:(FBAdView *)adView withUniqueId:(int32_t)uniqueId NS_DESIGNATED_INITIALIZER;

@end

@interface FBInterstitialAdBridgeContainer : FBAdBridgeContainer <FBInterstitialAdDelegate>

@property (nonatomic, strong) FBInterstitialAd *interstitialAd;

@property (nonatomic, assign) FBAdBridgeCallback interstitialAdDidClickCallback;
@property (nonatomic, assign) FBAdBridgeCallback interstitialAdDidCloseCallback;
@property (nonatomic, assign) FBAdBridgeCallback interstitialAdWillCloseCallback;
@property (nonatomic, assign) FBAdBridgeCallback interstitialAdDidLoadCallback;
@property (nonatomic, assign) FBAdBridgeErrorCallback interstitialAdDidFailWithErrorCallback;
@property (nonatomic, assign) FBAdBridgeCallback interstitialAdWillLogImpressionCallback;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

- (instancetype)initWithInterstitialAd:(FBInterstitialAd *)interstitialAd
withUniqueId:(int32_t)uniqueId NS_DESIGNATED_INITIALIZER;

@end

@interface FBRewardedVideoAdBridgeContainer : FBAdBridgeContainer <FBRewardedVideoAdDelegate>

@property (nonatomic, strong) FBRewardedVideoAd *rewardedVideoAd;

@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdDidClickCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdDidCloseCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdWillCloseCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdDidLoadCallback;
@property (nonatomic, assign) FBAdBridgeErrorCallback rewardedVideoAdDidFailWithErrorCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdWillLogImpressionCallback;

@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdVideoCompleteCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdServerRewardDidSucceedCallback;
@property (nonatomic, assign) FBAdBridgeCallback rewardedVideoAdServerRewardDidFailCallback;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

- (instancetype)initWithRewardedVideoAd:(FBRewardedVideoAd *)rewardedVideoAd
withUniqueId:(int32_t)uniqueId NS_DESIGNATED_INITIALIZER;

@end
Loading

0 comments on commit 40bb1d7

Please sign in to comment.