広告ユニットのページから、“Code Integration”をクリックして広告ユニットコードを取得できます。
広告ユニットが作成されると、技術ガイドに従ってSDKの組み込みを開始できます。
Generating Ad Unit Code for IntegrationFrom the Ad Unit page, you can pull the ad unit code by clicking “Code Integration”. Once all your ad units have been created, you can follow our technical guide to begin integration of the SDK. |
Code Integration Tutorial |
チェックボックスの Copy items into destination group’s folder にチェックを入れて、Finishをクリックします。
-fno-objc-arcコンパイラフラグを設定してMoPub SDKファイルのビルドではARC を使わないよう指示する必要があります。
(*) Note: if your project’s deployment target is below iOS 6.0, the frameworks starred above should be linked as “Optional” rather than “Required”.
1 Integrate the MoPub SDK into your project1 Unzip the bundle file and drag the MoPubSDK folder into your project Check the box marked Copy items into destination group’s folder and then click Finish. Using Automatic Reference Counting (ARC)?You’ll need to tell the compiler to build the MoPub SDK files with ARC disabled, via the -fno-objc-arc compiler flag.
2 Add the following frameworks to your project:
(*) Note: if your project’s deployment target is below iOS 6.0, the frameworks starred above should be linked as “Optional” rather than “Required”. 3 Add the -ObjC linker flag in your application target’s build settings.
|
テスト端末やシミュレータ上で広告が表示されるか検証します。
2 iOS Banner Code Integration1 In your view controller’s header file:
2 In your view controller’s implementation file:
3 You’re done! Verify that you can see an ad on your test device or simulator. |
より高度な組み込みについては以下の記事を参照してください:
3 Set up advanced features(optional)Please see these resources for help on more advanced integration: |