Flutter Version Requirement: flutter: ">=2.12.0"
TopOn iOS SDK requires version ≤ v6.4.93
You can refer to Account and Related ID Preparation for instructions on account registration and login.
Refer to the Demo Flutter Demo Github Repository (Click to Redirect)
Two methods are supported for importing the SDK:
flutter pub add secmtp_sdk
After running the command, the following code will be automatically added to the pubspec.yaml file of the project, and flutter pub get will be triggered. You can also manually enter the following code in pubspec.yaml:
dependencies:
secmtp_sdk: ^1.0.8
import 'package:secmtp_sdk/at_init.dart';

secmtp_sdk:
path: ../
import 'package:secmtp_sdk/at_init.dart';
flutter pub add thinkup_sdk
After running the command, the following code will be automatically added to the pubspec.yaml file of the project, and flutter pub get will be triggered. You can also manually enter the following code in pubspec.yaml:
dependencies:
thinkup_sdk: ^1.0.8
import 'package:thinkup_sdk/at_init.dart';
Download the TopOn_Flutter_SDK package and decompress it.
Add the decompressed files to your project. You can also import the decompressed files into a newly created directory.
Locate the pubspec.yaml file in the project and add the local dependency:
thinkup_sdk:
path: ../
import 'package:thinkup_sdk/at_init.dart';
Note: Due to naming differences in the Flutter plugins downloaded from the SDK Download Center by different developers, anythink_sdk.podspec may also be named thinkup_sdk.podspec. Please refer to the actual plugin you downloaded.

The target file is: the anythink_sdk.podspec file in your project directory (or thinkup_sdk.podspec as mentioned in the above note).
Please click here to go to the SDK Download Center, select the platforms to be integrated, choose "Yes" for CocoaPods integration, and then click to generate the integration code. (Take iOS 6.4.26 as an example; it is recommended to use the latest version of the iOS SDK)

Convert the CocoaPods reference code generated in the previous step into the format required by the .podspec file and fill it into anythink_sdk.podspec. Example before and after conversion:
// Before conversion:
pod 'TPNiOS','x.x.xx'
pod 'TPNPangleSDKAdapter','x.x.xx'
pod 'TPNFacebookSDKAdapter','x.x.xx'
pod 'TPNAdmobSDKAdapter','x.x.xx'
pod 'TPNMintegralSDKAdapter','x.x.xx'
Only need to replace pod with s.dependency
// After conversion:
s.dependency 'TPNiOS','x.x.xx'
s.dependency 'TPNPangleSDKAdapter','x.x.xx'
s.dependency 'TPNFacebookSDKAdapter','x.x.xx'
s.dependency 'TPNAdmobSDKAdapter','x.x.xx'
s.dependency 'TPNMintegralSDKAdapter','x.x.xx'
After editing the anythink_sdk.podspec file, open the directory where the iOS podfile is located via terminal and wait for the installation to complete. (If it is not the first installation, you may need to delete the podfile.lock file before executing the command below)
pod install --repo-update


The SKAdNetwork ID of UnityAds varies for each project. If you select this ad platform, please refer to the ID generated in the UnityAds backend and check it in the UnityAds Admin Console.
Please go back to the "SDK Download Center" page opened above, and add the content listed in the "SKAdNetwork IDs Code" section to your Info.plist file. Refer to the figure below:

Please go back to the "SDK Download Center" page opened above again, or directly copy the code below, and add the content listed in the section below to your Info.plist file. Refer to the figure below:

Starting from iOS 14.5, apps can only access the user's IDFA data and deliver targeted ads to users with the user's explicit permission.
Before the app calls the App Tracking Transparency framework to request app tracking authorization from end users, the IDFA will be unavailable. If an app does not make this request, the read IDFA will return a string of all zeros.
<key>NSUserTrackingUsageDescription</key>
<string>Modify this to the permission request description you want users to see, which can be localized</string>
After iOS 10, if the Allow Arbitrary Loads in Web Content key exists, it will override the setting of Allow Arbitrary Loads
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true></true>
</dict>
Add this key only if you have selected the AdMob platform for integration. For more information, please visit here.
<key>GADApplicationIdentifier</key>
<string>Your GADApplicationIdentifier </string>
<!-- Example value format: ca-app-pub-9488501426181082~7319780494 -->

Register the SDK plugin in the GeneratedPluginRegistrant class of the generated Android project:
public final class GeneratedPluginRegistrant {
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
flutterEngine.getPlugins().add(new com.secmtp.flutter.SecmtpSdkPlugin());
}
}
<manifest>
<application>
<!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"></meta-data>
</application>
</manifest>
For details, refer to the AdMob configuration document: Update your AndroidManifest.xml
Please refer to: Android Integration and Initialization
-keep public class com.secmtp.flutter.**
-keepclassmembers class com.secmtp.flutter.** {
public *;
}
-keep public class com.thinkup.flutter.**
-keepclassmembers class com.thinkup.flutter.** {
public *;
}
Please refer to the content of proguard-android.txt in the Android SDK package.