Step 1. Configure Your Xcode Project
Last updated
Last updated
Unzip the SDK package and create a folder under your App project via ”Finder”, then copy the following flies into the folder you just created:
ce-*.a
I2WAPI.h
CEVideoViewProfile.h
IWOWMoatMobileAppKit.framework
CrystalExpress.plist
The necessary “.h” files for your AD format
(ex. Copy “CERewardedVideoAD.h”, if you gonna integrate rewarded video into your App )
Drag the folder you created from “Finder” into “Project Navigator” (the left bar of the Xcode project), and the below window would pop out. Please ensure the target of your app has been chosen in “Add to Target”, like the picture.
Choose your app target, please ensure the following file is added in the section of “Copy Bundle Resources” from “Build Phases” page:
CrystalExpress.plist
If not, press the “+” button to add the file
IMPORTANT!
Set the Crystal_Id
value in CrystalExpress.plist to the Crystal ID you received from intowow account manager.
At the same page, "Build Phases", please ensure the following files are added in the section of "Link Binary with Libraries":
ce-*.a
IWOWMoatMobileAppKit.framework
If not, press the “+” button to add files.
Moreover, add the following dylibs to your build target in the same page
libz.tbd
libsqlite3.tbd
libicucore.tbd
Other Linker Flags
Add -ObjC
flag via TARGETS -> Build Settings -> Linking -> Other Linker Flags.
iOS 9 and later versions block http connection by default. Since most of the redirect links of ads use HTTP protocol, we have to modify Info.plist
in your project to allow HTTP connections.
Import I2WAPI.h
in AppDelegate.m
.
Initialize SDK in application:didFinishLaunchingWithOptions:
of AppDelegate.m
:
Enable/disable debugging message from SDK with initWithVerboseLog:(BOOL)
.
Set SDK to test mode by isTestMode:(BOOL)
for development.