SDK Integration
#
TradPlus_Flutter_SDK ImportFlutter Version: flutter: ">=2.5.0"
#
1.pub.devYou can use pub.dev Integrate TradPlus_Flutter_SDK
- Install via command
- or add dependencies to the project's pubspec.yaml and execute
flutter pub get
- Then import
#
2.Download integration#
Step 1:Download TradPlus_Flutter_SDKThe SDK contains the following files:
res:default native ad layout
tradplus_sdk:flutter platform tradplus plugin
#
Step 2: Create a plugins folder in the project directory and put the downloaded SDK plug-in into the plugins folderAs shown:
#
Step 3: Add local dependencies to the project pubspec.yaml#
Step 4: Import#
Platform Configuration#
(1)AndroidDownload Platform#
Step 1:- Select Android as the access method and download the SDK
- Developers need to confirm whether the project is AndroidX or Support. Introducing errors will cause the project to fail to compile.
#
Step 2:Import SDKAfter selecting the ad source you want to access, click the "Generate Access Code" button to obtain the required Gradle reference, As shown:
Developers need to add the reference of the Maven library to the project-level build.gradle, As shown:
Add the Gradle reference part to the build.gradle file in the app, As shown:
#
Step 3:SDK ConfigurationIn this step, developers need to configure the AndroidManifest file
Developers can refer to Android SDK Configuration Configure in project engineering
#
(2)IOSThere are two ways to import SDK: cocopods import and download import
#
cocopods import SDK1、 Please go to iOS packaging platform to download relevant SDK , select Yes for Use Cocoapod
2、Select the platform you want to integrate
3、Select Generate Code
Modify the generated code to:
3.Add the modified configuration to tradplus_sdk.podspec
#
download import1、Please go to iOS packaging platform to download relevant SDK , select NO for Use Cocoapod
2、Check the platform you want to integrate, select Generate Code and download the SDK zip package
3、Place the unzipped TradPlusFrameworks folder in the plugin iOS directory
#
3. Add configuration in ios/Runner/Info.plist- Http access request permissions
- Configure App Tracking Transparency (IDFA) authorization
It is recommended to add IDFA authorization code in ios/Runner/AppDelegate
Objc-C
swift
- Setting SKNetworkID
Third-party SKNetworkID configuration
- If you use Admob or GoogleAdManager, you need to add the following configuration:
The product's unique identifier in Admob must be written in the client, otherwise the application will crash.
Add GADApplicationIdentifier configuration in Info.plist. When publishing the app, please replace it with the appid of the app in the Admob backend.