IOS

CastarSdk for IOS

Overview

2024-11-04

CastarSdk SDK for IOS helps you make money with Android apps. You only need to integrate once and reap the benefits easily. It provides an integration package to support Android applications developed using Objective-C/Swift. After 48 hours, you'll see revenue data in your dashboard. This document has a complete integrated solution and takes approximately 45 minutes to complete.

Integration optionsSupports:

iOS 12.0+, Xcode15.3+

Step 1:Apply for ClientId

Go applications-> Add -> create your ClientId for IOS

Step 2:Download

Click to download now. SDK for iOS

Step 3:Install the SDK

Copy the unzipped CastarSDK.framework file to the project folder

Step 4:Set up the SDK

Select the TARGETS > Project Name > General > Frameworks, Libraries, and Embedded Content menus, add the CastarSDK.framework file, and set the Embed property to Embed & Sign to keep the SDK dynamic library consistent with the application signature. At this point, the SDK import is complete

(1) Refer the CastarSDK.framework file to the project.

(2) Ensure that the Embed option of CastarSDK.framework in Frameworks, Libraries, and Embedded Content is set to Embed&Sign.

(3) Add the header file "import CastarSDK" to the referenced files.

(4) Set the ClientId and start the SDK.

Example: Your CliendId is "CSK****FHQlUQZ"
import UIKit
import CastarSDK

class ViewController: UIViewController {

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view.

    // Set ClientId
    let key = "CSK****FHQlUQZ"
                
    // Create a Castar instance
    let result = Castar.createInstance(devKey: key)
            
    switch result {
    case .success(let castarInstance):
        // The instance is created and started
        castarInstance.start()
                
    case .failure(let error):
        // Handle errors
        print("Failed to initialize Castar: \(error.localizedDescription)")
    }
 
                

Step 5:SDK API

(1) Start the SDK

// Start the SDK
castarInstance.start()

(2) Stop the SDK when you need to do.

// Stop the SDK
castarInstance.stop()

Other questions

How to check the docking status after the docking is completed?

You can check the docking status of the SDK in the Dashboard - Applicatiopns menu. After the SDK is integrated and initialized successfully, you can check the activation status on the Dashboard. There is a 10-15 minute delay in the first activation status. Please wait patiently for the status update.

After the docking is completed, there is no data on the dashboard after the hang-up test?

Our Dashboard data refresh time is 0:00 every day to settle the previous day's earnings. After you generate data today, please query the test data the next day. We will settle your previous day's earnings the next day.

Contact us

If you have other questions, you can consult through the Livechat customer service window on the right side of the dial and official website, or you can contact our customer service staff through the following channels

Official email : support@castarsdk.com

WhatsAPP : https://whatsapp.com/channel/0029Vb0bHo50gcfFe6kQJR0a

Skype : https://join.skype.com/invite/ptBB6eukfkdX

Last updated