update: 添加 using_uuid 和云控标记
parent
2845fc28a2
commit
0472bc2d98
|
|
@ -59,6 +59,7 @@ namespace Guru
|
||||||
public bool enable_adjust = true;
|
public bool enable_adjust = true;
|
||||||
public bool enable_iap = false;
|
public bool enable_iap = false;
|
||||||
public double tch020_val = 0;
|
public double tch020_val = 0;
|
||||||
|
public bool using_uuid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ namespace Guru
|
||||||
|
|
||||||
private void SetupServicesConfig()
|
private void SetupServicesConfig()
|
||||||
{
|
{
|
||||||
bool useKeywords = true;
|
bool useKeywords = false;
|
||||||
bool useIAP = true;
|
bool useIAP = true;
|
||||||
|
|
||||||
var services = GetRemoteServicesConfig();
|
var services = GetRemoteServicesConfig();
|
||||||
|
|
@ -203,21 +203,19 @@ namespace Guru
|
||||||
{
|
{
|
||||||
_appServicesConfig = services;
|
_appServicesConfig = services;
|
||||||
useKeywords = _appServicesConfig.IsKeywordsEnabled();
|
useKeywords = _appServicesConfig.IsKeywordsEnabled();
|
||||||
|
|
||||||
if (null != GuruSettings)
|
|
||||||
{
|
|
||||||
if(_appServicesConfig.adjust_settings != null)
|
|
||||||
{
|
|
||||||
// 更新 Adjust Tokens
|
|
||||||
GuruSettings.UpdateAdjustTokens(_appServicesConfig.adjust_settings.AndroidToken
|
|
||||||
,_appServicesConfig.adjust_settings.iOSToken);
|
|
||||||
// 更新 Adjust Events
|
|
||||||
GuruSettings.UpdateAdjustEvents(_appServicesConfig.adjust_settings.events);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
useIAP = _appServicesConfig.IsIAPEnabled();
|
useIAP = _appServicesConfig.IsIAPEnabled();
|
||||||
|
|
||||||
if (_appServicesConfig.app_settings != null)
|
|
||||||
|
if (null != _appServicesConfig.adjust_settings && null != GuruSettings)
|
||||||
|
{
|
||||||
|
// 更新 Adjust Tokens
|
||||||
|
GuruSettings.UpdateAdjustTokens(_appServicesConfig.adjust_settings.AndroidToken
|
||||||
|
, _appServicesConfig.adjust_settings.iOSToken);
|
||||||
|
// 更新 Adjust Events
|
||||||
|
GuruSettings.UpdateAdjustEvents(_appServicesConfig.adjust_settings.events);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (null != _appServicesConfig.app_settings)
|
||||||
{
|
{
|
||||||
if (_appServicesConfig.app_settings.tch020_val > 0)
|
if (_appServicesConfig.app_settings.tch020_val > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -225,23 +223,34 @@ namespace Guru
|
||||||
Analytics.SetTch02TargetValue(_appServicesConfig.app_settings.tch020_val);
|
Analytics.SetTch02TargetValue(_appServicesConfig.app_settings.tch020_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新和升级 GuruSettings 对应的值
|
// 设置获取设备 UUID 的方法
|
||||||
GuruSettings.UpdateAppSettings(
|
if (_appServicesConfig.app_settings.using_uuid)
|
||||||
_appServicesConfig.app_settings.bundle_id,
|
{
|
||||||
_appServicesConfig.fb_settings.fb_app_id,
|
IPMConfig.UsingUUID = true; // 开始使用 UUID 作为 DeviceID 标识
|
||||||
_appServicesConfig.app_settings.support_email,
|
}
|
||||||
_appServicesConfig.app_settings.privacy_url,
|
|
||||||
_appServicesConfig.app_settings.terms_url,
|
if (null != GuruSettings)
|
||||||
_appServicesConfig.app_settings.android_store,
|
{
|
||||||
_appServicesConfig.app_settings.ios_store);
|
// 更新和升级 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(useIAP) {
|
if (useIAP)
|
||||||
|
{
|
||||||
InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP
|
InitIAP(_initConfig.GoogleKeys, _initConfig.AppleRootCerts); // 初始化IAP
|
||||||
}
|
}
|
||||||
|
|
||||||
if(useKeywords) {
|
if (useKeywords)
|
||||||
|
{
|
||||||
KeywordsManager.Install(Model.IsIAPUser, Model.SuccessLevelCount); // 启动Keyword管理器
|
KeywordsManager.Install(Model.IsIAPUser, Model.SuccessLevelCount); // 启动Keyword管理器
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue