Install SDK
Last updated
Last updated
This guide provides a comprehensive walkthrough for integrating the MyChips SDK into your iOS application, enabling the display of an engaging offerwall.
In your project in Xcode go to File -> Add Package Dependencies and then add the dependency using the following repo:
Now in your project you can import the SDK:
Before using the sdk or showing the offerwall you must initialize it:
Obtain your API key from
3.1 (Optional) Set userId if you have your own unique id
Replace
"
YOUR_USER_ID"
with your actual user ID variable or value.
If you do not provide a specific user ID, one will be automatically generated.
To display the offerwall we provide you with a UIViewController which you can integrate into UIKit or SwiftUI project.
To show the offerwall you need to provide your AdUnitId and a closure which closes the offerwall.
For SwiftUI first we need to wrap the UIViewController:
Now we use the wrapper in our view. Since in this example we will use it in a NavigationView we hide the default back button since the offerwall provides its own:
Now we can add this page to our NavigationView and show the offerwall on a button press:
Your Ad unit ID can be found