For the complete documentation index, see llms.txt. This page is also available as Markdown.

iOS SDK

To implement the Direct Manual Import method for the Offer18 iOS SDK, please follow the steps outlined below:

Integration Steps:

  1. Download and Prepare: Unzip the xcframework.zip file to locate the Offer18SDK.xcframework folder.

Download Link:
https://web-resources.offer18.net/sdk/ios/build-file/Offer18SDK.xcframework.zip
  1. Access Xcode: Open the application project in Xcode and select the appropriate Project Target.

  2. Import Framework: Navigate to the General tab and scroll to the Frameworks, Libraries, and Embedded Content section.

  3. Add Files: Drag and drop the Offer18SDK.xcframework folder directly into this section.

  4. Configure Embedding (Required): You must ensure the "Embed" option next to the framework is set to Embed & Sign. Note: Failure to select "Embed & Sign" will cause the application to crash upon launch.

let payload: [String: String] = [
    "offerID":123,
    "event": "register",
    "tid": "tid-1234567890",
    "affiliateID": "123",
    "adv_sub1": "advSub1",
    "adv_sub2": "advSub2",
    "adv_sub3": "advSub3",
    "adv_sub4": "advSub4",
    "adv_sub5": "advSub5",
    "adv_sub7": "advSub7",
    "coupon": "coupon_0124",
    "sale": "", //sale amount
    "payout": "", //payout amount
    "p_sub_aff_id": "pSubAffId",
    "p_country": "IN",
    "p_timestamp": "17905634563",
    "p_postbackid": "23dds", //unique postback ID
    "p_package": "package", //package ID
    "status": "1"
]

do {
    Offer18.setDebugLoggingEnabled(true) // debug trace

    try Offer18.configure(domain: domain, accountID: accountID)

    try Offer18.trackConversion(data: payload, completion: { result in
        switch result {
        case .success(let response):
            print(response.responseBody)
            self.trackResponse = response.responseBody
            self.statusMessage = response.message
        case .failure(let error):
            self.trackResponse = error.localizedDescription
            self.statusMessage = "Tracking failed."
            print(error.localizedDescription)
        }
    })
    statusMessage = "SDK configured successfully."
} catch {
    statusMessage = "Initialization failed: \(error)"
    print(error)
}

Last updated