-jio-start-block-type-2
-jio-style-title
-jio-bullet-type-1
-jio-bullet-type-1
Example Code:
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey:
Any]?) -> Bool {
JioAdsFramework.RILEventManager.shared.initializeRetargettingSDK()
return true
}
-jio-style-title
If needed, enable / disable debug logs for the ShopSure SDK by calling setLogLevel()
API
// Possible values for logLevel
// LogLevel.none - No logs will be printed
// LogLevel.debug -To enable debug logs
JioAdSdk.setLogLevel(logLevel: LogLevel)
Possible values for LogLevel are as below
-jio-tables
Log Level Parameter Value | Description |
---|---|
JioAds. LogLevel.none | Disable Logs (No logs will be printed) |
JioAds.LogLevel.debug | To enable debug logs |
-jio-style-title
To Fetch IDFA, App needs to call below requestAppTrackingPermission() function.
Please refer the below code for call and implementation requestAppTrackingPermission() function.
func applicationDidBecomeActive(_ application: UIApplication) {
if #available(iOS 14, tvOS 14, *) {
requestAppTrackingPermission { (status) in
if status == .denied {
DispatchQueue.main.async {
NSLog("Access denied")
}
}
}
}
}
extension AppDelegate {
@available(iOS 14, tvOS 14, *)
func requestAppTrackingPermission(_ completion: @escaping
(ATTrackingManager.AuthorizationStatus) -> Void) {
ATTrackingManager.requestTrackingAuthorization { (status) in
switch status {
case .authorized:
// racking authorization dialog was shown and we are authorized
JioAdSdk.fetchBpid()
case .denied:
// Tracking authorization dialog was shown and permission is denied
SDKLog("AdTracking | status: Denied")
case .notDetermined:
// Tracking authorization dialog has not been shown
SDKLog("AdTracking | status: Not Determined")
case .restricted:
SDKLog("AdTracking | status: Restricted")
@unknown default:
SDKLog("AdTracking | status: Unknown")
}
completion(status)
}
}
}
-jio-style-title
If application wants to get the SDK parameters which includes OS info, Device info and any metadata, it can call below API
let params = JioAdSdk.getRequestParams(config: dictionary)
Example -
let dictionary = ["cat": "clothes", "state": "MH", "Dist": "Mumbai"]
let params = JioAdSdk.getRequestParams(config: dictionary)
print("Ad Parameters = \(params)")
Below can be the possible output printed in the log
Ad Parameters = ["lc": "en", "lo": "72.8561644", "os": 2, "sh": 932, "lt": 1, "ua":
"Mozilla/5.0%20(iPhone;%20CPU%20iPhone%20OS%2015_2%20like%20Mac%20OS%20
X)%20AppleWebKit/605.1.15%20(KHTML,%20like%20Gecko)%20Mobile/15E148", "dt":
1, "ifa": "00000000-0000-0000-0000-000000000000", "ai": "com.jio.jiosdk", "md_nt": 2,
"sw": 430, "md_Dist": "Mumbai", "md_dvb": "Apple", "mn": "iPhone", "br": "Apple",
"md_lang": "en", "av": "2.1.1.36", "la": "19.0176147", "md_state": "MH", "tz": "Asia/Kolkata",
"ao": "p", "md_min": "6", "aic": "com.jio.jiosdk", "md_dvm": "iPhone", "md_hr": "16", "bz":
"Image", "osv": "17.5", "ap": 2, "vr": "IOS-2.1.22", "acc": "5.0", "md_osv": "17.5", "trq":
1733481402153, "md_cat": "clothes"]
-jio-end-block-type-2