swiftsprite-kitrevmobrevmobads

Integrating Revmob into SpriteKit Swift game


How would you go about integrating Revmob ads into a SpriteKit Swift game. I tried following the same tutorial Revmob has for Swift apps but it was not the same as a SpriteKit game in Swift. SpriteKit games in Swift for some reason do not allow you to make a bridging header. Does anybody know how to do this?


Solution

  • Based on your last comment, I suggest you do the following (as per the instructions on the RevMob website).

    1. Create the SWIFT game project.
    2. Add the required frameworks: SystemConfiguration.framework, StoreKit.framework, MediaPlayer.framework, AdSupport.framework and the downloaded RevMobAds.framework.
    3. Create a new file. Make sure you are selecting from the relevant iOS/OS X section, select Source and Objective-C File.
    4. Use "mapApp-Bridging-Header" as the file name (not sure if the name really matters but it's what they are using in the tutorial). Leave the File Type as Empty and click Next.
    5. The usual save file screen appears. Make sure your Target(s) selected.
    6. At this point you will be prompted if you "Would like to configure an Objective-C bridging header". Click Yes. NOTE: this prompt will appear only once as the header file will be created and will stay in your project. Subsequent file creations will not ask for this again, unless you delete the files. See attached pic.

    enter image description here