2015-02-04

Admob integration in Cocos2d-x v3.4 with plugin-x (iOS - part 2/3)

<- to Part 1/3


1. Add next 2 projects to Xcode.

MyGame/cocos2d/plugin/protocols/proj.ios/PluginProtocol.xcodeproj
MyGame/plugin/plugins/admob/proj.ios/PluginAdmob.xcodeproj



Caution : To support iOS 5 devices, change the Library project's "iOS Deployment Target" to iOS5.0




2. At the Project Setting, add Dependency and Library to 2 Library Projects.





3. Set the User Header Search Path to recursive.



4. Add a flag -ObjC at the Linking>Other Linker Flags.



5. Add a Frameworks for AdMob/iAd/InMobi.


AdSupport.framework (optional)
CoreLocation.framework
CoreTelephony.framework
EventKit.framework
EventKitUI.framework
GameController.framework (optional)
iAd.framework
libsqlite3.0.dylib
MediaPlayer.framework
MessageUI.framework
Security.framework
Social.framework (optional)
StoreKit.framework
SystemConfiguration.framework





6. Setting the Ad Unit ID

At your AdMob page, check the ID in form of "ca-app-pub-0000000000000000/0000000000"


Copy and paste to the source code



7. Result

admob



iAd






댓글 5개:

  1. Any simple example "MyGame" to download Sir for practice your tutorials ?

    Regards

    답글삭제
    답글
    1. Full cocos2d-x project source is huge. So create your own "MyGame" project and follow this tutorial.

      삭제
  2. You are currently using version 6.9.2 of the SDK, which doesn't officially support iOS 8. Please consider updating your SDK to the most recent sdk version, 7.1.0, to get iOS 8 support, including a fix for smart banner rendering in landscape mode. The latest SDK can be downloaded from http://goo.gl/iGzfsP. A full list of release notes is available at https://developers.google.com/mobile-ads-sdk/docs/admob/ios/rel-notes.

    Can you update newest sdk for ios? thank!

    답글삭제
  3. could you please upload the scene classes because i did'nt get which _listener you used..

    답글삭제