{"_id":"58fa7d28a02bcf1900c4390d","version":{"_id":"5429beef1163360800ed31fd","__v":22,"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","5a3718305c66a60012d960ba"],"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"},"githubsync":"","parentDoc":null,"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-04-21T21:44:08.147Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"Welcome to Polymorph iOS SDK Demand Partner Integration wiki! Please check out the **[iOS SDK](https://dev.getpolymorph.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 Polymorph SDK, copy the corresponding networks' adapter into your project\n3. Setup the expected JSON response on the Polymorph dashboard.\n[block:api-header]\n{\n  \"title\": \"Facebook\"\n}\n[/block]\n1. Download the Facebook SDK from [here](https://developers.facebook.com/docs/audience-network/download/#ios) and follow their integration guide to get it included into your xcode project\n2. Download the Polymorph 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\n\nOn Polymorph dashboard,\n1. Click on the [**Programmatic**](https://console.getpolymorph.com/demand/#/) tab\n2. Click on the [**Bidders & Networks**](https://console.getpolymorph.com/demand/#/network) tab\n3. Click the [**+Network**](https://console.getpolymorph.com/demand/#/network/create/) button\n\nSelect \"Facebook\" from the \"mobile_sdk\" section 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/3647bd8-Screen_Shot_2018-01-29_at_12.18.30_AM.png\",\n        \"Screen Shot 2018-01-29 at 12.18.30 AM.png\",\n        1048,\n        614,\n        \"#3a4b5d\"\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 Polymorph 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 on facebook dashboard\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/65e9e6c-Screen_Shot_2018-08-29_at_11.06.12_AM.png\",\n        \"Screen Shot 2018-08-29 at 11.06.12 AM.png\",\n        1398,\n        956,\n        \"#eaecee\"\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 Polymorph 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\n\nFollow the same steps for setting up the network campaign on Polymorph dashboard as shown for Facebook\n\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 Polymorph 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\n\nFollow the same steps for setting up the network campaign on Polymorph dashboard as shown for Facebook\n\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 **Polymorph** 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 Polymorph server to server API integration here : https://dev.getpolymorph.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 Polymorph 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\n\nFollow the same steps for setting up the network campaign on Polymorph dashboard as shown for Facebook","excerpt":"","slug":"ios-sdk-demand-partner-integration","type":"basic","title":"iOS SDK Demand Partner Integration"}

iOS SDK Demand Partner Integration


Welcome to Polymorph iOS SDK Demand Partner Integration wiki! Please check out the **[iOS SDK](https://dev.getpolymorph.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 Polymorph SDK, copy the corresponding networks' adapter into your project 3. Setup the expected JSON response on the Polymorph dashboard. [block:api-header] { "title": "Facebook" } [/block] 1. Download the Facebook SDK from [here](https://developers.facebook.com/docs/audience-network/download/#ios) and follow their integration guide to get it included into your xcode project 2. Download the Polymorph SDK from here. From the "Mediation Networks" folder, copy the following files into your xcode project * FacebookNativeCustomEvent.h * FacebookNativeCustomEvent.m * FacebookNativeAdAdapter.h * FacebookNativeAdAdapter.m On Polymorph dashboard, 1. Click on the [**Programmatic**](https://console.getpolymorph.com/demand/#/) tab 2. Click on the [**Bidders & Networks**](https://console.getpolymorph.com/demand/#/network) tab 3. Click the [**+Network**](https://console.getpolymorph.com/demand/#/network/create/) button Select "Facebook" from the "mobile_sdk" section 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/3647bd8-Screen_Shot_2018-01-29_at_12.18.30_AM.png", "Screen Shot 2018-01-29 at 12.18.30 AM.png", 1048, 614, "#3a4b5d" ] } ] } [/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 Polymorph 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 on facebook dashboard [block:image] { "images": [ { "image": [ "https://files.readme.io/65e9e6c-Screen_Shot_2018-08-29_at_11.06.12_AM.png", "Screen Shot 2018-08-29 at 11.06.12 AM.png", 1398, 956, "#eaecee" ] } ] } [/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 Polymorph 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 Follow the same steps for setting up the network campaign on Polymorph dashboard as shown for Facebook 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 Polymorph SDK from here. From the "Mediation Networks" folder, copy the following files into your xcode project * InMobiNativeCustomEvent.h * InMobiNativeCustomEvent.m * InMobiNativeAdAdapter.h * InMobiNativeAdAdapter.m Follow the same steps for setting up the network campaign on Polymorph dashboard as shown for Facebook 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 **Polymorph** and **Yahoo! Flurry**. Requires ZERO lines of code change in your App. You can find simple steps to tap into Flurry demand via existing Polymorph server to server API integration here : https://dev.getpolymorph.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 Polymorph SDK from here. From the "Mediation Networks" folder, copy the following files into your xcode project * FlurryNativeCustomEvent.h * FlurryNativeCustomEvent.m * FlurryNativeAdAdapter.h * FlurryNativeAdAdapter.m Follow the same steps for setting up the network campaign on Polymorph dashboard as shown for Facebook