{"_id":"58fa7d28a02bcf1900c4390d","version":{"_id":"5429beef1163360800ed31fd","__v":21,"project":"5429beef1163360800ed31fa","createdAt":"2014-09-29T20:19:59.904Z","releaseDate":"2014-09-29T20:19:59.904Z","categories":["5429beef1163360800ed31fe","55e74e1f5d36b32b002563fa","55e7500a73169617001f2e86","55e76b8196131b2f00bf4b72","55e89569cdbb8a350096df9c","55f8935eb089b71700a8364e","55f8a67d3bb4bb0d0022d093","55f9dbefc7ef770d00d9bf6d","5601c21a22ecf60d002b27b3","5601c21ff12aee0d001bb06e","5601c2256c7b610d00280db5","5601c22c22ecf60d002b27b4","5603738d0c78b00d0039af47","5626f70bfcbbc621004ebf52","566f7a1ae144ab0d00e9732f","566f85ca7820960d00c3b93d","56708ce43a32d20d00c45cbf","56708d436995210d003aad8e","5736471abe10a9200030732c","57a82c7aff9bd30e00a6f1c1","591b8500e3992319007190f4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"569d8ad30306a10d00ce9a1f","project":"5429beef1163360800ed31fa","category":{"_id":"566f85ca7820960d00c3b93d","pages":[],"project":"5429beef1163360800ed31fa","version":"5429beef1163360800ed31fd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-15T03:15:22.182Z","from_sync":false,"order":3,"slug":"integrating-for-apps","title":"Integrating for Apps"},"parentDoc":null,"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-04-21T21:44:08.147Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"Welcome to AdsNative iOS SDK Demand Partner Integration wiki! Please check out the **[iOS SDK](https://dev.adsnative.com/docs/ios-sdk)** section before integrating with any partners.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Integrating 3rd Party Demand Networks\"\n}\n[/block]\nThis section details how to integrate other networks for mediation.\n\n**Basic Integration Guidelines**\n\nCurrently, we have built adapters for 4 major ad networks. Depending on which network you wish to integrate, choose the corresponding sub section. However, before diving into one specific network, you have to follow these basic steps for any network you wish to integrate.\n\n1. Download the network's SDK and integrate it into your project\n2. From the \"Mediation Networks\" folder of the downloaded AdsNative SDK, copy the corresponding networks' adapter into your project\n3. Setup the expected JSON response on the AdsNative dashboard.\n[block:api-header]\n{\n  \"title\": \"Facebook\"\n}\n[/block]\n1. Download the Facebook SDK and follow their integration guide to get it included into your xcode project\n2. Download the AdsNative SDK from here. From the \"Mediation Networks\" folder, copy the following files into your xcode project\n  * FacebookNativeCustomEvent.h\n  * FacebookNativeCustomEvent.m\n  * FacebookNativeAdAdapter.h\n  * FacebookNativeAdAdapter.m\n3. On the AdsNative dashboard, go to the \"Networks\" tab and add a new Mobile SDK network\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/7b206ac-Screen_Shot_2017-04-21_at_11.43.39_AM.png\",\n        \"Screen Shot 2017-04-21 at 11.43.39 AM.png\",\n        745,\n        355,\n        \"#f6f7f7\"\n      ]\n    }\n  ]\n}\n[/block]\nChoose \"Facebook\" and enter your facebook credentials. Credentials are used to fetch placement information and reports data for revenue optimization only.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/3a15bb7-Screen_Shot_2017-04-21_at_11.43.39_AM.png\",\n        \"Screen Shot 2017-04-21 at 11.43.39 AM.png\",\n        745,\n        355,\n        \"#f6f7f7\"\n      ]\n    }\n  ]\n}\n[/block]\nOnce created, you will be taken to the network campaign screen where you need to fill in THREE fields\n**Adapter Class Name** (The class name of the AdsNative SDK adapter in your app integration)\n**Placement ID** key's value is your placementId that Facebook gives after you register your app with them.\n**App Token** can be found in facebook dashboard\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/537695d-Screen_Shot_2017-04-21_at_11.48.09_AM.png\",\n        \"Screen Shot 2017-04-21 at 11.48.09 AM.png\",\n        721,\n        290,\n        \"#c7d1d8\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"MoPub\"\n}\n[/block]\n1. Download the MoPub SDK and follow their integration guide to get it included into your xcode project\n2. Download the AdsNative SDK from here. From the \"Mediation Networks\" folder, copy the following files into your xcode project\n  * MoPubNativeCustomEvent.h\n  * MoPubNativeCustomEvent.m\n  * MoPubNativeAdAdapter.h\n  * MoPubNativeAdAdapter.m\n  * MoPubHiddenView.h\n  * MoPubHiddenView.m\n3. On the AdsNative dashboard, go to the \"Networks -> Provider Data\" section and add the following JSON format\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\\"adNetworkClassName\\\": \\\"MoPubNativeCustomEvent\\\", \\\"placementId\\\": \\\"yourMoPubAdUnitId\\\" }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nNOTE: The \"placementId\" key's value is your AdUnitId that MoPub gives after you register your app with them.\n[block:api-header]\n{\n  \"title\": \"InMobi\"\n}\n[/block]\n1. Download the InMobi SDK and follow their integration guide to get it included into your xcode project\n2. Download the AdsNative SDK from here. From the \"Mediation Networks\" folder, copy the following files into your xcode project\n  * InMobiNativeCustomEvent.h\n  * InMobiNativeCustomEvent.m\n  * InMobiNativeAdAdapter.h\n  * InMobiNativeAdAdapter.m\n3. On the AdsNative dashboard, go to the \"Networks -> Provider Data\" section and add the following JSON format\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{ \\\"adNetworkClassName\\\": \\\"InMobiNativeCustomEvent\\\", \\\"placementId\\\": \\\"yourInMobiPlacementId\\\", \\\"accountId\\\": \\\"yourInMobiAccountId\\\" }\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nNOTE: The \"placementId\" key's value is your placement Id that InMobi gives after you register your app with them. The \"accountId\" key's value is your publisher account Id that you get from InMobi's dashboard.\n[block:api-header]\n{\n  \"title\": \"Flurry\"\n}\n[/block]\nFlurry can be integrated either via Server To Server API or as a SDK. Since SDK is heavy and requires client side implementation/changes to app, we **Highly** recommend publishers to use our server-to-server integration that has been established between **AdsNative** and **Yahoo! Flurry**. Requires ZERO lines of code change in your App.\n\nYou can find simple steps to tap into Flurry demand via existing AdsNative server to server API integration here : https://dev.adsnative.com/v1.0/docs/server-to-server-demand-partner-setup#yahoo-flurry-s2s-api-partner\n\n**Flurry SDK Integration**\n1. Download the Flurry SDK and follow their integration guide to get it included into your xcode project\n2. Download the AdsNative SDK from here. From the \"Mediation Networks\" folder, copy the following files into your xcode project\n  * FlurryNativeCustomEvent.h\n  * FlurryNativeCustomEvent.m\n  * FlurryNativeAdAdapter.h\n  * FlurryNativeAdAdapter.m\n3. On the AdsNative dashboard, go to the \"**Networks**\" tab and add a new **Mobile SDK** network type\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0a387f7-Screen_Shot_2017-04-21_at_11.43.39_AM.png\",\n        \"Screen Shot 2017-04-21 at 11.43.39 AM.png\",\n        745,\n        355,\n        \"#f6f7f7\"\n      ]\n    }\n  ]\n}\n[/block]\nChoose \"Flurry from Yahoo!\" and enter your flurry credentials. \nNote : Credentials are used to fetch placement information and reports data for revenue optimization only.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/a8d7131-Screen_Shot_2017-04-21_at_3.06.57_PM.png\",\n        \"Screen Shot 2017-04-21 at 3.06.57 PM.png\",\n        684,\n        450,\n        \"#349bda\"\n      ]\n    }\n  ]\n}\n[/block]\nOnce created, you will be taken to the network campaign screen where you need to fill in TWO fields\n\n**Adapter Class Name** (The class name of the AdsNative SDK adapter in your app integration)\n**Placement ID** key's value is your placementId that Flurry gives after you register your app with them.","excerpt":"","slug":"ios-sdk-demand-partner-integration","type":"basic","title":"iOS SDK Demand Partner Integration"}

iOS SDK Demand Partner Integration


Welcome to AdsNative iOS SDK Demand Partner Integration wiki! Please check out the **[iOS SDK](https://dev.adsnative.com/docs/ios-sdk)** section before integrating with any partners. [block:api-header] { "type": "basic", "title": "Integrating 3rd Party Demand Networks" } [/block] This section details how to integrate other networks for mediation. **Basic Integration Guidelines** Currently, we have built adapters for 4 major ad networks. Depending on which network you wish to integrate, choose the corresponding sub section. However, before diving into one specific network, you have to follow these basic steps for any network you wish to integrate. 1. Download the network's SDK and integrate it into your project 2. From the "Mediation Networks" folder of the downloaded AdsNative SDK, copy the corresponding networks' adapter into your project 3. Setup the expected JSON response on the AdsNative dashboard. [block:api-header] { "title": "Facebook" } [/block] 1. Download the Facebook SDK and follow their integration guide to get it included into your xcode project 2. Download the AdsNative SDK from here. From the "Mediation Networks" folder, copy the following files into your xcode project * FacebookNativeCustomEvent.h * FacebookNativeCustomEvent.m * FacebookNativeAdAdapter.h * FacebookNativeAdAdapter.m 3. On the AdsNative dashboard, go to the "Networks" tab and add a new Mobile SDK network [block:image] { "images": [ { "image": [ "https://files.readme.io/7b206ac-Screen_Shot_2017-04-21_at_11.43.39_AM.png", "Screen Shot 2017-04-21 at 11.43.39 AM.png", 745, 355, "#f6f7f7" ] } ] } [/block] Choose "Facebook" and enter your facebook credentials. Credentials are used to fetch placement information and reports data for revenue optimization only. [block:image] { "images": [ { "image": [ "https://files.readme.io/3a15bb7-Screen_Shot_2017-04-21_at_11.43.39_AM.png", "Screen Shot 2017-04-21 at 11.43.39 AM.png", 745, 355, "#f6f7f7" ] } ] } [/block] Once created, you will be taken to the network campaign screen where you need to fill in THREE fields **Adapter Class Name** (The class name of the AdsNative SDK adapter in your app integration) **Placement ID** key's value is your placementId that Facebook gives after you register your app with them. **App Token** can be found in facebook dashboard [block:image] { "images": [ { "image": [ "https://files.readme.io/537695d-Screen_Shot_2017-04-21_at_11.48.09_AM.png", "Screen Shot 2017-04-21 at 11.48.09 AM.png", 721, 290, "#c7d1d8" ] } ] } [/block] [block:api-header] { "title": "MoPub" } [/block] 1. Download the MoPub SDK and follow their integration guide to get it included into your xcode project 2. Download the AdsNative SDK from here. From the "Mediation Networks" folder, copy the following files into your xcode project * MoPubNativeCustomEvent.h * MoPubNativeCustomEvent.m * MoPubNativeAdAdapter.h * MoPubNativeAdAdapter.m * MoPubHiddenView.h * MoPubHiddenView.m 3. On the AdsNative dashboard, go to the "Networks -> Provider Data" section and add the following JSON format [block:code] { "codes": [ { "code": "{ \"adNetworkClassName\": \"MoPubNativeCustomEvent\", \"placementId\": \"yourMoPubAdUnitId\" }", "language": "json" } ] } [/block] NOTE: The "placementId" key's value is your AdUnitId that MoPub gives after you register your app with them. [block:api-header] { "title": "InMobi" } [/block] 1. Download the InMobi SDK and follow their integration guide to get it included into your xcode project 2. Download the AdsNative SDK from here. From the "Mediation Networks" folder, copy the following files into your xcode project * InMobiNativeCustomEvent.h * InMobiNativeCustomEvent.m * InMobiNativeAdAdapter.h * InMobiNativeAdAdapter.m 3. On the AdsNative dashboard, go to the "Networks -> Provider Data" section and add the following JSON format [block:code] { "codes": [ { "code": "{ \"adNetworkClassName\": \"InMobiNativeCustomEvent\", \"placementId\": \"yourInMobiPlacementId\", \"accountId\": \"yourInMobiAccountId\" }", "language": "json" } ] } [/block] NOTE: The "placementId" key's value is your placement Id that InMobi gives after you register your app with them. The "accountId" key's value is your publisher account Id that you get from InMobi's dashboard. [block:api-header] { "title": "Flurry" } [/block] Flurry can be integrated either via Server To Server API or as a SDK. Since SDK is heavy and requires client side implementation/changes to app, we **Highly** recommend publishers to use our server-to-server integration that has been established between **AdsNative** and **Yahoo! Flurry**. Requires ZERO lines of code change in your App. You can find simple steps to tap into Flurry demand via existing AdsNative server to server API integration here : https://dev.adsnative.com/v1.0/docs/server-to-server-demand-partner-setup#yahoo-flurry-s2s-api-partner **Flurry SDK Integration** 1. Download the Flurry SDK and follow their integration guide to get it included into your xcode project 2. Download the AdsNative SDK from here. From the "Mediation Networks" folder, copy the following files into your xcode project * FlurryNativeCustomEvent.h * FlurryNativeCustomEvent.m * FlurryNativeAdAdapter.h * FlurryNativeAdAdapter.m 3. On the AdsNative dashboard, go to the "**Networks**" tab and add a new **Mobile SDK** network type [block:image] { "images": [ { "image": [ "https://files.readme.io/0a387f7-Screen_Shot_2017-04-21_at_11.43.39_AM.png", "Screen Shot 2017-04-21 at 11.43.39 AM.png", 745, 355, "#f6f7f7" ] } ] } [/block] Choose "Flurry from Yahoo!" and enter your flurry credentials. Note : Credentials are used to fetch placement information and reports data for revenue optimization only. [block:image] { "images": [ { "image": [ "https://files.readme.io/a8d7131-Screen_Shot_2017-04-21_at_3.06.57_PM.png", "Screen Shot 2017-04-21 at 3.06.57 PM.png", 684, 450, "#349bda" ] } ] } [/block] Once created, you will be taken to the network campaign screen where you need to fill in TWO fields **Adapter Class Name** (The class name of the AdsNative SDK adapter in your app integration) **Placement ID** key's value is your placementId that Flurry gives after you register your app with them.