Skip to content

Commit

Permalink
Merge pull request #13 from Moballo-LLC/8.0.4
Browse files Browse the repository at this point in the history
Ruggedize app tracking transparency prompting
  • Loading branch information
Jason-Morcos authored Feb 26, 2023
2 parents f7998e4 + a8ed614 commit 8280df6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 20 deletions.
2 changes: 1 addition & 1 deletion MOBAdvertising.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'MOBAdvertising'
s.version = '8.0.3'
s.version = '8.0.4'
s.summary = 'A wrapper for GogleMobileAds that allows one to present banner ads that show with any application, including a tab bar application'
s.homepage = 'https://github.com/Moballo-LLC/MOBAdvertising'
s.license = 'MIT'
Expand Down
34 changes: 17 additions & 17 deletions _Project/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,50 @@ PODS:
- Google-Mobile-Ads-SDK (9.14.0):
- GoogleAppMeasurement (< 11.0, >= 7.0)
- GoogleUserMessagingPlatform (>= 1.1)
- GoogleAppMeasurement (10.3.0):
- GoogleAppMeasurement/AdIdSupport (= 10.3.0)
- GoogleAppMeasurement (10.5.0):
- GoogleAppMeasurement/AdIdSupport (= 10.5.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/AdIdSupport (10.3.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.3.0)
- GoogleAppMeasurement/AdIdSupport (10.5.0):
- GoogleAppMeasurement/WithoutAdIdSupport (= 10.5.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleAppMeasurement/WithoutAdIdSupport (10.3.0):
- GoogleAppMeasurement/WithoutAdIdSupport (10.5.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.8)
- GoogleUtilities/MethodSwizzler (~> 7.8)
- GoogleUtilities/Network (~> 7.8)
- "GoogleUtilities/NSData+zlib (~> 7.8)"
- nanopb (< 2.30910.0, >= 2.30908.0)
- GoogleUserMessagingPlatform (2.0.1)
- GoogleUtilities/AppDelegateSwizzler (7.10.0):
- GoogleUtilities/AppDelegateSwizzler (7.11.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.10.0):
- GoogleUtilities/Environment (7.11.0):
- PromisesObjC (< 3.0, >= 1.2)
- GoogleUtilities/Logger (7.10.0):
- GoogleUtilities/Logger (7.11.0):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (7.10.0):
- GoogleUtilities/MethodSwizzler (7.11.0):
- GoogleUtilities/Logger
- GoogleUtilities/Network (7.10.0):
- GoogleUtilities/Network (7.11.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.10.0)"
- GoogleUtilities/Reachability (7.10.0):
- "GoogleUtilities/NSData+zlib (7.11.0)"
- GoogleUtilities/Reachability (7.11.0):
- GoogleUtilities/Logger
- nanopb (2.30909.0):
- nanopb/decode (= 2.30909.0)
- nanopb/encode (= 2.30909.0)
- nanopb/decode (2.30909.0)
- nanopb/encode (2.30909.0)
- PromisesObjC (2.1.1)
- PromisesObjC (2.2.0)

DEPENDENCIES:
- Google-Mobile-Ads-SDK (~> 9.14)
Expand All @@ -61,12 +61,12 @@ SPEC REPOS:

SPEC CHECKSUMS:
Google-Mobile-Ads-SDK: 4fe6304b771f8467d29978cb790ec1e56e646946
GoogleAppMeasurement: c7d6fff39bf2d829587d74088d582e32d75133c3
GoogleAppMeasurement: 40c70a7d89013f0eca72006c4b9732163ea4cdae
GoogleUserMessagingPlatform: 5f8b30daf181805317b6b985bb51c1ff3beca054
GoogleUtilities: bad72cb363809015b1f7f19beb1f1cd23c589f95
GoogleUtilities: c2bdc4cf2ce786c4d2e6b3bcfd599a25ca78f06f
nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
PromisesObjC: 09985d6d70fbe7878040aa746d78236e6946d2ef

PODFILE CHECKSUM: 1566d0d7b9c7780a7edccf68971a17aa067e67a7
PODFILE CHECKSUM: e424c0338f848e12d1539d8b20c250ffcd23ce3f

COCOAPODS: 1.11.3
2 changes: 1 addition & 1 deletion _Project/Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>8.0.3</string>
<string>8.0.4</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
Expand Down
21 changes: 20 additions & 1 deletion _Project/Sources/MOBAdvertisingBanner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,16 @@
NSLog("adView:ASIdentifierManager Tracking UUID: " + ASIdentifierManager.shared().advertisingIdentifier.uuidString)
#if canImport(AppTrackingTransparency)
if #available(iOS 14, *) {
if(ATTrackingManager.trackingAuthorizationStatus == .notDetermined || ASIdentifierManager.shared().advertisingIdentifier.uuidString.starts(with: "00000000")) {
//Guard for application not yet being active
if(UIApplication.shared.applicationState != .active) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
self.requestIDFA()
})
return;
}

//Request authorization
if(ATTrackingManager.trackingAuthorizationStatus == .notDetermined) {
ATTrackingManager.requestTrackingAuthorization(completionHandler: { status in
// Tracking authorization completed. Start loading ads here.
if status == ATTrackingManager.AuthorizationStatus.authorized {
Expand All @@ -118,13 +127,23 @@
NSLog("adView:ASIdentifierManager ATTrackingManager=UNKNOWN STATE OCCURED")
}

//Check for failed check for tracking advertising
if(status == .notDetermined) {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
self.requestIDFA()
})
return;
}

self.bannerLoad()
})
return;
}

}
#endif
NSLog("adView:ASIdentifierManager skipping requesting tracking permission. ASIdentifierManager.isAdvertisingTrackingEnabled=" + (ASIdentifierManager.shared().isAdvertisingTrackingEnabled ? "Yes" : "No"));


self.bannerLoad()
}
Expand Down

0 comments on commit 8280df6

Please sign in to comment.