iOS Unity Manual Integration
- Download the SDK
Go to the TradPlusSDK download platform and choose non-cocoapod integration. Select the third-party ad platforms you need according to your requirements. After generating the integration code, download the zip package containing TPSDK and the third-party resources.
- Add the downloaded SDK to your Xcode project
Export the iOS Xcode project from the Unity project
Add the TradPlusFrameworks folder from the unzipped zip package to your Xcode project.
Note: Make sure to check "Copy items if needed" when copying.
For Unity 2019 and above, add it under UnityFrmework.
- Project configuration
Add
-ObjC
to the "Other Linker Flags" in UnityFramework. Specific location: Xcode project configuration "TARGETS" > "Build Setting" > "Linking" > "Other Linker Flags".Add system dependencies in "Framework and Libraries" of "TARGETS" > "General".
Common system dependencies, add them based on the requirements of the third-party resources.
- libz.tbd
- libbz2.tbd
- libxml2.tbd
- libresolv.9.tbd
- libc++.tbd
- libc++abi.tbd
- Accelerate.framework
- CoreImage.framework
- CoreLocation.framework
- AppTrackingTransparency.framework
- EventKit.framework
- EventKitUI.framework
- NetworkExtension.framework (for start.io)
- DeviceCheck.framework (for v4.7.1.1+ TikTok)
If you are using certain platform frameworks, set them to "Embed & Sign" in the "Framework and Libraries" section of "TARGETS" > "General".
- SuperAwesome: Alamofire.framework, Moya.framework, SuperAwesome.framework, SwiftyXMLParser.framework (versions prior to v8.6.0)
- Smaato: OMSDK_Smaato.framework
- Kwai: KSAdSDK.framework
- Mate: FBAudienceNetwork.framework (starting from v6.10.0)
- Verve: OMSDK_Pubnativenet.framework, HyBid.framework
- Ogury: OMSDK_Ogury.framework(before v4.1.1)
- Bigo: OMSDK_Bigosg.framework
- Fyber: IASDKCore.framework (starting from v8.2.1)
- Start.io: StartApp.framework (v4.9.1)
- Tapjoy: Tapjoy.framework (starting from v13.3.0)
Issues with integrating third-party dynamic libraries in Unity 2019 and above
In Unity 2019 and above, directly adding dynamic libraries to UnityFramework will result in a "library not found" error when the app starts.
Follow these steps for configuration:
- First, remove these dynamic libraries from "Framework and Libraries" in UnityFramework's "TARGETS" > "General".
If there are FBAudienceNetwork.framework and KSAdSDK.framework in the image, remove them.
- Then manually add the dynamic libraries to Unity-iPhone's "TARGETS" > "General" in "Framework and Libraries" and make sure they are set to "Embed & Sign" status. (You can drag and drop to add them)
- Finally, add the framework reference in UnityFramework's "Build Setting" > "Linking" > "Other Linker Flags".
The general format is: -framework framework_name
For example: -framework FBAudienceNetwork