Add SohaGame SDK to Xcode project¶
Prerequisites¶
- Install the following: Xcode 15.3 or later
- Make sure that your project meets these requirements:
- iOS 13
- Set up a physical Apple device or use a simulator to run your app.
Download and install the SDK¶
Step 1: Download¶
The SDK is distributed as a static framework, so you need to manually download the SDK and 3rd party dependency frameworks, then add it to your Xcode project.
The SDK requires the following 3rd party dependency frameworks:
- Firebase
- Google SignIn
- Appsflyer
- TikTok
Download all 3rd party dependency frameworks
Step 2: Unzip¶
Unzip all the .zip
files you just downloaded.
Step 3: Import in project¶
Warning
Do not embed these XCFrameworks. These XCFrameworks must be set to Do Not Embed
.
-
Drag the
SohaSDK.xcframework
+SohaSDK.bundle
and all folder of dependent frameworks, drop it into your Xcode project. In the dialog box that appears, make sure the target you want the framework to be added to has a checkmark next to it, and that you've selected "Copy items if needed". -
Add the
-ObjC
,-weak_framework SwiftUI
flag to Other Linker Settings:a. In your project settings, open the Settings panel for your target.
b. Go to the Build Settings tab and find the Other Linker Flags setting in the Linking section.
c. Double-click the setting, click the '+' button, then add
-ObjC
,-weak_framework
andSwiftUI
-
Add
libc++.tbd
,libz.1.2.5.tbd
,Accelerate.framework
.a. Go to the Build Phase tab and expand the Link Binary With Libraries build phase
b. Click the '+' button, find and add
libc++.tbd
,libz.1.2.5.tbd
,Accelerate.framework
.These are the system libraries and frameworks that the Facebook SDK depends on, you need to add them in order for everything to work properly.