Integrating Tapjoy into Swift apps is almost the same as it is for Objective-c apps.
1.) Import Tapjoy headers and frameworks into Project as you do in objective-c projects. See link:
2.) Create an Objective-C/Swift bridging header. To do this create a new header file named "[ProjectName]-Bridging-Header.h".
3.) Add the following code to your bridging header:
Import any other headers from the Tapjoy SDK as well.
4.) Next, go to your target’s build settings, search for ‘bridging header’ and set the file path. You can easily find the path by dragging and dropping your bridging header file from the file tree on to the input field.
Once the above steps are complete you can use Tapjoy SDK inside swift class. You do not need to import Tapjoy into any of your Swift files as the bridging header takes care of this.
Some items to note:
• Most of methods and classes are usable by modifying Objective-C style language convention to Swift style: method calling is "." instead of space and brace.
• Variable type definition is post fixed after variable name, separating ":"
• In most cases you need to add ‘!’ mark after type name to skip null check. Similarly, return value might require force casting ‘as! Typename’
Xcode automatically suggests most of the above changes.
p = [TJPlacement placementWithName:@"AppOpen" delegate:self ];
var p:TJPlacement! ..... p = TJPlacement.placement(withName"AppOpen", delegate: self) as! TJPlacement p.requestContent()