Offerwall SDK Integration: iOS Complete Tutorial
Prerequisites
- Perkox publisher account
- App ID and SDK Key
- iOS 13.0+, Swift 5.7+, Xcode 14+
Step 1: Add the SDK
Download the Perkox iOS SDK. In Xcode: File → Add Package Dependencies → Add Local → select the extracted SDK folder containing PerkoxOfferwall.xcframework.
Step 2: Initialize and Launch
import PerkoxOfferwall
let offerwall = PerkoxOfferwall.create(
appId: "YOUR_APP_ID",
sdkKey: "YOUR_SDK_KEY",
playerId: "Player_123"
)
offerwall.launch(viewController: self)
Step 3: Handle Events
offerwall.onReward = { reward in
DispatchQueue.main.async {
let amount = reward["amount"] as? Double ?? 0
let status = reward["status"] as? String ?? "?"
print("Reward: \(amount), Status: \(status)")
}
}
offerwall.onClose = {
DispatchQueue.main.async { print("Offerwall closed") }
}
SDK callbacks = UI feedback only. Server postback = actual reward credit.
Step 4: Configure Postback
Set your postback URL in the Perkox Publisher Dashboard. Handle all four statuses: pending, approved, rejected, reversed.
Troubleshooting
No such module ‘PerkoxOfferwall’: Verify package was added to your target. Clean build folder (Cmd+Shift+K).
Offerwall not loading: Verify appId/sdkKey. Check internet. Confirm app is active in dashboard.
