To ensure compliance with Apple privacy guidelines and regulations, we don't track data if users don't allow it.
Use AppTrackingTransparency framework to request users' consent
Copy func requestTrackingPermision () {
if #available ( iOS 14 , * ) {
ATTrackingManager. requestTrackingAuthorization { status in
switch status {
case .authorized :
debugPrint ( "ATT permission authorized" )
case .denied :
debugPrint ( "ATT permission denied" )
case .notDetermined :
debugPrint ( "ATT permission notDetermined" )
case .restricted :
debugPrint ( "ATT permission restricted" )
@unknown default:
break
}
}
} else {}
}
override func application (
_ application : UIApplication,
didFinishLaunchingWithOptions launchOptions : [UIApplication.LaunchOptionsKey : Any ] ?
) -> Bool {
FWFlutterSDK. initializeSDK ( nil )
DispatchQueue.main. asyncAfter ( deadline : .now () + 2 ) {
self. requestTrackingPermision ()
}
return super. application ( application, didFinishLaunchingWithOptions : launchOptions )
}
Copy import Foundation
import FireworkVideo
import FireworkVideoIVSSupport
@objc
public class FireworkSupportLibraryBridge : NSObject {
@objc public static func initFireworkSDK () {
FWReactNativeSDK. initializeSDK ( nil )
}
@objc public static func requestTrackingPermision () {
if #available ( iOS 14.5 , * ) {
ATTrackingManager. requestTrackingAuthorization { status in
switch status {
case .authorized :
debugPrint ( "ATT permission authorized" )
case .denied :
debugPrint ( "ATT permission denied" )
case .notDetermined :
debugPrint ( "ATT permission notDetermined" )
case .restricted :
debugPrint ( "ATT permission restricted" )
@unknown default:
break
}
}
} else {}
}
}
Copy // You should change the file to Objective-C Generated Interface Header name.
// Generally, it's "{TargetName}-Swift.h"
#import "FireworkSdkExample-Swift.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[FireworkSupportLibraryBridge initFireworkSDK];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[FireworkSupportLibraryBridge requestTrackingPermision];
});
return YES;
}
For example, the users will see the following pop-up window for the first time.