/// <summary> /// Initialize the SDK. /// </summary> /// <param name="appId"> /// ID for your app, as supplied by Swrve. /// </param> /// <param name="apiKey"> /// Scret API key for your app, as supplied by Swrve. /// </param> /// <param name="config"> /// Extra configuration for the SDK. /// </param> public void Init(int appId, string apiKey, SwrveConfig config = null) { if (SDK == null || SDK is SwrveEmpty) { bool supportedOSAndVersion = true; #if !UNITY_EDITOR #if UNITY_IPHONE supportedOSAndVersion = SwrveSDK.IsSupportediOSVersion(); #elif UNITY_ANDROID supportedOSAndVersion = SwrveSDK.IsSupportedAndroidVersion(); #else #warning "We do not officially support this plaform. tracking is disabled." supportedOSAndVersion = false; #endif #elif !UNITY_IPHONE && !UNITY_ANDROID #warning "We do not officially support this plaform. tracking is disabled." supportedOSAndVersion = false; #endif if (supportedOSAndVersion) { SDK = new SwrveSDK(); } else { SDK = new SwrveEmpty(); } } if (config == null) { config = new SwrveConfig(); } SDK.Init(this, appId, apiKey, config); }
public void Init(int appId, string apiKey, SwrveConfig config = null) { if (SDK == null || SDK is SwrveEmpty) { if (true) { SDK = new SwrveSDK(); } else { SDK = new SwrveEmpty(); } } if (config == null) { config = new SwrveConfig(); } SDK.Init(this, appId, apiKey, config); }
/// <summary> /// Manually initialize the SDK. /// </summary> /// <param name="appId"> /// ID for your app, as supplied by Swrve. /// </param> /// <param name="apiKey"> /// Scret API key for your app, as supplied by Swrve. /// </param> public void Init(int appId, string apiKey) { SDK.Init(this, appId, apiKey, Config); }