Skip to main content

iOS Xcode project integration process

一、Download SDK#

Enter the TradPlusSDK download platform,select non-cocoapod access, select the required third-party advertising platform according to your needs, click Generate access code, and download the zip package containing TPSDK and third-party sources.

二、Add the downloaded SDK to your Xcode project#

  • Exporting an iOS Xcode project from a Unity project

  • Add the TradPlusFrameworks in the unzipped zip package to the Xcode project

Note: Check Copy itmes if needed when copying.

2019 and above versions are added to UnityFormwork

三、Project Configuration#

  • Add -ObjC to "Other Linker Flags" of UnityFramework. Specific location: Xcode project configuration "TARGETS" > "Build Setting" > "Linking" > "Other Linker Flags"

  • Add system dependency libraries in "Framework and Libraries" in "TARGETS" > "General" of UnityFramework

  • Commonly used system dependency libraries, added according to third-party source requirements

    • 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 (start.io)
    • DeviceCheck.framework (v4.7.1.1+ pangleCN)
    • CoreML.framework(v6.3.0.6+ pangleCN)
  • If you use the following platform frameworks, you need to set them to Embed & Sign in "Framework and Libraries" in "TARGETS" > "General".

    • SuperAwesome: Alamofire.framework , Moya.framework , SuperAwesome.framework , SwiftyXMLParser.framework (Before v8.6.0)
    • Smaato: OMSDK_Smaato.framework
    • 快手: KSAdSDK.framework
    • Mate: FBAudienceNetwork.framework (v6.10.0-v6.14.0)
    • Verve: OMSDK_Pubnativenet.framework , HyBid.framework
    • Ogury: OMSDK_Ogury.framework
    • Bigo: OMSDK_Bigosg.framework(Before v4.1.1)
    • Fyber:IASDKCore.framework (v8.2.1+)
    • Start.io: StartApp.framework (v4.9.1)
    • Tapjoy: Tapjoy.framework (v13.3.0+)
    • AppLovin: AppLovinSDK.framework(v12.4.1+)
    • InMobi: InMobiSDK.framework(v10.7.2+)

Issues with integrating third-party dynamic libraries in 2019 and above versions#

In versions 2019 and above, directly adding a dynamic library to UnityFramework will result in an error that the dynamic library cannot be found when the App starts.

The following steps are required for configuration processing

  • First remove these dynamic libraries from "Framework and Libraries" in "TARGETS" > "General" of UnityFramework

As shown in the figure, there are two dynamic libraries, FBAudienceNetwork.framework and KSAdSDK.framework, that need to be removed

  • Then manually add the dynamic library to "Framework and Libraries" in "TARGETS" > "General" of Unity-iPhone and confirm whether it is in the Embed & Sign state. (You can drag and drop to add)

  • 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