update: 新增 GuruSettings 配置接口更新内容
parent
61910cbfc1
commit
9ae151e818
|
|
@ -38,6 +38,8 @@ namespace Guru
|
||||||
internal static GuruSDKModel Model => GuruSDKModel.Instance;
|
internal static GuruSDKModel Model => GuruSDKModel.Instance;
|
||||||
private static GuruServicesConfig _appServicesConfig;
|
private static GuruServicesConfig _appServicesConfig;
|
||||||
|
|
||||||
|
private static GuruSettings guruSettings;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Debug Mode
|
/// Debug Mode
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -114,7 +116,6 @@ namespace Guru
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
//---- Init All tools ----
|
//---- Init All tools ----
|
||||||
// Loom.StartUp();
|
|
||||||
|
|
||||||
//---------- Start Firebase ------------
|
//---------- Start Firebase ------------
|
||||||
FirebaseUtil.InitFirebase(OnFirebaseReady);
|
FirebaseUtil.InitFirebase(OnFirebaseReady);
|
||||||
|
|
@ -184,7 +185,7 @@ namespace Guru
|
||||||
{
|
{
|
||||||
bool useKeywords = true;
|
bool useKeywords = true;
|
||||||
bool useIAP = true;
|
bool useIAP = true;
|
||||||
var guruSettings = GuruSettings.Instance;
|
guruSettings = GuruSettings.Instance;
|
||||||
|
|
||||||
var services = GetRemoteServicesConfig();
|
var services = GetRemoteServicesConfig();
|
||||||
if (services != null)
|
if (services != null)
|
||||||
|
|
@ -205,15 +206,26 @@ namespace Guru
|
||||||
}
|
}
|
||||||
useIAP = _appServicesConfig.IsIAPEnabled();
|
useIAP = _appServicesConfig.IsIAPEnabled();
|
||||||
|
|
||||||
if (_appServicesConfig.app_settings.tch020_val > 0)
|
if (_appServicesConfig.app_settings != null)
|
||||||
{
|
{
|
||||||
Analytics.EnableTch02Event = true;
|
if (_appServicesConfig.app_settings.tch020_val > 0)
|
||||||
Analytics.SetTch02TargetValue(_appServicesConfig.app_settings.tch020_val);
|
{
|
||||||
|
Analytics.EnableTch02Event = true;
|
||||||
|
Analytics.SetTch02TargetValue(_appServicesConfig.app_settings.tch020_val);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 更新和升级 GuruSettings 对应的值
|
||||||
|
guruSettings.UpdateAppSettings(
|
||||||
|
_appServicesConfig.app_settings.bundle_id,
|
||||||
|
_appServicesConfig.fb_settings.fb_app_id,
|
||||||
|
_appServicesConfig.app_settings.support_email,
|
||||||
|
_appServicesConfig.app_settings.privacy_url,
|
||||||
|
_appServicesConfig.app_settings.terms_url,
|
||||||
|
_appServicesConfig.app_settings.android_store,
|
||||||
|
_appServicesConfig.app_settings.ios_store);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// AdjustService.StartService();
|
|
||||||
|
|
||||||
if(useIAP) {
|
if(useIAP) {
|
||||||
InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP
|
InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue