OfferDaddy iOS SDK Surveys Wall
Steps to integrate OfferDaddy SDK into new project:
- Open your project in Xcode.
- Navigate to where you uncompressed the SDK and drag OfferDaddySDK.framework and OfferDaddySDK.bundle into your project in Xcode.
- Select your project file, select target, and select the Build Phases sub-tab. Make sure that OfferDaddySDK.framework is under Link Binary With Libraries section and OfferDaddySDK.bundle is under Copy Bundle Resources section.
- If you don’t have NSPhotoLibraryUsageDescription key in your project’s Info.plist file – please add the following code:
<string>Allow access to the Photo Library to upload screenshot for missing coins.<string>
- If you project is written in Swift, then add following code to your Objective-C bridging header:
Note: Xcode offers to create this header file when you add/create an Objective-C file to an existing Swift app.
- Import OfferDaddy header file into AppDelegate if your project is written in Objective-C
- Add SDK configuration code to AppDelegate application:didFinishLaunchingWithOptions: function:
[[OfferDaddy sharedInstance] configureWithAppId:<Application Key> token:<App Token> userId:<Unique User ID>];
OfferDaddy.sharedInstance().configure(withAppId: <Application Key>, token: <App Token>, userId: <User Id>)
- You should get the Application Key and App Token from your control panel's App Integrate section
- Now you are ready to use the SDK. Try to present Offers Wall with a following code:
[[OfferDaddy sharedInstance] presentOffersFromViewController: <ViewController>];
- Where ViewController, controller from which to show offers wall.