iOS Installation
To integrate the SnapOdds SDK in your project, open your iOS project's xcworkspace file with Xcode.
Add Native SDK with Swift Package Manager
To integrate via SwiftPM, add the location of the github repository and the version to your Package.swift file, as shown below:
This can also be done by adding the repository and version through the Xcode UI by selecting your project and adding the SwiftPM package under Package Dependencies.
Add React Native SDK Module
Add the files SnapscreenSDKModule.swift and SnapscreenSDKModuleBridge.h from our provided sample project here on Github to your Xcode project.
Add Objective-C bridging header
If your project does not yet contain an Objective-C bridging header, you also need to add a bridging header to make our SDK integration work.
To do so, create a new Header File and name it <project-name>-Bridging-Header.h.
Add the following line to the bridging header:
Then open your target's Build Settings (by navigating to your project, then clicking on the application Target and selecting Build Settings from the top menu.
Search for the setting names Objective-C Bridging Header and set it to the name of your newly created header file.
If your newly created header file is not placed in the same folder as your xcworkspace file, you might need to adapt the settings' value to include the full relative path.
Last updated