diff --git a/src/pages/home/base/mobile-core/configuration/api-reference.md b/src/pages/home/base/mobile-core/configuration/api-reference.md index 54a75379a8..b3d5df46f4 100644 --- a/src/pages/home/base/mobile-core/configuration/api-reference.md +++ b/src/pages/home/base/mobile-core/configuration/api-reference.md @@ -14,19 +14,34 @@ import Tabs from './tabs/api-reference.md' ## clearUpdatedConfiguration -You can clear any programmatic updates made to the configuration via the `clearUpdatedConfiguration` API. This will clear programmatic updates to configuration made via the `updateConfiguration(configMap)`(Android)/ `updateConfigurationWith(configDict:)`(iOS) API. It will also clear any updates to the `MobilePrivacyStatus`(Android)/ `PrivacyStatus`(iOS) made via `setPrivacyStatus(privacyStatus)`(Android)/ `setPrivacyStatus(_ status:)`(iOS). +You can clear any programmatic updates made to the configuration via the `clearUpdatedConfiguration` API. This will clear programmatic updates to configuration made via the [updateConfiguration](#updateconfiguration) API. It will also clear any updates to the `MobilePrivacyStatus`(Android)/ `PrivacyStatus`(iOS) made via [setPrivacyStatus](../../../../resources/privacy-and-gdpr.md/#setprivacystatus). - Here are some examples of scenarios: +Here are some scenarios based on the order of calls: -* `configureWithAppId(appId)`(Android)/`configureWith(appId:)`(iOS) -> `updateConfiguration(configMap)`(Android)/ `updateConfigurationWith(configDict:)`(iOS) -> `clearUpdatedConfiguration()`: In this example, you end up with the initial configuration set via `configureWithAppId(appId)`(Android)/ `configureWith(appId:)`(iOS) +1. [configureWithAppId](#configurewithappid) +2. [updateConfiguration](#updateConfiguration) +3. clearUpdatedConfiguration -* `configureWithFileInPath(filePath)`(Android)/ `configureWith(filePath:)`(iOS) -> `updateConfiguration(configMap)`(Android)/ `updateConfigurationWith(configDict)`(iOS) -> `clearUpdatedConfiguration()`: In this example, you end up with the initial configuration set via `configureWithFileInPath(filePath)`(Android)/ `configureWith(filePath:)`(iOS) +Result: You end up with the initial configuration set via `configureWithAppId`. -* `configureWithFileInAssets(fileName)`(Android) -> `updateConfiguration(configMap)`(Android) -> `clearUpdatedConfiguration()`: In this example, you end up with the initial configuration set via `configureWithFileInAssets(fileName)`(Android) +1. [configureWithFileInPath](#configurewithfileinpath) +2. [updateConfiguration](#updateConfiguration) +3. clearUpdatedConfiguration -* `configureWithAppId(appId)`(Android)/`configureWith(appId:)`(iOS) or `configureWithFileInPath(filePath)`(Android)/ `configureWith(filePath:)`(iOS) or `configureWithFileInAssets(fileName)`(Android) -> `updateConfiguration(configMap)`(Android)/ `updateConfigurationWith(configDict)`(iOS) -> `clearUpdatedConfiguration()` -> `updateConfiguration(configMap)`(Android)/ `updateConfigurationWith(configDict)`(iOS): In this example, the configuration will be the most recently updated configuration and will not have any keys from the first update unless they are included in the most recent update. +Result: You end up with the initial configuration set via `configureWithFileInPath`. -* `configureWithAppId(appId)`(Android)/`configureWith(appId:)`(iOS) or `configureWithFileInPath(filePath)`(Android)/ `configureWith(filePath:)`(iOS) or `configureWithFileInAssets(fileName)`(Android) -> `setPrivacyStatus(privacyStatus)`(Android)/ `setPrivacyStatus(_ status:)`(iOS) -> `clearUpdatedConfiguration()`: In this example, the configuration will have the initial `MobilePrivacyStatus`(Android)/ `PrivacyStatus`(iOS) set via `configureWithAppId(appId)`(Android)/`configureWith(appId:)`(iOS) or `configureWithFileInPath(filePath)`(Android)/ `configureWith(filePath:)`(iOS) or `configureWithFileInAssets(fileName)`(Android). +1. [configureWithAppId](#configurewithappid) or [configureWithFileInPath](#configurewithfileinpath) or [configureWithFileInAssets](#configurewithfileinassets) +2. [updateConfiguration](#updateConfiguration) +3. clearUpdatedConfiguration +4. [updateConfiguration](#updateConfiguration) + +Result: In this example, the configuration will be the most recently updated configuration and will not have any keys from the first update unless they are included in the most recent update. + +1. [configureWithAppId](#configurewithappid) or [configureWithFileInPath](#configurewithfileinpath) or [configureWithFileInAssets](#configurewithfileinassets) +2. [setPrivacyStatus](../../../../resources/privacy-and-gdpr.md/#setprivacystatus) +3. clearUpdatedConfiguration + +Result: In this example, the configuration will have the initial `MobilePrivacyStatus`(Android)/ `PrivacyStatus`(iOS) set via [configureWithAppId](#configurewithappid) or [configureWithFileInPath](#configurewithfileinpath) or [configureWithFileInAssets](#configurewithfileinassets). diff --git a/src/pages/home/base/mobile-core/configuration/index.md b/src/pages/home/base/mobile-core/configuration/index.md index 2a3562f2b1..b59a2d4a10 100644 --- a/src/pages/home/base/mobile-core/configuration/index.md +++ b/src/pages/home/base/mobile-core/configuration/index.md @@ -74,14 +74,18 @@ For implementation details, please refer to [Configuration API reference](./api- ## Using a bundled file configuration -You can include a bundled JSON configuration file in your app package to replace or complement the configuration that was downloaded by using the [Configure with App ID per environment](#configure-with-app-id-per-environment) approach. +Applications which need to get data from the SDK early in the application lifecycle should use a bundled file configuration. This will allow the SDK to properly process events before a remote configuration is downloaded, using the bundled configuration in early, app launch scenarios. If you are going to use a bundled file configuration to help with early app processing, it is strongly recommended that you also use [bundled rules](../rules-engine/index.md#using-bundled-rules). -To download the JSON configuration file, use the following URL: + + +Please note that the configuration that is downloaded by using the [Configure with App ID per environment](#configure-with-app-id-per-environment) approach, will overwrite the bundled configuration once it is downloaded, allowing you to always keep a more up-to-date configuration remotely, without needing an app update. -`https://assets.adobedtm.com/PASTE-ENVIRONMENT-ID.json` +To use a bundled configuration, follow the steps below: -* In iOS, the `ADBMobileConfig.json` file can be placed anywhere that it is accessible in your bundle. -* In Android, the `ADBMobileConfig.json` file must be placed in the assets folder. +1. Download your JSON configuration file from the following URL: https://assets.adobedtm.com/PASTE-ENVIRONMENT-ID.json, replacing PASTE-ENVIRONMENT-ID with your mobile property environment ID. +2. Rename the JSON file to “ADBMobileConfig.json”. +3. iOS: Place the file anywhere that it is accessible in your app bundle. + Android: Place the file in the assets folder. You can also load a different `ADBMobileConfig.json` file by using the `ConfigureWithFileInPath` method. The Adobe Experience Platform SDKs will attempt to load the file from the given path and parse its JSON contents. Previous programmatic configuration changes that were set by using the `UpdateConfiguration` method are applied on the bundled file's configuration before setting the new configuration to the Adobe Experience Platform SDKs. If a file-read error or JSON parsing error occurs, no configuration changes are made.