{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[]},"params":[]},"next":{"description":"","pages":[]},"title":"HyBid iOS SDK - HyBid Configuration","type":"basic","slug":"hybid-ios-sdk-hybid-configuration-beta","excerpt":"","body":"[block:api-header]\n{\n  \"title\": \"Migration from the PubNativeLite SDK to the HyBid SDK\"\n}\n[/block]\nAs you might have noticed, we changed our product name from **PubNativeLite** to **HyBid**. What that means is that if your project uses the old PubNativeLite SDK, we encourage you to check out the **Migration to HyBid.framework** document [here](http://developers.pubnative.net/v3.0/docs/migration-to-hybidframework) for a smooth migration.\n[block:api-header]\n{\n  \"title\": \"Install HyBid SDK\"\n}\n[/block]\n\n## Install HyBid SDK\n\nThere are 2 ways that you can install HyBid into your application;\n\n### 1. Drag & Drop `HyBid.xcframework`\n\n* [Download](https://github.com/pubnative/pubnative-hybid-ios-sdk/releases) `HyBid.xcframework` and simply drag and drop the `HyBid.xcframework` file into your project's target.\n* **IMPORTANT NOTE:** Make sure it is set for **Embed & Sign** in General, under \"Frameworks, Libraries and Embedded Content\"\n\n### 2. Cocoapods\n\n* If you're using [CocoaPods](https://cocoapods.org), you can add the following line to your `Podfile`. **This will get you the full featured HyBid iOS SDK.**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"pod 'HyBid', '2.4.7'\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n* However, if you want a specific feature / some features from the HyBid iOS SDK, now you can get them by installing the desired module(s). Down below you'll find a list to the available modules. You can install as little as one module, or multiple modules based on your application's need by adding them to your `Podfile`.\n\n**For Banner Ads** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"pod `HyBid/Banner`, '2.4.7'\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n**For Fullscreen / Interstitial Ads**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"pod `HyBid/FullScreen`, '2.4.7'\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n**For Rewarded Video Ads** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"pod `HyBid/RewardedVideo`, '2.4.7'\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n**For Native Ads** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"pod `HyBid/Native`, '2.4.7'\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n**NOTE:** _If you already have the previous versions of HyBid iOS SDK in your project and you are updating to the `HyBid.xcframework`, you need to remove the **Run Script** under **Build Phases**. You don't need that anymore._\n\n[block:api-header]\n{\n  \"title\": \"Integrate The Adapters\"\n}\n[/block]\nThere are 2 ways that you can install Adapters into your application;\n[block:api-header]\n{\n  \"title\": \"1. Drag & Drop Adapter Files\"\n}\n[/block]\nTo use the Adapters in your project, head over to either [MoPub HyBid Adapters](https://github.com/pubnative/mopub-hybid-adapters-ios) and/or [Google Mobile Ads HyBid Adapters](https://github.com/pubnative/googleMobileAds-hybid-adapters-ios) repository and import all the adapter files to your project.\n[block:api-header]\n{\n  \"title\": \"Swift Integration\"\n}\n[/block]\nTo use the Adapters in your Swift project, ensure that you have a Bridging Header file in your project and the Objective-C Bridging Header build setting under Swift Compiler - Code Generation has a path to the header\n[block:api-header]\n{\n  \"title\": \"2. Cocoapods\"\n}\n[/block]\nIf you're using [CocoaPods](https://cocoapods.org), you can add the adapters to your project using `Podfile`. Check the listed repositories for a detailed integration guide for [MoPub HyBid](https://github.com/pubnative/mopub-hybid-adapters-ios) and [Google Mobile Ads HyBid](https://github.com/pubnative/googleMobileAds-hybid-adapters-ios) adapters.\n[block:api-header]\n{\n  \"title\": \"Initialise SDK\"\n}\n[/block]\nAdd the **`HyBid.framework`** to your code.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import HyBid\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#import <HyBid/HyBid.h>\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\nBefore making any requests, you must initialise HyBid iOS SDK by calling **`init()`** method **and wait for its completion.** Ideally, you should call this **`init()`** method in your app's AppDelegate.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\\n//...\\n//....\\n    HyBid.initWithAppToken(\\\"<YOUR_APP_TOKEN_HERE>\\\") { (success) in\\n                if (success) {\\n                    print(\\\"HyBid Successfully Initialized\\\")\\n                }\\n            }\\n//...\\n//....      \\n    return true\\n}\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\\n//...\\n//....\\n    [HyBid initWithAppToken::::at:::\\\"<YOUR_APP_TOKEN_HERE>\\\" completion:^(BOOL success) {\\n           if (success) {\\n               NSLog(@\\\"HyBid initialisation completed\\\");\\n           }\\n       }];\\n//...\\n//....\\n    return YES;\\n}\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Advanced Configurations\"\n}\n[/block]\nThere are certain parameters that should be configured in the SDK before doing any type of interaction with it. Ensure to configure these parameters only 1 per session.\n\n**COPPA compliance**\n\nIf your app is intended for children you should set [COPPA](https://en.wikipedia.org/wiki/Children%27s_Online_Privacy_Protection_Act) as `true` in order to protect the privacy of the information in their devices. It is disabled by default.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HyBid.setCoppa(Bool)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[HyBid setCoppa:BOOL];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n**Test Mode**\n\nIn development, you should set Test Mode as **`true`** for our SDK and disable it in the release. It allows not to track impressions and tracks on the server side of development application:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HyBid.setTestMode(Bool)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[HyBid setTestMode:BOOL];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n**Location tracking**\n\nIf the user has given location permissions, HyBid SDK will use the available user location to provide better targeted ads. \nThis feature is enabled by default, but can be disabled by setting the **setLocationTracking** on the HyBid class:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HyBid.setLocationTracking(Bool)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[HyBid setLocationTracking:BOOL];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n** Location updates**\n\nThe SDK refreshes the user location after every ad request if the user has given permission for location tracking. This is done to keep the best accuracy possible. However if the app will do many requests in a short time it might display location updates very often which can be intrusive for some users. \n\nYou can disable this behaviour by setting the **setLocationUpdatesEnabled** on the HyBid class:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HyBid.setLocationUpdates(Bool)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[HyBid setLocationUpdates:BOOL];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\nKeep in mind that if location tracking is disabled, anything you set in here will have no effect since location tracking will be disabled globally for HyBid SDK\n\n** Skip Offset**\nYou can define manually a global minimum amount of seconds until the ad can be skipped for HTML and Video Interstitials.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HyBid.setInterstitialSkipOffset(10) //10 seconds\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[HyBid setInterstitialSkipOffset:10]; //10 seconds\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n**Automatically close Video Interstitial**\n\nYou can choose whether to close Video Interstitials automatically after video ends. The default value is `NO`.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HyBid.setInterstitialCloseOnFinish(Bool)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[HyBid setInterstitialCloseOnFinish:BOOL];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n**Targeting**\n\nIf you want to improve targeting, first configure the **`HyBidTargetingModel`** object that you want to pass on and then invoke the following method:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var targeting = HyBidTargetingModel()\\ntargeting.age = <AGE>\\ntargeting.interests = <ARRAY_OF_THE_INTERESTS>\\ntargeting.gender = \\\"<GENDER>\\\"     // \\\"f\\\" for female, \\\"m\\\" for male\\nHyBid.setTargeting(targeting)\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HyBidTargetingModel *targeting = [[HyBidTargetingModel alloc] init];\\ntargeting.age = <AGE>;\\ntargeting.interests = <ARRAY_OF_THE_INTERESTS>;\\ntargeting.gender = \\\"<GENDER>\\\";     // \\\"f\\\" for female, \\\"m\\\" for male\\n[HyBid setTargeting:targeting];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Logging\"\n}\n[/block]\nYou can control the level of log that you want to see in your console. As default **`HyBidLogger`** is set to **`HyBidLogLevelDebug`**. There are 5 HyBidLogLevels;\n- HyBidLogLevelNone\n- HyBidLogLevelError\n- HyBidLogLevelWarning\n- HyBidLogLevelInfo\n- HyBidLogLevelDebug\n\nIf you want to set a different HyBidLogLevel in your app, the best place is to do it in the HyBid initialization part.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HyBid.initWithAppToken(\\\"<YOUR_APP_TOKEN_HERE>\\\") { (success) in\\n            if (success) {\\n                HyBidLogger.setLogLevel(HyBidLogLevelDebug)\\n                print(\\\"HyBid Successfully Initialized\\\")\\n            }\\n        }\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" [HyBid initWithAppToken:@\\\"<YOUR_APP_TOKEN_HERE>\\\" completion:^(BOOL success) {\\n        if (success) {\\n            [HyBidLogger setLogLevel:HyBidLogLevelDebug];\\n            NSLog(@\\\"HyBid initialisation completed\\\");\\n        }\\n    }];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"SKAdNetwork\"\n}\n[/block]\n**`SKAdNetwork`** is an attribution solution introduced by Apple. It validates advertiser-driven app installations without disclosing user-level data. With the iOS 14 update, the utilization of **`SKAdNetwork`** framework will become more important since IDFA (Apple’s Identifier for Advertiser) is going to be opted-out by default.\n\nThe 'opted-out by default' setup was originally planned to happen with the release of iOS 14, but has been delayed to early next year. To prepare the change in time, we suggest you to already start adding support for **`SKAdNetwork`**.\n\n1. Add each **`SKAdNetwork`** ID with the key **`SKAdNetworkIdentifier`** as a list to your App's **`Info.plist`** under the key **`SKAdNetworkItems`**. \n\nPubNative's SKAdNetwork ID is: **`TL55SBB4FM.skadnetwork`**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\t<key>SKAdNetworkItems</key>\\n\\t<array>\\n\\t\\t<dict>\\n\\t\\t\\t<key>SKAdNetworkIdentifier</key>\\n\\t\\t\\t<string>TL55SBB4FM.skadnetwork</string>\\n\\t\\t</dict>\\n\\t</array>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n2. Set your AppStore ID\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" HyBid.setAppStoreAppID(\\\"NUMERIC_APPSTORE_ID_HERE\\\")\",\n      \"language\": \"swift\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"[HyBid setAppStoreAppID:@\\\"NUMERIC_APPSTORE_ID_HERE\\\"];\",\n      \"language\": \"objectivec\"\n    }\n  ]\n}\n[/block]\n***[Return to the HyBid](http://developers.pubnative.net/v3.0/docs/hybid-ios-sdk)***\n***[Return to the MoPub Adapter](http://developers.pubnative.net/v3.0/docs/hybid-ios-sdk-adapter-for-mopub)***\n***[Return to the MoPub Pre-Bid](http://developers.pubnative.net/v3.0/docs/hybid-ios-sdk-pre-bid-for-mopub)***\n***[Return to the DFP Pre-Bid](http://developers.pubnative.net/v3.0/docs/hybid-ios-sdk-pre-bid-for-dfp)***","updates":[],"order":9,"isReference":false,"hidden":true,"sync_unique":"","link_url":"","link_external":false,"_id":"5fe0de287b26110011573018","createdAt":"2020-12-21T17:40:56.637Z","user":"59ef127e3a256500102bb232","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"[PUBLISHER] HyBid SDK","slug":"hybid-android-sdk","order":3,"from_sync":false,"reference":false,"_id":"5b1a43bd678eab0003aa54a4","project":"574ff4bd3fa1870e00889ba6","version":"574ff4bd3fa1870e00889ba9","createdAt":"2018-06-08T08:52:13.470Z","__v":1},"version":{"version":"3.0","version_clean":"3.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["574ff4bd3fa1870e00889baa","577278ecdceb570e003a9001","577279865617b117009e643f","577279985617b117009e6440","577279bc8c48e00e00503504","5774fe18605b770e0037be8a","577ce3ad87acf617003c4187","577f8476a77c700e006a6c52","57b486ae0d2b640e00e9d3f5","57b722133d3e620e004ec74b","57bd95f00fe3a00e003e2cc5","57c8349359cd4b0e00b888ef","57c8349b5754fa1700b12242","57cedb0bad483e0e00890239","57cedbe807d7ea0e00e438cc","57d82967156ef72b007ffcd8","58ee353ad1ee2f0f0034a13d","596623221738df00298622a5","59a51730192dba000fc9ca38","59a8129f1e7b26000fa0fb1a","5a0322bf044b6f001c236e36","5a79897c5b6e430030746df6","5a79898c2b2d5f0012cbab63","5ab3b5e3d2d1e2006252a8f2","5b1a43bd678eab0003aa54a4","5b6d95e29d346300038baff3","5c77d3a1e0794000451bced2","5e902519bb65b200466e7957","5f228f5bd6a1cc0024afda30"],"_id":"574ff4bd3fa1870e00889ba9","createdAt":"2016-06-02T08:56:29.492Z","project":"574ff4bd3fa1870e00889ba6","releaseDate":"2016-06-02T08:56:29.492Z","__v":29},"project":"574ff4bd3fa1870e00889ba6","__v":0,"parentDoc":null}

HyBid iOS SDK - HyBid Configuration


[block:api-header] { "title": "Migration from the PubNativeLite SDK to the HyBid SDK" } [/block] As you might have noticed, we changed our product name from **PubNativeLite** to **HyBid**. What that means is that if your project uses the old PubNativeLite SDK, we encourage you to check out the **Migration to HyBid.framework** document [here](http://developers.pubnative.net/v3.0/docs/migration-to-hybidframework) for a smooth migration. [block:api-header] { "title": "Install HyBid SDK" } [/block] ## Install HyBid SDK There are 2 ways that you can install HyBid into your application; ### 1. Drag & Drop `HyBid.xcframework` * [Download](https://github.com/pubnative/pubnative-hybid-ios-sdk/releases) `HyBid.xcframework` and simply drag and drop the `HyBid.xcframework` file into your project's target. * **IMPORTANT NOTE:** Make sure it is set for **Embed & Sign** in General, under "Frameworks, Libraries and Embedded Content" ### 2. Cocoapods * If you're using [CocoaPods](https://cocoapods.org), you can add the following line to your `Podfile`. **This will get you the full featured HyBid iOS SDK.** [block:code] { "codes": [ { "code": "pod 'HyBid', '2.4.7'", "language": "ruby" } ] } [/block] * However, if you want a specific feature / some features from the HyBid iOS SDK, now you can get them by installing the desired module(s). Down below you'll find a list to the available modules. You can install as little as one module, or multiple modules based on your application's need by adding them to your `Podfile`. **For Banner Ads** [block:code] { "codes": [ { "code": "pod `HyBid/Banner`, '2.4.7'", "language": "ruby" } ] } [/block] **For Fullscreen / Interstitial Ads** [block:code] { "codes": [ { "code": "pod `HyBid/FullScreen`, '2.4.7'", "language": "ruby" } ] } [/block] **For Rewarded Video Ads** [block:code] { "codes": [ { "code": "pod `HyBid/RewardedVideo`, '2.4.7'", "language": "ruby" } ] } [/block] **For Native Ads** [block:code] { "codes": [ { "code": "pod `HyBid/Native`, '2.4.7'", "language": "ruby" } ] } [/block] **NOTE:** _If you already have the previous versions of HyBid iOS SDK in your project and you are updating to the `HyBid.xcframework`, you need to remove the **Run Script** under **Build Phases**. You don't need that anymore._ [block:api-header] { "title": "Integrate The Adapters" } [/block] There are 2 ways that you can install Adapters into your application; [block:api-header] { "title": "1. Drag & Drop Adapter Files" } [/block] To use the Adapters in your project, head over to either [MoPub HyBid Adapters](https://github.com/pubnative/mopub-hybid-adapters-ios) and/or [Google Mobile Ads HyBid Adapters](https://github.com/pubnative/googleMobileAds-hybid-adapters-ios) repository and import all the adapter files to your project. [block:api-header] { "title": "Swift Integration" } [/block] To use the Adapters in your Swift project, ensure that you have a Bridging Header file in your project and the Objective-C Bridging Header build setting under Swift Compiler - Code Generation has a path to the header [block:api-header] { "title": "2. Cocoapods" } [/block] If you're using [CocoaPods](https://cocoapods.org), you can add the adapters to your project using `Podfile`. Check the listed repositories for a detailed integration guide for [MoPub HyBid](https://github.com/pubnative/mopub-hybid-adapters-ios) and [Google Mobile Ads HyBid](https://github.com/pubnative/googleMobileAds-hybid-adapters-ios) adapters. [block:api-header] { "title": "Initialise SDK" } [/block] Add the **`HyBid.framework`** to your code. [block:code] { "codes": [ { "code": "import HyBid", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "#import <HyBid/HyBid.h>", "language": "objectivec" } ] } [/block] Before making any requests, you must initialise HyBid iOS SDK by calling **`init()`** method **and wait for its completion.** Ideally, you should call this **`init()`** method in your app's AppDelegate. [block:code] { "codes": [ { "code": "func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n//...\n//....\n HyBid.initWithAppToken(\"<YOUR_APP_TOKEN_HERE>\") { (success) in\n if (success) {\n print(\"HyBid Successfully Initialized\")\n }\n }\n//...\n//.... \n return true\n}", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n//...\n//....\n [HyBid initWithAppToken:@\"<YOUR_APP_TOKEN_HERE>\" completion:^(BOOL success) {\n if (success) {\n NSLog(@\"HyBid initialisation completed\");\n }\n }];\n//...\n//....\n return YES;\n}", "language": "objectivec" } ] } [/block] [block:api-header] { "title": "Advanced Configurations" } [/block] There are certain parameters that should be configured in the SDK before doing any type of interaction with it. Ensure to configure these parameters only 1 per session. **COPPA compliance** If your app is intended for children you should set [COPPA](https://en.wikipedia.org/wiki/Children%27s_Online_Privacy_Protection_Act) as `true` in order to protect the privacy of the information in their devices. It is disabled by default. [block:code] { "codes": [ { "code": "HyBid.setCoppa(Bool)", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "[HyBid setCoppa:BOOL];", "language": "objectivec" } ] } [/block] **Test Mode** In development, you should set Test Mode as **`true`** for our SDK and disable it in the release. It allows not to track impressions and tracks on the server side of development application: [block:code] { "codes": [ { "code": "HyBid.setTestMode(Bool)", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "[HyBid setTestMode:BOOL];", "language": "objectivec" } ] } [/block] **Location tracking** If the user has given location permissions, HyBid SDK will use the available user location to provide better targeted ads. This feature is enabled by default, but can be disabled by setting the **setLocationTracking** on the HyBid class: [block:code] { "codes": [ { "code": "HyBid.setLocationTracking(Bool)", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "[HyBid setLocationTracking:BOOL];", "language": "objectivec" } ] } [/block] ** Location updates** The SDK refreshes the user location after every ad request if the user has given permission for location tracking. This is done to keep the best accuracy possible. However if the app will do many requests in a short time it might display location updates very often which can be intrusive for some users. You can disable this behaviour by setting the **setLocationUpdatesEnabled** on the HyBid class: [block:code] { "codes": [ { "code": "HyBid.setLocationUpdates(Bool)", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "[HyBid setLocationUpdates:BOOL];", "language": "objectivec" } ] } [/block] Keep in mind that if location tracking is disabled, anything you set in here will have no effect since location tracking will be disabled globally for HyBid SDK ** Skip Offset** You can define manually a global minimum amount of seconds until the ad can be skipped for HTML and Video Interstitials. [block:code] { "codes": [ { "code": "HyBid.setInterstitialSkipOffset(10) //10 seconds", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "[HyBid setInterstitialSkipOffset:10]; //10 seconds", "language": "objectivec" } ] } [/block] **Automatically close Video Interstitial** You can choose whether to close Video Interstitials automatically after video ends. The default value is `NO`. [block:code] { "codes": [ { "code": "HyBid.setInterstitialCloseOnFinish(Bool)", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "[HyBid setInterstitialCloseOnFinish:BOOL];", "language": "objectivec" } ] } [/block] **Targeting** If you want to improve targeting, first configure the **`HyBidTargetingModel`** object that you want to pass on and then invoke the following method: [block:code] { "codes": [ { "code": "var targeting = HyBidTargetingModel()\ntargeting.age = <AGE>\ntargeting.interests = <ARRAY_OF_THE_INTERESTS>\ntargeting.gender = \"<GENDER>\" // \"f\" for female, \"m\" for male\nHyBid.setTargeting(targeting)", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "HyBidTargetingModel *targeting = [[HyBidTargetingModel alloc] init];\ntargeting.age = <AGE>;\ntargeting.interests = <ARRAY_OF_THE_INTERESTS>;\ntargeting.gender = \"<GENDER>\"; // \"f\" for female, \"m\" for male\n[HyBid setTargeting:targeting];", "language": "objectivec" } ] } [/block] [block:api-header] { "title": "Logging" } [/block] You can control the level of log that you want to see in your console. As default **`HyBidLogger`** is set to **`HyBidLogLevelDebug`**. There are 5 HyBidLogLevels; - HyBidLogLevelNone - HyBidLogLevelError - HyBidLogLevelWarning - HyBidLogLevelInfo - HyBidLogLevelDebug If you want to set a different HyBidLogLevel in your app, the best place is to do it in the HyBid initialization part. [block:code] { "codes": [ { "code": "HyBid.initWithAppToken(\"<YOUR_APP_TOKEN_HERE>\") { (success) in\n if (success) {\n HyBidLogger.setLogLevel(HyBidLogLevelDebug)\n print(\"HyBid Successfully Initialized\")\n }\n }", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": " [HyBid initWithAppToken:@\"<YOUR_APP_TOKEN_HERE>\" completion:^(BOOL success) {\n if (success) {\n [HyBidLogger setLogLevel:HyBidLogLevelDebug];\n NSLog(@\"HyBid initialisation completed\");\n }\n }];", "language": "objectivec" } ] } [/block] [block:api-header] { "title": "SKAdNetwork" } [/block] **`SKAdNetwork`** is an attribution solution introduced by Apple. It validates advertiser-driven app installations without disclosing user-level data. With the iOS 14 update, the utilization of **`SKAdNetwork`** framework will become more important since IDFA (Apple’s Identifier for Advertiser) is going to be opted-out by default. The 'opted-out by default' setup was originally planned to happen with the release of iOS 14, but has been delayed to early next year. To prepare the change in time, we suggest you to already start adding support for **`SKAdNetwork`**. 1. Add each **`SKAdNetwork`** ID with the key **`SKAdNetworkIdentifier`** as a list to your App's **`Info.plist`** under the key **`SKAdNetworkItems`**. PubNative's SKAdNetwork ID is: **`TL55SBB4FM.skadnetwork`** [block:code] { "codes": [ { "code": "\t<key>SKAdNetworkItems</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>SKAdNetworkIdentifier</key>\n\t\t\t<string>TL55SBB4FM.skadnetwork</string>\n\t\t</dict>\n\t</array>", "language": "xml" } ] } [/block] 2. Set your AppStore ID [block:code] { "codes": [ { "code": " HyBid.setAppStoreAppID(\"NUMERIC_APPSTORE_ID_HERE\")", "language": "swift" } ] } [/block] [block:code] { "codes": [ { "code": "[HyBid setAppStoreAppID:@\"NUMERIC_APPSTORE_ID_HERE\"];", "language": "objectivec" } ] } [/block] ***[Return to the HyBid](http://developers.pubnative.net/v3.0/docs/hybid-ios-sdk)*** ***[Return to the MoPub Adapter](http://developers.pubnative.net/v3.0/docs/hybid-ios-sdk-adapter-for-mopub)*** ***[Return to the MoPub Pre-Bid](http://developers.pubnative.net/v3.0/docs/hybid-ios-sdk-pre-bid-for-mopub)*** ***[Return to the DFP Pre-Bid](http://developers.pubnative.net/v3.0/docs/hybid-ios-sdk-pre-bid-for-dfp)***