update: 添加 using_uuid 和云控标记
							parent
							
								
									2845fc28a2
								
							
						
					
					
						commit
						0472bc2d98
					
				|  | @ -59,6 +59,7 @@ namespace Guru | |||
|         public bool enable_adjust = true; | ||||
|         public bool enable_iap = false; | ||||
|         public double tch020_val = 0; | ||||
|         public bool using_uuid = false; | ||||
|     } | ||||
|      | ||||
|     [Serializable] | ||||
|  |  | |||
|  | @ -195,7 +195,7 @@ namespace Guru | |||
| 
 | ||||
|         private void SetupServicesConfig() | ||||
|         { | ||||
|             bool useKeywords = true; | ||||
|             bool useKeywords = false; | ||||
|             bool useIAP = true; | ||||
|              | ||||
|             var services = GetRemoteServicesConfig(); | ||||
|  | @ -203,45 +203,54 @@ namespace Guru | |||
|             { | ||||
|                 _appServicesConfig = services; | ||||
|                 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(); | ||||
| 
 | ||||
|                 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) | ||||
|                     { | ||||
|                         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); | ||||
|                       | ||||
|                     // 设置获取设备 UUID 的方法 | ||||
|                     if (_appServicesConfig.app_settings.using_uuid) | ||||
|                     { | ||||
|                         IPMConfig.UsingUUID = true; // 开始使用 UUID 作为 DeviceID 标识 | ||||
|                     } | ||||
| 
 | ||||
|                     if (null !=  GuruSettings) | ||||
|                     { | ||||
|                         // 更新和升级 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 | ||||
|             } | ||||
|              | ||||
|             if(useKeywords) { | ||||
| 
 | ||||
|             if (useKeywords) | ||||
|             { | ||||
|                 KeywordsManager.Install(Model.IsIAPUser, Model.SuccessLevelCount); // 启动Keyword管理器 | ||||
|             } | ||||
|         } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue