您可以在应用程序启动时加载其他 ADBMobile JSON 配置文件。
通过 ADBMobile overrideConfigPath:filePath
方法,您能够指定在应用程序启动时加载的其他 ADBMobile.json
配置文件的路径。必须在 applicationDidFinishLaunchingWithOptions
方法中调用此方法,而且必须在其他任何 Experience Cloud SDK 调用(例如 collectLifecycleData
)之前进行此调用。
通过其他路径调用此方法会导致一次性覆盖配置文件,直到应用程序关闭为止。
例如:
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"ExampleJSONFile" ofType:@"json"];
[ADBMobile overrideConfigPath:filePath];