Supports separate integration for Android and iOS;
Supports downloading both domestic and overseas regions simultaneously;
Supports selecting multiple SDK versions;
Modified the storage data method for Network installation;
Notes
If you have integrated the Android Jingdong SDK, you need to set AndroidX to Enable, because the Jingdong SDK requires the AndroidX environment.
If you integrate packages from both regions simultaneously, there will be library conflicts causing build failures for both Android and iOS. You need to specially handle packages you don't want to compile at runtime or delete the SDK for a specific region.
When upgrading from plugin version 2.0.0-2.0.3 to version 2.1.0, you need to delete the Assets/AnyThinkAds and Assets/AnyThinkPlugins folders.
Taku iOS SDK requires version v6.4.93 or lower
Plugin 2.0.0~2.0.3
Region: The plugin provides two region options: China (ChinaMainland) and Overseas (Overseas), which are only used for Android to download the corresponding region's networks. iOS supports global release, so either region can be used.
AndroidX: A collection of support libraries for developing Android applications, applicable only to the Android platform. When selecting the China region, an option is provided to determine whether to use AndroidX. It is worth noting that in the Overseas region, AndroidX is required by default.
Upgrade: If one of the version numbers (Unity 3D Plugin, Android, iOS) is behind the latest version, it is displayed as clickable. After clicking, if Android or iOS needs to be updated, the core package will be automatically downloaded and updated. If the Unity 3D Plugin version needs to be updated, it will redirect to the plugin download page, where you need to manually download the latest plugin and re-import it.
Upgrade All: If there are networks in the currently installed network list that need to be updated, it is displayed as clickable. After clicking, all networks that need updating will be updated at once.
Install: Click to install a network.
Delete Button: Delete an installed network.
Notes
If you switch regions, the installed network lists for both Android and iOS will be cleared. Please confirm the desired region before switching to avoid needing to re-install networks.
Starting from plugin version 2.0.1, the domestic Pangle uses the Csj name, and the overseas Pangle uses the Pangle name.
Open Unity, and select Assets > Import Package > Custom Package in order.
Select the Unity plugin file you downloaded.
In the Import Unity Package dialog, click Import.
After the plugin is imported, check the Unity menu bar options and click AnyThink to open the plugin.
Note: If you have imported an old plugin, you need to delete the old plugin first. Simply delete the AnyThinkPlugin directory under the Assets directory.
Integration Environment
Unity 2019.x.x or later.
Android Build: You need to check "Custom Main Gradle Template" and "Custom Gradle Properties Template" as shown in the image below.
iOS Build: If you have enabled Bitcode, your build will fail. Apple has deprecated Bitcode in Xcode 14. The AnyThink plugin requires CocoaPods. If CocoaPods is not installed, you can follow the instructions in the CocoaPods Getting Started Guide to install CocoaPods.
After installing dependencies using CocoaPods, an xcworkspace project file will be generated. Please use this file to enter the project for subsequent operations.
Notes
iOS Crash When Running, Console Error
If you have chosen to integrate third-party ad platform SDKs that contain dynamic libraries (e.g., GDT, Pangle, AppLovin, Kuaishou, Inmobi, Kwai, etc.), used CocoaPods for integration, and encountered errors like the following at runtime:
Copy
xxxxxxxxx/Frameworks/GDTMobSDK.framework/GDTMobSDK' (no such file)
You can handle it using the following methods:
Method 1: Based on the added Adapters, add the third-party SDK dependencies in the Podfile's Unity-iPhone target. Then re-run pod install to resolve the issue.
Copy
target 'Unity-iPhone' do
#pod 'AppLovinSDK'
#pod 'InMobiSDK'
#pod 'HyBid'
pod 'KwaiAdsSDK'
pod 'MaioSDK-v2',
pod 'OMSDK_Appodeal'
pod 'OgurySdk', '5.0.2'
pod 'smaato-ios-sdk', '22.9.3'
pod 'smaato-ios-sdk/InApp'
pod 'StartAppSDK', '4.10.4'
end
Method 2: Follow the three steps shown in the image below for manual processing (using Kuaishou as an example; for similar errors, you can see the SDK name causing the error in the console, and process each SDK reported in the console in turn, such as GDTMobSDK in the example above)
iOS Pod Network Error, Unable to Pod Successfully
Please try adding the GitHub source at the top of the podfile and removing other sources. Ensure that the current network can access GitHub. If you have a proxy, check whether the terminal has proxy enabled.
Copy
source 'https://github.com/CocoaPods/Specs.git'
Android Cache Handling
Before building Android, to avoid being affected by the cache and causing some networks not to be integrated, it is recommended to click Force Resolve following the steps below:
Menu bar Assets > External Dependency Manager > Android Resolver > Force Resolve.
UnityAds Ad Platform
If you need to integrate the UnityAds ad platform, please check whether the Unity Ads plugin has been introduced in the Package Manager (Window>Package Manager) of the Unity project. If so, please remove it before integrating, otherwise it may cause integration conflicts, Google Store review failures, and other issues.