Menu

Quick Access

1. SDK Basic Information

SDK Name: SolarEngine  IOS SDK v1.3.0.2

Developer: Mobvista Cloud (Beijing) Technology Co., Ltd.

SDK Version: 1.3.0.2

Supported Xcode Version: 14.0 or later

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


Note:

The SolarEngine SDK supports iOS 11.0 and above.


2. Before you start

Step 1: Get AppKey

Access Path:  Asset Management - App Management - AppKey

Step 2: Obtain SDK

Download via  

https://solar-sdk.oss-cn-beijing.aliyuncs.com/iOS/SolarEngine-iOSSDK-US-v1.3.0.2.zip

Step 3: Obtain SDK Demo

      Download SDK Demo via

        https://solar-sdk.oss-cn-beijing.aliyuncs.com/iOS/SolarEngineSDKDemo.zip

      After downloading, you need to follow the steps below to run the demo:

1. Enter the SolarEngineSDKDemo directory and open the Podfile. Select Non-China-Mainland and remove the "#" before the pod.

# China Mainland
#  pod 'SolarEngineSDK'  , '~> 1.3.0.2'

# Non China Mainland
#  pod 'SolarEngineSDKiOSInter'  , '~> 1.3.0.2'

2. Enter the SolarEngineSDKDemo directory and execute the pod install command in the terminal to pull the latest code.

3. Double-click SolarEngineSDKDemo.xcworkspace to open the project.

4. In the AppDelegate.m file, set "your_appKey" to your own project's appKey.

3. Integrate the SDK

3.1 Add frameworks

FrameworkDescription
Security.frameworkTo store device identifiers
CoreTelephony.frameworkTo obtain carrier information
AdSupport.frameworkTo obtain Advertising Identifier information
SystemConfiguration.frameworkTo check the current network environment
libsqlite3.dylibTo store data
AdServices.frameworkTo obtain attribution data
If you use ASA attribution, AdServices.framework dependency must be added, or we cannot access the attribution results.

       

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.

       Please configure all the above dynamic libraries to avoid errors.

Add "-Objc" parameter:

       TARGETS -> Build Settings -> Linking -> Other Linker Flags

3.2 CocoaPods

To add the SDK using CocoaPods, please follow:

pod 'SolarEngineSDKiOSInter' , '~> 1.3.0.2'

3.3 Pre-initialize SDK

When your app is first launched after install, the SDK is pre-initialized. During this time, the SDK does not collect any personal information or report data to SolarEngine.

- (void)preInitWithAppKey:(nonnull NSString *)appKey;
ParameterData TypeRequiredNote
appKeyNSStringYESYour own appKey obtained from SolarEngine dashboard

Sample Code

#import <SolarEngineSDK/SolarEngineSDK.h>


[[SolarEngineSDK sharedInstance] preInitWithAppKey:your_appKey];

Optional Config

      If no changes made, then default values will be returned.

ParameterTypeRequiredDescription
isGDPRArea BOOLNOWhether to set it to the GDPR area (Default NO)
logEnabled BOOLNOWhether to enable local debugging logs (Default NO)
isDebugModel BOOLNOWhether to turn on the debugging mode (Default NO)
YES means turning it on, and the data verification results can be viewed in real time in the SolarEngine backend. Data generated in debugging mode will not be stored in the database. Do not turn it on in the production environment.
setCoppaEnabled BOOLNOIf your app is required to comply with Children's Online Privacy Protection Rule ("COPPA"), please set "setCoppaEnabled = YES" (default NO).
setKidsAppEnabled BOOLNOIf your app is targeting kids under 13 years old, please mark your app as "Kids App" category and set "setKidsAppEnabled = YES" (default NO).
attAuthorizationWaitingInterval IntNOSupports 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)
enableDelayDeeplinkBOOLNOWhether to enable deferred deep linking, default No.
enableODMInfoBOOLNOWhether to enable ODMInfo attribution, default No.

This config is only available for apps published in Non China Mainland, designed for Google iOS attribution.
Steps to activate this feature:

1. Integrate the latest version of SolarEngine iOS SDK and include the ODMInfo plugin
2. Set enableODMInfo=True
3. Integrate Firebase SDK
4. Add to the whitelist.【Please share bundle_id and storeid with your SolarEngine AM, so we can note Google to add your app on whitelist. Currently, Google only allows apps on the whitelist to access ODMInfo values.

3.4 Initialize SDK

       Before formal initialization, you should ensure that the user has agreed to the Privacy Policy and the SDK is pre-initialized successfully.

- (void)startWithAppKey:(nonnull NSString *)appKey config:(SEConfig *)config;
ParameterData TypeRequiredNote
appKeyNSStringYESappkey obtained from SolarEngine dashboard
configSEConfigNOinitialization config, default values if not set additionally

Sample Code

SEConfig *config = [[SEConfig alloc] init];
config.logEnabled = YES; //Enable local debugging logs
[[SolarEngineSDK sharedInstance] startWithAppKey:your_appKey config:config];

Initialization Callback Codes

CodeMeaning
0Initialization success
101Initialization failed, as pre-initialization is not called
102Initialization failed, due to illegal appkey
110SDK failed to load configuration
 [[SolarEngineSDK sharedInstance] setInitCompletedCallback:^(int code) {
      if (code == 0) {
            // Initialization success
            NSLog(@"InitCompletedCallback success");
       } else {
            // Initialization failed
            NSLog(@"InitCompletedCallback code = %d",code);
       }
 }];

3.5 Get Attribution Results

       SolarEngine SDK provides two methods to retrieve attribution result information, allowing developers to use the attribution data for event tracking and other data processing.

1. Set attribution results callback: When the SDK successfully or failed to obtain the attribution result, a callback will be given (asynchronous).

2. Get attribution results directly: Get the attribution results directly from the SDK cache. If the SDK has no attribution results yet, it will directly return nil (synchronous).

3.5.1 Set Attribution Callback

Sample Code

   //Note: Please set attribution result callback before SDK initialization. Setting the callback later may result in failing to receive the callback.
    [[SolarEngineSDK sharedInstance] setAttributionCallback:^(int code, NSDictionary * _Nullable attributionData) {
        if (code == 0) {
            NSLog(@"attributionData = %@",attributionData);
        } else {
            NSLog(@"code = %d",code)
        }
    }];

// Initialize the SDK

3.5.2 Get Attribution Results Directly

Function

// This interface accesses the attribution data in real time. If no results, then return nil.
- (NSDictionary *)getAttributionData;


Attribution error code descriptions and detailed attribution results can be found in:

https://help.solar-engine.com/en/docs/SDK-Attribution-Result-Details


       

Previous
iOS SDK
Next
Optional Features
Last modified: 2025-06-20Powered by