SDK Name: SolarEngine uni-app SDK v1.1.5
Developer: Mobvista Cloud (Beijing) Technology Co., Ltd.
SDK Version: 1.1.5
Supported: The SolarEngine SDK supports Android 5.0(APILevel 21) and above.
Description: SolarEngine (SE) is an all-in-one mobile app growth analytics and data intelligence platform. It supports data management across global channels, assisting developers to monitor every stage of business development. With our attribution tracking and user-granular ROI analysis, you'll be able to measure the true value every channel creates and optimize future growth strategies. SE also offers various analysis models and A/B testing feature to help fully visualize the user journey, identify potential pain points, implement targeted product enhancements and ultimately drive large-scale app growth.
Privacy Policy: https://www.solar-engine.com/privacyPolicyEN.html
Compliance Guideline: https://help.solar-engine.com/en/docs/Compliance-Guideline
Entry: Asset Management - App Management - AppKey
• China Mainland version SDK:
https://solar-sdk.oss-cn-beijing.aliyuncs.com/uniapp/SolarEngine-UniPlugin-App-cn-1.1.5.zip
• Non-China-Mainland version SDK:
https://solar-sdk.oss-cn-beijing.aliyuncs.com/uniapp/SolarEngine-UniPlugin-App-us-1.1.5.zip
• Download SDK Demo via:
https://solar-sdk.oss-cn-beijing.aliyuncs.com/uniapp/SolarEngine-UniPlugin-App-Demo.zip
Please note that only Android 2.3 (API Level 9) and above supported.
a. Unzip the SDK package obtained in Step 2 and place the AAR file from the package into the nativeplugins directory of the HBuilder project. If this directory does not exist, please create as below.
b. If you are a Non-China-Mainland developer, please copy the AAR files from the SolarEngine-UniPlugin-App->Android directory and the package.json file from the SolarEngine-UniPlugin-App directory to the nativeplugins directory. Below are the specific purposes of each AAR file; please choose according to your needs.
c. If you are a China-Mainland developer, please copy the AAR files from the SolarEngine-UniPlugin-App->Android directory and the package.json file from the SolarEngine-UniPlugin-App directory to the nativeplugins directory. Below are the specific purposes of each AAR file; please choose according to your needs.
Finally, the directory will look like this:
If obfuscation is required during packaging, please add the following code to the obfuscation configuration file.
-keep class com.reyun.** {*; }
-keep class route.**{*;}
-keep interface com.reyun.** {*; }
-keep interface route.**{*;}
-dontwarn com.reyun.**
-dontwarn org.json.**
-keep class org.json.**{*;}
# Google library
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
java.lang.String getId();
boolean isLimitAdTrackingEnabled();
}
-keep public class com.android.installreferrer.** { *; }
# Please add the following if you used the plugin for obtaining OAID.
-keep class com.huawei.hms.**{*;}
-keep class com.hihonor.**{*;}
Please note that only Xcode 14.0, iOS 11.0 or above supported.
Framework | Description |
---|---|
Security.framework | To store device identifiers |
CoreTelephony.framework | To obtain carrier information |
AdSupport.framework | To obtain Advertising Identifier information |
SystemConfiguration.framework | To check the current network environment |
libsqlite3.dylib | To store data |
AdServices.framework | To obtain ad attribution data |
Standard Setup:
In the project navigator, select TARGETS-->Build Phases-->Link Binary With Libraries-->+ -->Select Security.framework, CoreTelephony.framework, AdSupport.framework, SystemConfiguration.framework, libsqlite3.tbd, AdServices.framework and other library files.
Add "-Objc" parameter in UnityFramework Target, or SDK would fail to be initialized. (TARGETS -> UnityFramework -> Build Settings -> Linking -> Other Linker Flags -> -Objc)
The new version of Xcode uses ".tbd" as the suffix for dynamic libraries. Please add corresponding dynamic library files.
Note:
◦ Please configure all the above dynamic libraries to avoid errors.
◦ Starting from Xcode 7 and above, system libraries that previously had the .dylib extension are now changed to have the .tbd extension.
When the application is first launched after install, the SDK is pre-initialized. During pre-initialization, the SDK does not collect any personal information or report data to SolarEngine.
const solarengine = uni.requireNativePlugin('SolarEngine-UniPlugin-App');
solarengine.preInitSDK(appkey);
Parameters:
Parameter Name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
appKey | AppKey | string | Yes |
config | SolarEngine SDK configuration | object | Yes |
initCallbackCode | Initialization callback code | callback(number) | No |
attrCallback | Attribution callback | callback(object) | No |
In the config, all parameters within the app are for Native iOS & Android. The explanation is as follows.
Parameter name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
logEnabled | Whether to enable debugging logs (default off) | bool | no |
isDebugModel | Whether to enable Debug mode (default off). Before using, please check function description. | bool | no |
isGDPRArea | If your product is operated within the EU region, there will be GDPR restrictions to follow. Please make sure to set isGDPRArea(true) if users reject the device information collection. (default false) | bool | no |
adPersonalizationEnabled | If your product is operated within the EU region and advertised on Google, please send the results about whether users allow Google to use their data for ad personalization into this parameter, so that you will comply with Google's EU user consent policy. | bool | no |
adUserDataEnabled | If your product is operated within the EU region and advertised on Google, please send the results about whether users allow their personal data to be shared with Google into this parameter, so that you will comply with Google's EU user consent policy. | bool | no |
isCoppaEnabled | Whether your app is required to comply with Children's Online Privacy Protection Rule ("COPPA"). Default false. | bool | no |
isKidsAppEnabled | Whether your app is targeting kids under 13 years old and needs to be marked as "Kids App" category. Default false. | bool | no |
ios | Only for iOS | string | no |
remoteconfig | Online Parameter initialization config | object | no |
iOS related parameter:
Parameter name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
attAuthorizationWaitingInterval | Supports ATT Authorization Waiting for up to 120 seconds when iOS devices report events for the first time. Then SDK will report the install event only after users authorize ATT or when waiting time is up. (Unit: second) | int | no |
Remote config related parameter (For Online Parameter feature, optional):
Parameter name | Parameter Meaning | Parameter Type | Mandatory |
---|---|---|---|
logEnabled | Whether to enable debugging logs (default false) | bool | no |
enable | Whether to enable online parameter function (default false) | bool | no |
mergeType | By default, the server configuration is merged with the local cached configuration. 0: On the first launch of the app or during a version update, merge the server configuration with the user's default configuration; this method can clear the local cached configuration. 1: Merge the server configuration with the user's existing local cached configuration (default this option) | number | no |
customIDProperties | Custom ID | object | no |
customIDEventProperties | Custom ID event properties | object | no |
customIDUserProperties | Custom ID user properties | object | no |
Initialization example:
solarengine.initSDK(
appkey,
{
app:{
logEnabled: true,
isGDPRArea: false,
isCoppaEnabled: false,
isKidsAppEnabled: false,
isDebugModel: false,
}
},
(initCallbackCode) => {
if (initCallbackCode == 0) {
console.log("[SEUni-App] InitSuccess")
} else {
console.log("[SEUni-App] InitFailure")
}
},null
);
// Attach solarengine to the global scope for use in other pages.
globalThis.solarengine = solarengine;
The SDK provides an interface to obtain attribution result information, allowing developers to use the attribution data for event tracking and other logical processing.
The SDK offers two ways to obtain attribution result information:
Set Attribution Result Callback example:
solarengine.initSDK(
appkey,
{
app:{
logEnabled: true,
isGDPRArea: false,
isCoppaEnabled: false,
isKidsAppEnabled: false,
isDebugModel: false,
}
},
(initCallbackCode) => {
if (initCallbackCode == 0) {
console.log("[SEUni-App] InitSuccess")
} else {
console.log("[SEUni-App] InitFailure")
}
},
(attrCallback) => {
let code = attrCallback["code"]
if (code == 0) {
console.log("[SEUni-App] attribution success")
let result = attrCallback["result"]
console.log(result)
} else {
console.log("[SEUni-App] attribution failure")
console.log(code)
}
});
Directly Retrieve Attribution Result example:
const attribution = globalThis.solarengine.getAttribution();
console.log("[SEUni-App] attribution = ",attribution);
Attribution error code descriptions and detailed attribution results can be found in:
https://help.solar-engine.com/en/docs/SDK-Attribution-Result-Details