Documentation
Offerwall iOS SDK
Our OfferWall iOS SDK minimizes the development time to integrate Offerwall in your application in several simple steps. Follow our instructions and start earning today!
How does it work?
You (Merchant) need to create the button that will call the SDK to show the Offerwall. We suggest the following names for the button: “Earn (virtualCurrencyName)s” “Earn free (virtualCurrencyName)s”
The OfferWall SDK is called with a block method and displays a pop-up dialog with the Offerwall widget.
Credentials
Your mobile integration requires a Project Key and Widget Version Code (mw1 or mw6, where mw6 is the brand new one) of your choice.
You can obtain these Paymentwall API credentials in the application settings of your Merchant Account at Paymentwall.com
Add SDK to your project
- In the Menu bar, click "File" then "Add file to YOUR_PROJECT".
- Select the "Offerwall" directory in the downloaded repository.
- Make sure “Copy items into destination group's folder (if needed)” is checked.
- Click "Add".
- Click on your project. In “Targets” tab, click in "Build Settings".
- In the "Header Search Paths", add link to include the file of SDK such as: "$SOURCE_ROOT/OfferWallSDK/include"
- In the "Library Search Paths", add link to the file "OfferWall.a"
- In your Project's "Build Phases" tab, add "OfferWallResources.bundle" to "Copy Bundle Resources"
- In your Project's "Build Settings" tab, add "-ObjC" and "-all_load" to "Other Linker Flags"'
Integration
Add the following imports
Objective-C
import "OfferWall.h"
Swift
Add this command to your Bridging-Header.h file
import "OfferWall.h"
Create Offerwall request
Objective-C
[OfferWall setApplicationKey:YOUR_APPLICATION_HERE
andWidgetCode:WIDGET_VERSION];
Swift
OfferWall.setApplicationKey:(YOUR_APPLICATION_HERE
andWidgetCode:WIDGET_VERSION)
Start Offerwall dialog
Objective-C
OffeWallViewController *viewcontroller = [OfferWall createNewOfferWallViewController];
[viewcontroller showOfferWallWithParentViewController:self completion:^(int status){
}];
Swift
//Create OfferWall Dialog
var viewController: OfferWallViewController = OfferWall.createNewOfferWallViewController()
viewController.showOfferWallWithParentViewController(self, completion:{ (status) -> Void in
})