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?
Asked
Active
Viewed 344 times
1
-
All the instructions on how to incorporate RevMob into iOS, including SWIFT and objective C, are right on the RevMob website. http://sdk.revmobmobileadnetwork.com/ios.html – sangony Feb 25 '15 at 16:02
-
thats what I am saying. I tried the tutorial on the rev mob website for swift but for some reason sprite kit does not allow me to create a bridging header. – PoKoBros Feb 25 '15 at 16:59
-
1You have to be more specific. How is it not allowing you to create the bridging header? What steps are you taking and at what point do things go wrong for you? – sangony Feb 25 '15 at 17:18
-
So I add a .h file and when I do there is no option that says to create a bridging header. I then add the Revmob framework import statement. The app builds without errors. Then when I set in the build settings "Define modules" to yes and Objective-C bridging header to my .h file Xcode says that the .h file does not exist. – PoKoBros Feb 25 '15 at 17:21
1 Answers
2
Based on your last comment, I suggest you do the following (as per the instructions on the RevMob website).
- Create the SWIFT game project.
- Add the required frameworks: SystemConfiguration.framework, StoreKit.framework, MediaPlayer.framework, AdSupport.framework and the downloaded RevMobAds.framework.
- Create a new file. Make sure you are selecting from the relevant iOS/OS X section, select Source and Objective-C File.
- 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.
- The usual save file screen appears. Make sure your Target(s) selected.
- 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.

sangony
- 11,636
- 4
- 39
- 55