diff --git a/gatsby-config.js b/gatsby-config.js index b0706b09cf..fddbf802b6 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -702,6 +702,32 @@ module.exports = { } ] + },{ + title: "Migration", + path: "/resources/migration", + pages: [{ + title: "Android", + path: "/resources/migration/android", + pages: [{ + title: "Migrate to 2.x SDKs", + path: "/resources/migration/android/migrate-to-2x" + } + ] + }, + { + title: "iOS", + path: "/resources/migration/ios", + pages: [{ + title: "Migrate to 4.x SDKs", + path: "/resources/migration/ios/migrate-to-4x" + }, + { + title: "Migrate to 3.x SDKs", + path: "/resources/migration/ios/migrate-to-3x" + }, + ] + } + ] }, { title: "User guides", diff --git a/src/pages/home/base/mobile-core/release-notes.md b/src/pages/home/base/mobile-core/release-notes.md index d42fc1db41..806b37603e 100644 --- a/src/pages/home/base/mobile-core/release-notes.md +++ b/src/pages/home/base/mobile-core/release-notes.md @@ -244,7 +244,7 @@ The brand new Adobe Experience Platform Core Android SDKs are live! It is [open -The `registerExtension` API for each extension is deprecated in the latest version of the mobile SDK. You can call the `MobileCore.registerExtensions` API instead of registering the extensions separately. See the [Migration Guide](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-android) for more details. +The `registerExtension` API for each extension is deprecated in the latest version of the mobile SDK. You can call the `MobileCore.registerExtensions` API instead of registering the extensions separately. See the [Migration Guide](../../../resources/migration/android/migrate-to-2x.md) for more details. ## January 5, 2023 diff --git a/src/pages/home/current-sdk-versions.md b/src/pages/home/current-sdk-versions.md index 42ff0f5a70..080aa16bbb 100644 --- a/src/pages/home/current-sdk-versions.md +++ b/src/pages/home/current-sdk-versions.md @@ -12,7 +12,7 @@ keywords: -**Migrate to latest Mobile SDKs for Android**
If you are currently using the Mobile Core 1.x and the compatible libraries, please see the [Migrating to latest Mobile SDKs for Android](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-android/) guide for next steps.
The latest Mobile SDKs for Android support Google Android API 19 (KitKat) or later. +**Migrate to latest Mobile SDKs for Android**
If you are currently using older SDK versions, please see the [Migrating to latest Mobile SDKs for Android](../resources/migration/android/index.md) guide for next steps. @@ -64,7 +64,7 @@ The Android BOM (Bill of Materials) artifact has been released to Maven Central. -**Migrate to latest Mobile SDKs for iOS**
If you are currently using the Objective-C (ACP-prefix) libraries, please see the [Migrating to latest Mobile SDKs for iOS](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-swift/) guide for next steps.
The latest Mobile SDK for iOS supports iOS 11 or later; requires Swift 5.1 or newer and Xcode 14.1 or newer. In addition to **CocoaPods**, **Swift Package Manager (SPM)**, and XCFramework installation options are supported with the latest iOS Swift SDKs! Find more details at the GitHub links below. +**Migrate to latest Mobile SDKs for iOS**
If you are currently using older SDK versions, please see the [Migrating to latest Mobile SDKs for iOS](../resources/migration/ios/index.md) guide for next steps. | Extension | tvOS | App Extension | CocoaPods | GitHub | Test app | |---|---|---|---|---|---| diff --git a/src/pages/home/release-notes/index.md b/src/pages/home/release-notes/index.md index 509b36771b..ba46d968a6 100644 --- a/src/pages/home/release-notes/index.md +++ b/src/pages/home/release-notes/index.md @@ -1288,8 +1288,8 @@ Note that all these extensions must be updated together. For help on moving to these versions, and information on deprecated APIs please see: -* [Migration guide](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-android) -* [Migration FAQ](../resources/faq.md#migrating-to-android-mobile-core-2x-and-compatible-extensions) +* [Migration guide](../../resources/migration/android/migrate-to-2x.md) +* [Migration FAQ](../../resources/migration/android/migrate-to-2x.md#frequently-asked-questions) ## February 17, 2023 @@ -1471,7 +1471,7 @@ The brand new Adobe Experience Platform Core Android SDKs are live! It is [open -The `registerExtension` API for each extension is deprecated in the latest version of the mobile SDK. You can call the `MobileCore.registerExtensions` API instead of registering the extensions separately. See the [Migration Guide](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-android) for more details. +The `registerExtension` API for each extension is deprecated in the latest version of the mobile SDK. You can call the `MobileCore.registerExtensions` API instead of registering the extensions separately. See the [Migration Guide](../../resources/migration/android/migrate-to-2x.md) for more details. ## January 5, 2023 diff --git a/src/pages/resources/acp-end-of-support.md b/src/pages/resources/acp-end-of-support.md index 80bbe2d8c3..b5aa39f458 100644 --- a/src/pages/resources/acp-end-of-support.md +++ b/src/pages/resources/acp-end-of-support.md @@ -18,7 +18,7 @@ Please refer to the following guides to migrate to the latest SDKs: | **SDK** | **Migration guide** | | :--- | :--- | -| ACP iOS SDK | [Migrate to AEP iOS SDK](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-swift) | +| ACP iOS SDK | [Migrate to AEP iOS SDK](../resources/migration/ios/migrate-to-3x.md) | | Flutter for ACP | [Migrate to Flutter for AEP](https://github.com/adobe/aepsdk_flutter/blob/main/docs/migration.md) | | React Native for ACP | [Migrate to React Native for AEP](https://github.com/adobe/aepsdk-react-native/blob/main/docs/migration.md) | | Cordova | Not Supported | diff --git a/src/pages/resources/faq.md b/src/pages/resources/faq.md index 0b9cfd09bd..d26b550077 100644 --- a/src/pages/resources/faq.md +++ b/src/pages/resources/faq.md @@ -148,136 +148,7 @@ Implementing push notification tracking and measurement with the SDK depends on ## Migrating to Android Mobile Core 2.x and compatible extensions -### Is there a change in minimum API level supported by Mobile SDK for Android? - -Mobile SDK for Android now supports a minimum API level of **19**. If your application targets a lower API level, you will see the following build failure: - -``` text -Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 19 declared in library [com.adobe.marketing.mobile:core:2.0.0] -``` - -To fix this build failure, increase the minSdkVersion for your Android project to **19** or above. - -### When I add Mobile SDK to my Android project, why do I get an error about invoke-custom support and enabling desugaring? - -Mobile SDK for Android uses Java 8 language features and desugaring is disabled by default. If your application uses Android Gradle plugin (AGP) v4.2 and has not enabled Java 8 support, you will see the following build failure: - -``` text -D8: Invoke-customs are only supported starting with Android O (--min-api 26) -Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing. -The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle -android { - compileOptions { - sourceCompatibility 1.8 - targetCompatibility 1.8 - } -} - -See https://developer.android.com/studio/write/java8-support.html for details. -Alternatively, increase the minSdkVersion to 26 or above. -``` - -To fix this build failure, you can follow one of two options: - -* Add the listed compileOptions from the error message to your app-level build.gradle file. -* Increase the minSdkVersion for your Android project to **26** or above. - -### How do I get the latest Mobile SDK Android dependences for my Application? - -To get the latest Mobile SDK dependencies for your Android application: - -* Open the **mobile property** configured in the **Data Collection UI** for your application. -* Navigate to the **Extensions** tab and update all the extensions to the latest version. -* The [install instructions](../home/getting-started/get-the-sdk.md#1-add-dependencies-to-your-project) will now show the dependencies for the latest Mobile SDK. - -### Why do I see 'java.lang.NoSuchMethodError' after upgrading to the latest version of Mobile SDK for Android? - -The latest Mobile Core SDK for Android includes changes that break compatiblity with solution SDKs developed for earlier verisons of the Mobile Core SDK. - -If you attempt to use the latest Mobile Core SDK and solution SDKs that were built for previous versions of Mobile Core to build your app, you may encounter the following error: - -``` text -2023-02-13 17:45:02.501 14264-14264/XXX E/AndroidRuntime: FATAL EXCEPTION: main - Process: XXX, PID: XXXXX - java.lang.NoSuchMethodError: No static method getCore()Lcom/adobe/marketing/mobile/Core; in class Lcom/adobe/marketing/mobile/MobileCore; or its super classes (declaration of 'com.adobe.marketing.mobile.MobileCore' appears in XXX -``` - -To resolve this error, upgrade all your solution SDKs to the [most recent versions](../home/current-sdk-versions.md#android). - -### Why do I not see 'sdk-core' dependency for latest version of Mobile SDK for Android? - -The **com.adobe.marketing.mobile:sdk-core** dependency is no longer available for the latest version of Mobile SDK. Instead, select the appropriate solution SDKs based on your requirements from the following options: - -```java -implementation platform('com.adobe.marketing.mobile:sdk-bom:2.+') -implementation 'com.adobe.marketing.mobile:core' -implementation 'com.adobe.marketing.mobile:lifecycle' -implementation 'com.adobe.marketing.mobile:identity' -implementation 'com.adobe.marketing.mobile:signal' -``` - -### How do I upgrade to the latest version of Mobile SDK for Android if my app uses Mobile Services? - -Adobe Mobile Service's end-of-life date is [December 31, 2022](https://experienceleague.adobe.com/docs/discontinued/using/mobile-services.html). To upgrade to the latest version of Mobile SDK for Android, you have to remove the Mobile Services dependency from your app. - -### Why do I see a warning in AndroidManifest.xml about missing 'com.adobe.marketing.mobile.FullscreenMessageActivity' class? - -After upgrading to the latest version of Mobile SDK for Android, you will see the following build warning if your application previously set up in-app messages with Campaign Standard. - -``` text -Class referenced in the manifest, `com.adobe.marketing.mobile.FullscreenMessageActivity`, was not found in the project or the libraries -Unresolved class 'FullscreenMessageActivity' -``` - -To resolve the build warning, remove FullscreenMessageActivity from your application's manifest file. Campaign Standard SDK no longer requires application to add **FullscreenMessageActivity** to their manifest. - -### Why do I see 'unresolved reference' error when upgrading Adobe Target SDK to the latest version? - -The [latest version](../solution/adobe-target/release-notes.md#android-target-200) of Adobe Target Mobile SDK has the following breaking API changes for alignment with the iOS SDK: - -* **locationsDisplayed** is now **displayedLocations** -* **locationClicked** is now **clickedLocation** - -The public classes **TargetRequest**, **TargetPrefetch**, **TargetOrder**, **TargetProduct** and **TargetParameters** are consolidated under the **target** subpackage. - -To resolve the error, fix the method references and update your target import statements: - -```java -import com.adobe.marketing.mobile.target.TargetRequest; -import com.adobe.marketing.mobile.target.TargetPrefetch; -import com.adobe.marketing.mobile.target.TargetOrder; -import com.adobe.marketing.mobile.target.TargetProduct; -import com.adobe.marketing.mobile.target.TargetParameters; -``` - -In addition, replace the previously deprecated Target APIs and classes since they have been removed. For more information, please read this section on the [deprecated APIs and the recommended alternative APIs](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-target/deprecated-apis/). - -### Why do I see `registerDevice(String, String, Map)` cannot be applied to [arguments] error when upgrading Adobe Campaign Classic SDK to the latest version? - -The `registerDevice` API in the latest Campaign Classic Android Mobile SDK, similar to iOS SDK, no longer provides a callback method for registration status since a `false` value cannot be accurately used as a signal to retry requests. - -To resolve the error, remove the callback (`AdobeCallback`) parameter from the method invocation. - -### Why do I see `getNearbyPointsOfInterest(Location, int, AdobeCallback>, AdobeCallback)` cannot be applied to [arguments] error when upgrading Adobe Experience Platform Location Service SDK to the latest version? - -The `getNearbyPointsOfInterest` API without the error callback has been removed. Alternatively, use the below overloaded API which provides both successCallback and errorCallback: - -```java -public static void getNearbyPointsOfInterest(final Location location, - final int limit, - final AdobeCallback> successCallback, - final AdobeCallback errorCallback) -``` - -The public classes `PlacesAuthorizationStatus`, `PlacesPOI`, and `PlacesRequestError` are consolidated under the `places` subpackage. - -To resolve the error, fix the method references and update your places import statements: - -```java -import com.adobe.marketing.mobile.places.PlacesAuthorizationStatus; -import com.adobe.marketing.mobile.places.PlacesPOI; -import com.adobe.marketing.mobile.places.PlacesRequestError; -``` +See the frequently asked questions for migration [here](../resources/migration/android/migrate-to-2x.md#frequently-asked-questions). ## Lifecycle diff --git a/src/pages/resources/index.md b/src/pages/resources/index.md index 9a6decb3b2..152d45663d 100644 --- a/src/pages/resources/index.md +++ b/src/pages/resources/index.md @@ -25,9 +25,3 @@ To find answers to the most frequently asked questions about Mobile SDK, please ## Adobe Mobile Library (v4) end-of-support You can learn about upgrading from Adobe Mobile Library (v4) to the Experience Platform SDKs by following the instructions in the [upgrading to Experience Platform SDKs overview](./upgrade-platform-sdks/index.md). - -## Migrating to Swift - -You can migrate your Objective-C-based version of the SDK to the Swift-based version of the SDK. - -To learn how to migrate your Mobile SDK implementation to Swift, please read the guide on [migrating to Swift](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-swift/). diff --git a/src/pages/resources/migration/android/index.md b/src/pages/resources/migration/android/index.md new file mode 100644 index 0000000000..020b7e4947 --- /dev/null +++ b/src/pages/resources/migration/android/index.md @@ -0,0 +1,7 @@ +# Migration guides for Adobe Experience Platform SDKs for Android + +This document provides a collection of resources to help you migrate between various versions of the Adobe Experience Platform SDKs for Android. + +## Migrate to Adobe Experience Platform 2.x SDKs for Android + +Learn how to [migrate to Adobe Experience Platform 2.x SDKs for Android](./migrate-to-2x.md) from Experience Platform 1.x SDKs for Android. diff --git a/src/pages/resources/migration/android/migrate-to-2x.md b/src/pages/resources/migration/android/migrate-to-2x.md new file mode 100644 index 0000000000..ff0659654e --- /dev/null +++ b/src/pages/resources/migration/android/migrate-to-2x.md @@ -0,0 +1,272 @@ +import Tabs from './tabs/migrate-to-2x.md' + +# Migrate to Adobe Experience Platform 2.x SDKs for Android + + + +This Mobile SDK version for Android now supports a minimum API level of 19. + +## SDK versions + +### Android BOM + +
+ +
+ +descriptive text + +
+ +### Android extensions + +
+ +| Extension | Version | +|---|---| +| [Mobile Core](../../../home/base/mobile-core/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/core.svg?logo=android&logoColor=white&label=core&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/core) | +| [Signal](../../../home/base/mobile-core/signal/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/signal.svg?logo=android&logoColor=white&label=signal&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/signal) | +| [Lifecycle](../../../home/base/mobile-core/lifecycle/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/lifecycle.svg?logo=android&logoColor=white&label=lifecycle&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/lifecycle) | +| [Identity](../../../home/base/mobile-core/identity/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/identity.svg?logo=android&logoColor=white&label=identity&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/identity) | +| [Profile](../../../home/base/profile/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/userprofile.svg?logo=android&logoColor=white&label=userprofile&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/userprofile) | +| [Adobe Experience Platform Assurance](../../../home/base/assurance/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/assurance.svg?logo=android&logoColor=white&label=assurance&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/assurance) | +| [Adobe Experience Platform Edge Network](../../../edge/edge-network/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/edge.svg?logo=android&logoColor=white&label=edge&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/edge) | +| [Identity for Edge Network](../../../edge/identity-for-edge-network/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/edgeidentity.svg?logo=android&logoColor=white&label=edgeidentity&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/edgeidentity) |adobe/aepsdk-edgeidentity-android) | +| [Consent for Edge Network](../../../edge/consent-for-edge-network/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/edgeconsent.svg?logo=android&logoColor=white&label=edgeconsent&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/edgeconsent) | +| [Media for Edge Network](../../../edge/media-for-edge-network/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/edgemedia.svg?logo=android&logoColor=white&label=edgemedia&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/edgemedia) | +| [Edge Bridge](../../../solution/adobe-analytics/migrate-to-edge-network.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/edgebridge.svg?logo=android&logoColor=white&label=edgebridge&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/edgebridge) | +| [Adobe Journey Optimizer](../../../edge/adobe-journey-optimizer/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/messaging.svg?logo=android&logoColor=white&label=messaging&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/messaging) | +| [Adobe Journey Optimizer - Decisioning](../../../edge/adobe-journey-optimizer-decisioning/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/optimize.svg?logo=android&logoColor=white&label=optimize&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/optimize) | +| [Places Service](https://experienceleague.adobe.com/docs/places/using/home.html) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/places.svg?logo=android&logoColor=white&label=places&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/places) | +| [Adobe Analytics](../../../solution/adobe-analytics/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/analytics.svg?logo=android&logoColor=white&label=analytics&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/analytics) | +| [Adobe Analytics - Media Analytics for Audio & Video](../../../solution/adobe-media-analytics/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/media.svg?logo=android&logoColor=white&label=media&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/media) | +| [Adobe Target](../../../solution/adobe-target/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/target.svg?logo=android&logoColor=white&label=target&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/target) | +| [Adobe Campaign Standard](../../../solution/adobe-campaign-standard/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/campaign.svg?logo=android&logoColor=white&label=campaign&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/campaign) | +| [Adobe Campaign Classic](../../../solution/adobe-campaign-classic/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/campaignclassic.svg?logo=android&logoColor=white&label=campaignclassic&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/campaignclassic) | +| [Adobe Audience Manager](../../../solution/adobe-audience-manager/index.md) | [![Maven Central](https://img.shields.io/maven-central/v/com.adobe.marketing.mobile/audience.svg?logo=android&logoColor=white&label=audience&style=flat-square&versionPrefix=2)](https://mvnrepository.com/artifact/com.adobe.marketing.mobile/audience) | + +## Migrate from Adobe Experience Platform 1.x SDKs for Android + +If you have implemented Adobe Experience Platform 1.x SDKs for Android, then this guide will help you understand the steps required to migrate your implementation to the Experience Platform 2.x SDKs. In summary, you'll need to: + +1. [Update dependencies](#update-dependencies) +2. [Update SDK initialization](#update-sdk-initialization) +3. [Update outdated API references](#update-outdated-api-references) + +### Update dependencies + +#### Gradle + +The Adobe SDK BOM artifact enables managing all compatible versions of Adobe Experience Platform Android extensions by specifying a single BOM version. This is now the recommended way to manage Android SDKs. If you are using Gradle to manage your app dependencies, the following example shows how to start using BOM in the `build.gradle` file. + + + +Using dynamic dependency versions is not recommended for production apps. Refer to this [page](../../../resources/manage-gradle-dependencies.md) for managing Gradle dependencies. + + + +Starting with version 2.0.0, the `sdk-core` bundle (which includes Core, Lifecycle, Identity, Signal) will no longer receive updates. You need to include those libraries individually as described below. + +```java +dependencies { + //implementation 'com.adobe.marketing.mobile:sdk-core:1.+' + //implementation 'com.adobe.marketing.mobile:userprofile:1.+' + + // Use Adobe SDK BOM artifact to manage all compatible versions of Adobe Experience Platform Android extensions. + implementation 'com.adobe.marketing.mobile:sdk-bom:2.+' + implementation 'com.adobe.marketing.mobile:core' + implementation 'com.adobe.marketing.mobile:identity' + implementation 'com.adobe.marketing.mobile:signal' + implementation 'com.adobe.marketing.mobile:lifecycle' + implementation 'com.adobe.marketing.mobile:userprofile' +} +``` + +Save the `build.gradle` file and select `Sync Project with Gradle Files` in Android Studio to download the 2.x SDKs. + +#### Manual library import + +If you are importing SDK libraries manually, make sure to update your libraries by downloading the most recent 2.x binaries directly from [Maven Central Repository](https://mvnrepository.com/artifact/com.adobe.marketing.mobile). + +### Update SDK initialization + +After you have imported the new Android libraries, you'll need to update SDK initialization code as described below. With Mobile Core version 2.0.0 and above, the `MobileCore.start()` API is no longer required. The SDK has simplified initialization and registration of extensions by providing the `MobileCore.registerExtensions()` API. After the given extensions have been registered, the SDK will be initialized and the completion block will be executed. The code which used to reside in the start() block will now reside in the `MobileCore.registerExtensions()`'s completion block. + +The following code snippets show the recommended initialization code for the 2.x Mobile SDKs. + + + +Java + + + +Kotlin + + + +## Update outdated API references + +Some of the APIs available in previous major versions of the Mobile SDK for Android are now deprecated or removed. You can choose to replace the obsolete APIs in your code with the alternative APIs in the 2.x version, as described below. + + + +The `registerExtension` API for each extension is deprecated in the 2.x version of the mobile SDK. You don't need to register extensions separately, now you can call `MobileCore.registerExtensions` API instead. See the [Update SDK initialization](#update-sdk-initialization) section for more details. + +### Profile + +| Deprecated API | Alternative API | +| :------------- | :-------------- | +| UserProfile.updateUserAttribute | [UserProfile.updateUserAttributes](../../../home/base/profile/api-reference.md) | +| UserProfile.removeUserAttribute | [UserProfile.removeUserAttributes](../../../home/base/profile/api-reference.md) | + +### Adobe Target + +| Removed API | Alternative API | +| :------------- | :-------------- | +| Target.locationsDisplayed | [Target.displayedLocations](../../../solution/adobe-target//api-reference.md) | +| Target.locationClicked | [Target.clickedLocation](../../../solution/adobe-target//api-reference.md) | +| com.adobe.marketing.mobile.TargetRequest | Moved into **target** subpackage. Update import statements to reference **com.adobe.marketing.mobile.target.TargetRequest** | +| com.adobe.marketing.mobile.TargetPrefetch | Moved into **target** subpackage. Update import statements to reference **com.adobe.marketing.mobile.target.TargetPrefetch** | +| com.adobe.marketing.mobile.TargetOrder | Moved into **target** subpackage. Update import statements to reference **com.adobe.marketing.mobile.target.TargetOrder** | +| com.adobe.marketing.mobile.TargetProduct | Moved into **target** subpackage. Update import statements to reference **com.adobe.marketing.mobile.target.TargetProduct** | +| com.adobe.marketing.mobile.TargetParameters | Moved into **target** subpackage. Update import statements to reference **com.adobe.marketing.mobile.target.TargetParameters** | + +### Adobe Campaign Classic + +| Removed API | Alternative API | +| :------------- | :-------------- | +| CampaignClassic.registerDevice | The [CampaignClassic.registerDevice](../../../solution/adobe-campaign-classic/api-reference.md) API no longer provides a callback method for registration status since a `false` value cannot be accurately used as a signal to retry requests. | + +### Places Service + +| Removed API | Alternative API | +| :------------- | :-------------- | +| **Places.getNearbyPointsOfInterest** API without the error callback | Use [Places.getNearbyPointsOfInterest](../../../solution/places/api-reference.md) API which provides both successCallback and errorCallback | +| com.adobe.marketing.mobile.PlacesAuthorizationStatus | Moved into **places** subpackage. Update import statements to reference **com.adobe.marketing.mobile.places.PlacesAuthorizationStatus** | +| com.adobe.marketing.mobile.PlacesPOI | Moved into **places** subpackage. Update import statements to reference **com.adobe.marketing.mobile.places.PlacesPOI** | +| com.adobe.marketing.mobile.PlacesRequestError | Moved into **places** subpackage. Update import statements to reference **com.adobe.marketing.mobile.places.PlacesRequestError** | + +## Frequently asked questions + +### Is there a change in minimum API level supported by Mobile SDK for Android? + +Mobile SDK for Android now supports a minimum API level of **19**. If your application targets a lower API level, you will see the following build failure: + +``` text +Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 19 declared in library [com.adobe.marketing.mobile:core:2.0.0] +``` + +To fix this build failure, increase the minSdkVersion for your Android project to **19** or above. + +### When I add Mobile SDK to my Android project, why do I get an error about invoke-custom support and enabling desugaring? + +Mobile SDK for Android uses Java 8 language features and desugaring is disabled by default. If your application uses Android Gradle plugin (AGP) v4.2 and has not enabled Java 8 support, you will see the following build failure: + +``` text +D8: Invoke-customs are only supported starting with Android O (--min-api 26) +Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing. +The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle +android { + compileOptions { + sourceCompatibility 1.8 + targetCompatibility 1.8 + } +} + +See https://developer.android.com/studio/write/java8-support.html for details. +Alternatively, increase the minSdkVersion to 26 or above. +``` + +To fix this build failure, you can follow one of two options: + +* Add the listed compileOptions from the error message to your app-level build.gradle file. +* Increase the minSdkVersion for your Android project to **26** or above. + +### Why do I see 'java.lang.NoSuchMethodError' after upgrading to the 2.x version of Mobile SDK for Android? + +The Mobile Core 2.x SDK for Android includes changes that break compatiblity with solution SDKs developed for earlier verisons of the Mobile Core SDK. + +If you attempt to use 2.x Mobile Core SDK and solution SDKs that were built for previous versions of Mobile Core to build your app, you may encounter the following error: + +``` text +2023-02-13 17:45:02.501 14264-14264/XXX E/AndroidRuntime: FATAL EXCEPTION: main + Process: XXX, PID: XXXXX + java.lang.NoSuchMethodError: No static method getCore()Lcom/adobe/marketing/mobile/Core; in class Lcom/adobe/marketing/mobile/MobileCore; or its super classes (declaration of 'com.adobe.marketing.mobile.MobileCore' appears in XXX +``` + +To resolve this error, upgrade all your solution SDKs to the [most recent versions](../home/current-sdk-versions.md#android). + +### Why do I not see 'sdk-core' dependency for 2.x version of Mobile SDK for Android? + +The **com.adobe.marketing.mobile:sdk-core** dependency is no longer available for the 2.x version of Mobile SDK. Instead, select the appropriate solution SDKs based on your requirements from the following options: + +```java +implementation platform('com.adobe.marketing.mobile:sdk-bom:2.+') +implementation 'com.adobe.marketing.mobile:core' +implementation 'com.adobe.marketing.mobile:lifecycle' +implementation 'com.adobe.marketing.mobile:identity' +implementation 'com.adobe.marketing.mobile:signal' +``` + +### How do I upgrade to the 2.x version of Mobile SDK for Android if my app uses Mobile Services? + +Adobe Mobile Service's end-of-life date is [December 31, 2022](https://experienceleague.adobe.com/docs/discontinued/using/mobile-services.html). To upgrade to the 2.x version of Mobile SDK for Android, you have to remove the Mobile Services dependency from your app. + +### Why do I see a warning in AndroidManifest.xml about missing 'com.adobe.marketing.mobile.FullscreenMessageActivity' class? + +After upgrading to the 2.x version of Mobile SDK for Android, you will see the following build warning if your application previously set up in-app messages with Campaign Standard. + +``` text +Class referenced in the manifest, `com.adobe.marketing.mobile.FullscreenMessageActivity`, was not found in the project or the libraries +Unresolved class 'FullscreenMessageActivity' +``` + +To resolve the build warning, remove FullscreenMessageActivity from your application's manifest file. Campaign Standard SDK no longer requires application to add **FullscreenMessageActivity** to their manifest. + +### Why do I see 'unresolved reference' error when upgrading Adobe Target SDK? + +The [2.x version](../solution/adobe-target/release-notes.md#android-target-200) of Adobe Target Mobile SDK has the following breaking API changes for alignment with the iOS SDK: + +* **locationsDisplayed** is now **displayedLocations** +* **locationClicked** is now **clickedLocation** + +The public classes **TargetRequest**, **TargetPrefetch**, **TargetOrder**, **TargetProduct** and **TargetParameters** are consolidated under the **target** subpackage. + +To resolve the error, fix the method references and update your target import statements: + +```java +import com.adobe.marketing.mobile.target.TargetRequest; +import com.adobe.marketing.mobile.target.TargetPrefetch; +import com.adobe.marketing.mobile.target.TargetOrder; +import com.adobe.marketing.mobile.target.TargetProduct; +import com.adobe.marketing.mobile.target.TargetParameters; +``` + +In addition, replace the previously deprecated Target APIs and classes since they have been removed. For more information, please read this section on the [deprecated APIs and the recommended alternative APIs](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-target/deprecated-apis/). + +### Why do I see `registerDevice(String, String, Map)` cannot be applied to [arguments] error when upgrading Adobe Campaign Classic SDK? + +The `registerDevice` API in the 2.x Campaign Classic Android Mobile SDK, similar to iOS SDK, no longer provides a callback method for registration status since a `false` value cannot be accurately used as a signal to retry requests. + +To resolve the error, remove the callback (`AdobeCallback`) parameter from the method invocation. + +### Why do I see `getNearbyPointsOfInterest(Location, int, AdobeCallback>, AdobeCallback)` cannot be applied to [arguments] error when upgrading Adobe Experience Platform Location Service SDK? + +The `getNearbyPointsOfInterest` API without the error callback has been removed. Alternatively, use the below overloaded API which provides both successCallback and errorCallback: + +```java +public static void getNearbyPointsOfInterest(final Location location, + final int limit, + final AdobeCallback> successCallback, + final AdobeCallback errorCallback) +``` + +The public classes `PlacesAuthorizationStatus`, `PlacesPOI`, and `PlacesRequestError` are consolidated under the `places` subpackage. + +To resolve the error, fix the method references and update your places import statements: + +```java +import com.adobe.marketing.mobile.places.PlacesAuthorizationStatus; +import com.adobe.marketing.mobile.places.PlacesPOI; +import com.adobe.marketing.mobile.places.PlacesRequestError; +``` diff --git a/src/pages/resources/migration/android/tabs/migrate-to-2x.md b/src/pages/resources/migration/android/tabs/migrate-to-2x.md new file mode 100644 index 0000000000..dd78619758 --- /dev/null +++ b/src/pages/resources/migration/android/tabs/migrate-to-2x.md @@ -0,0 +1,49 @@ + + +```java +public class MainApp extends Application { + private static final String ENVIRONMENT_FILE_ID = ""; + + @Override + public void onCreate() { + super.onCreate(); + MobileCore.setApplication(this); + MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID); + List> extensions = new ArrayList<>(); + extensions.add(Lifecycle.EXTENSION); + extensions.add(Signal.EXTENSION); + extensions.add(UserProfile.EXTENSION); + extensions.add(Assurance.EXTENSION); + extensions.add(Identity.EXTENSION); + MobileCore.registerExtensions(extensions, o -> { + Log.d(LOG_TAG, "Adobe Experience Platform Mobile SDK is initialized"); + }); +} +} + + +``` + + + +```kotlin +class MyApp : Application() { + val ENVIRONMENT_FILE_ID = "" + + override fun onCreate() { + super.onCreate() + MobileCore.setApplication(this) + MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID) + val extensions = listOf( + Identity.EXTENSION, + Signal.EXTENSION, + Lifecycle.EXTENSION, + UserProfile.EXTENSION, + Assurance.EXTENSION + ) + MobileCore.registerExtensions(extensions) { + Log.d(LOG_TAG, "Adobe Experience Platform Mobile SDK is initialized") + } + } +} +``` diff --git a/src/pages/resources/migration/index.md b/src/pages/resources/migration/index.md new file mode 100644 index 0000000000..fe7308f420 --- /dev/null +++ b/src/pages/resources/migration/index.md @@ -0,0 +1,9 @@ +# Migration guides + +## Migration guides for Adobe Experience Platform SDKs for Android + +Learn how to [migrate between different versions of Adobe Experience Platform SDKs for Android](./android/index.md). + +## Migration guides for Adobe Experience Platform SDKs for iOS + +Learn how to [migrate between different versions of Adobe Experience Platform SDKs for iOS](./ios/index.md). diff --git a/src/pages/resources/migration/ios/index.md b/src/pages/resources/migration/ios/index.md new file mode 100644 index 0000000000..deb2478c2e --- /dev/null +++ b/src/pages/resources/migration/ios/index.md @@ -0,0 +1,11 @@ +# Migration guides for Adobe Experience Platform SDKs for iOS + +This document provides a collection of resources to help you migrate between various versions of the Adobe Experience Platform iOS SDKs. + +## Migrate to Adobe Experience Platform 4.x SDKs for iOS + +Learn how to [migrate to Adobe Experience Platform 4.x SDKs for iOS](./migrate-to-4x.md) from Experience Platform 3.x SDKs for iOS. + +## Migrate to Adobe Experience Platform 3.x SDKs for iOS + +Learn how to [migrate to Adobe Experience Platform 3.x SDKs for iOS](./migrate-to-3x.md) from ACP-prefixed Experience Platform SDKs, 2.x or lower. diff --git a/src/pages/resources/migration/ios/migrate-to-3x.md b/src/pages/resources/migration/ios/migrate-to-3x.md new file mode 100644 index 0000000000..040ec51ac1 --- /dev/null +++ b/src/pages/resources/migration/ios/migrate-to-3x.md @@ -0,0 +1,126 @@ +import Tabs from './tabs/migrate-to-3x.md' + +# Migrate to Adobe Experience Platform 3.x SDKs for iOS + + + +This Mobile SDK version for iOS supports a minimum iOS version of 10.0 and a tvOS version of 10.0. + +## SDK versions + +| Extension | Version | +|---|---| +| [Mobile Core](../../../home/base/mobile-core/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-core-ios.svg?label=AEPCore&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Rules Engine](../../../home/base/mobile-core/rules-engine/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-rulesengine-ios.svg?label=AEPRulesEngine&logo=apple&logoColor=white&color=orange&sort=semver&filter=1*) | +| [Signal](../../../home/base/mobile-core/signal/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-core-ios.svg?label=AEPSignal&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Identity](../../../home/base/mobile-core/identity/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-core-ios.svg?label=AEPIdentity&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Lifecycle](../../../home/base/mobile-core/lifecycle/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-core-ios.svg?label=AEPLifecycle&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Profile](../../../home/base/profile/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-userprofile-ios.svg?label=AEPUserProfile&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Adobe Experience Platform Assurance](../../../home/base/assurance/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-assurance-ios.svg?label=AEPAssurance&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Adobe Experience Platform Edge Network](../../../edge/edge-network/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edge-ios.svg?label=AEPEdge&logo=apple&logoColor=white&color=orange&sort=semver&filter=1*) | +| [Identity for Edge Network](../../../edge/identity-for-edge-network/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edgeidentity-ios.svg?label=AEPEdgeIdentity&logo=apple&logoColor=white&color=orange&sort=semver&filter=1*) | +| [Consent for Edge Network](../../../edge/consent-for-edge-network/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edgeconsent-ios.svg?label=AEPEdgeConsent&logo=apple&logoColor=white&color=orange&sort=semver&filter=1*) | +| [Edge Bridge](../../../solution/adobe-analytics/migrate-to-edge-network.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edgebridge-ios.svg?label=AEPEdgeBridge&logo=apple&logoColor=white&color=orange&sort=semver&filter=1*) | +| [Adobe Journey Optimizer](../../../edge/adobe-journey-optimizer/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-messaging-ios.svg?label=AEPMessaging&logo=apple&logoColor=white&color=orange&sort=semver&filter=1*) | +| [Adobe Journey Optimizer - Decisioning](../../../edge/adobe-journey-optimizer-decisioning/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-optimize-ios.svg?label=AEPOptimize&logo=apple&logoColor=white&color=orange&sort=semver&filter=1*) | +| [Places Service](https://experienceleague.adobe.com/docs/places/using/home.html) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-places-ios.svg?label=AEPPlaces&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Adobe Analytics](../../../solution/adobe-analytics/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-analytics-ios.svg?label=AEPAnalytics&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Adobe Analytics - Media Analytics for Audio & Video](../../../solution/adobe-media-analytics/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-media-ios.svg?label=AEPMedia&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Adobe Target](../../../solution/adobe-target/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-target-ios.svg?label=AEPTarget&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Adobe Campaign Standard](../../../solution/adobe-campaign-standard/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-campaign-ios.svg?label=AEPCampaign&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Adobe Campaign Classic](../../../solution/adobe-campaign-classic/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-campaignclassic-ios.svg?label=AEPCampaignClassic&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | +| [Adobe Audience Manager](../../../solution/adobe-audience-manager/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-audience-ios.svg?label=AEPAudience&logo=apple&logoColor=white&color=orange&sort=semver&filter=3*) | + +## Migrate from ACP-prefixed SDKs for iOS + +If you have implemented Objective-C versions (ACP-prefixed SDK libraries, 2.x or lower), then this guide will help you understand the steps required to migrate your implementation to the Swift versions (AEP-prefixed 3.x SDK libraries). In summary, you'll need to: + +1. [Switch imported libraries from ACP-prefix to AEP-prefix libraries](#switch-imported-libraries) +2. [Update SDK initialization](#update-sdk-initialization) +3. [Update outdated API references](#update-outdated-api-references) + +### Switch imported libraries + +At this time, the following ACP-prefix libraries may be switched out with their respective AEP-prefix SDK libraries. See instructions on proceeding further if you have [manually imported SDK libraries](#manual-library-import) , if you used [CocoaPods to manage SDK dependencies](#cocoapods), or you used [Swift Package Manager](#swift-package-manager). + + + +In addition to `ACPCore` being replaced with `AEPCore`, you will also need to explicitly import `AEPLifecycle`, `AEPIdentity`, and `AEPSignal` libraries to ensure there is no disruption in SDK behavior. + +| Objective-C (ACP-prefix) | Swift (AEP-prefix) | +| :----------------------- | :----------------- | +| ACPCore | AEPCore/AEPLifecycle/AEPIdentity/AEPSignal | +| ACPUserProfile | AEPUserProfile | +| ACPAnalytics | AEPAnalytics | +| ACPAudience | AEPAudience | +| ACPTarget | AEPTarget | +| ACPMedia | AEPMedia | +| ACPPlaces | AEPPlaces | +| AEPAssurance (1.x) | AEPAssurance (3.x) | +| ACPCampaign | AEPCampaign | +| ACPCampaignClassic | AEPCampaignClassic | + +#### Manual library import + +If you are manually importing SDK libraries, ensure you identify all currently used ACP-prefix libraries, remove them from your project, and switch them over to AEP-prefix libraries. + +#### CocoaPods + +If you are using CocoaPods to manage your Adobe Experience Platform Mobile SDK dependencies, the following example shows you how to switch ACP-prefix libraries to AEP-prefix libraries in your `Podfile`. + +```ruby +# replace ACPCore with AEPCore, AEPLifecycle, AEPIdentity and AEPSignal +# pod 'ACPCore' + pod 'AEPCore', '~> 3.0' + pod 'AEPLifecycle', '~> 3.0' + pod 'AEPIdentity', '~> 3.0' + pod 'AEPSignal', '~> 3.0' + +# replace ACPUserProfile with AEPUserProfile +# pod 'ACPUserProfile' + pod 'AEPUserProfile', '~> 3.0' +``` + +Save the `Podfile`, and run `pod repo update` to update your local CocoaPods repository. + +Once the previous command is complete, run `pod install` or `pod update` to update the application dependencies. + +#### Swift Package Manager + +If you are using Swift Package Manger (SPM) for managing your app dependencies, you can now include the AEP-prefixed libraries either through Xcode UI, or by declaring them as dependencies in the Package.swift project file. For more details, follow the guide for [managing dependencies using Swift Package Manager](../../manage-spm-dependencies.md). + +### Update SDK initialization + +After you have imported the new Swift-based AEP-prefix libraries, you'll need to update SDK initialization code as described below. With Swift, the `MobileCore.start()` API is no longer required. The SDK has simplified initialization and registration of extensions by providing the `MobileCore.registerExtensions()` API. After the given extensions have been registered, the SDK will be initialized and the completion block will be executed. Code which used to reside in the start() block will now reside in the `MobileCore.registerExtensions()` completion block. + +The following code snippets show the new and correct initialization code required for the Swift-based, AEP-prefix SDK libraries. + + + +Swift + + + +Objective-C + + + +## Update outdated API references + +Finally, you'll need to scan through your current implementation and replace ACP-prefix API calls to the new Swift-based, AEP-prefix libraries. A quick find and replace should do the trick. Detailed API changes by extension may be found at the links below. + +| SDK Component & Extensions | Migration API Reference | +| :--- | :--- | +| Core | [AEPCore](https://developer.adobe.com/client-sdks/previous-versions/documentation/mobile-core/migration) | +| Identity | [AEPIdentity](https://developer.adobe.com/client-sdks/previous-versions/documentation/mobile-core/identity/migration) | +| Lifecycle | [AEPLifecycle](https://developer.adobe.com/client-sdks/previous-versions/documentation/mobile-core/lifecycle/migration) | +| Signal | [AEPSignal](https://developer.adobe.com/client-sdks/previous-versions/documentation/mobile-core/signal/migration) | +| Profile | [AEPUserProfile](https://developer.adobe.com/client-sdks/previous-versions/documentation/profile/migration) | +| Adobe Experience Platform Assurance | [AEPAssurance](https://developer.adobe.com/client-sdks/previous-versions/documentation/platform-assurance-sdk/migration) | +| Adobe Experience Platform Places Service | [AEPPlaces](https://developer.adobe.com/client-sdks/previous-versions/documentation/places/migration) | +| Adobe Analytics | [AEPAnalytics](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-analytics/migration) | +| Adobe Analytics - Media Analytics for Audio & Video | [AEPMedia](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-media-analytics/migration) | +| Adobe Audience | [AEPAudience](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-audience-manager/migration) | +| Adobe Experience Platform Target | [AEPTarget](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-target/migration) | +| Adobe Experience Platform Campaign | [AEPCampaign](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-campaign-standard/migration) | +| Adobe Experience Platform Campaign Classic | [AEPCampaignClassic](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-campaign-classic/migration) | diff --git a/src/pages/resources/migration/ios/migrate-to-4x.md b/src/pages/resources/migration/ios/migrate-to-4x.md new file mode 100644 index 0000000000..9a8f7a1c13 --- /dev/null +++ b/src/pages/resources/migration/ios/migrate-to-4x.md @@ -0,0 +1,93 @@ +import Tabs from './tabs/migrate-to-4x.md' + +# Migrate to Adobe Experience Platform 4.x SDKs for iOS + + + +This Mobile SDK version for iOS now supports a minimum iOS version of 11.0 and a tvOS version of 11.0. The XCFrameworks included in the GitHub release are built using Xcode 14.1. + +## SDK versions + +| Extension | Version | +|---|---| +| [Mobile Core](../../../home/base/mobile-core/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-core-ios.svg?label=AEPCore&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Rules Engine](../../../home/base/mobile-core/rules-engine/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-rulesengine-ios.svg?label=AEPRulesEngine&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Signal](../../../home/base/mobile-core/signal/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-core-ios.svg?label=AEPSignal&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Identity](../../../home/base/mobile-core/identity/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-core-ios.svg?label=AEPIdentity&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Lifecycle](../../../home/base/mobile-core/lifecycle/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-core-ios.svg?label=AEPLifecycle&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Profile](../../../home/base/profile/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-userprofile-ios.svg?label=AEPUserProfile&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Experience Platform Assurance](../../../home/base/assurance/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-assurance-ios.svg?label=AEPAssurance&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Experience Platform Edge Network](../../../edge/edge-network/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edge-ios.svg?label=AEPEdge&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Identity for Edge Network](../../../edge/identity-for-edge-network/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edgeidentity-ios.svg?label=AEPEdgeIdentity&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Consent for Edge Network](../../../edge/consent-for-edge-network/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edgeconsent-ios.svg?label=AEPEdgeConsent&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Media for Edge Network](../../../edge/media-for-edge-network/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edgemedia-ios.svg?label=AEPEdgeMedia&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Edge Bridge](../../../solution/adobe-analytics/migrate-to-edge-network.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-edgebridge-ios.svg?label=AEPEdgeBridge&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Journey Optimizer](../../../edge/adobe-journey-optimizer/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-messaging-ios.svg?label=AEPMessaging&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Journey Optimizer - Decisioning](../../../edge/adobe-journey-optimizer-decisioning/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-optimize-ios.svg?label=AEPOptimize&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Places Service](https://experienceleague.adobe.com/docs/places/using/home.html) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-places-ios.svg?label=AEPPlaces&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Analytics](../../../solution/adobe-analytics/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-analytics-ios.svg?label=AEPAnalytics&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Analytics - Media Analytics for Audio & Video](../../../solution/adobe-media-analytics/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-media-ios.svg?label=AEPMedia&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Target](../../../solution/adobe-target/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-target-ios.svg?label=AEPTarget&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Campaign Standard](../../../solution/adobe-campaign-standard/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-campaign-ios.svg?label=AEPCampaign&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Campaign Classic](../../../solution/adobe-campaign-classic/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-campaignclassic-ios.svg?label=AEPCampaignClassic&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | +| [Adobe Audience Manager](../../../solution/adobe-audience-manager/index.md) | ![Version](https://img.shields.io/github/v/release/adobe/aepsdk-audience-ios.svg?label=AEPAudience&logo=apple&logoColor=white&color=orange&sort=semver&filter=4*) | + +## Migrate from Adobe Experience Platform 3.x SDKs for iOS + +If you have implemented Adobe Experience Platform 3.x SDKs for iOS, then this guide will help you understand the steps required to migrate your implementation to the Experience Platform 4.x SDKs. In summary, you'll need to: + +1. [Update dependencies](#update-dependencies) +2. [Update outdated API references](#update-outdated-api-references) + +### Update dependencies + +#### Manual library import + +If you are importing SDK libraries manually, make sure to update your libraries by downloading the most recent 4.x binaries from their respective Github repositories. + +#### CocoaPods + +If you are using CocoaPods to manage your Adobe Experience Platform Mobile SDK dependencies, the following example shows you how to update to Experience Platform 4.x SDKs in your `Podfile`. + +```ruby +# Update pod dependencies to 4.x version +# pod 'AEPCore', '~> 3.0' +# pod 'AEPLifecycle', '~> 3.0' +# pod 'AEPIdentity', '~> 3.0' +# pod 'AEPSignal', '~> 3.0' +# pod 'AEPUserProfile', '~> 3.0' + + pod 'AEPCore', '~> 4.0' + pod 'AEPLifecycle', '~> 4.0' + pod 'AEPIdentity', '~> 4.0' + pod 'AEPSignal', '~> 4.0' + pod 'AEPUserProfile', '~> 4.0' +``` + +Save the `Podfile`, and run `pod repo update` to update your local CocoaPods repository. + +Once the previous command is complete, run `pod install` or `pod update` to update the application dependencies. + +#### Swift Package Manager + +If you are using Swift Package Manger (SPM) for managing your app dependencies, you can now include the Experience Platform 4.x SDKs either through Xcode UI, or by declaring them as dependencies in the Package.swift project file. For more details, follow the guide for [managing dependencies using Swift Package Manager](../../manage-spm-dependencies.md). + +## Update outdated API references + +### Adobe Experience Platform Edge Network + +The following APIs have been removed: + +| Removed API | Alternative API | +| :------------- | :-------------- | +| `XDMFormatters` utility | Use `getISO8601UTCDateWithMilliseconds()` and `getISO8601FullDate()` functions in the [Date class extension](https://github.com/adobe/aepsdk-core-ios/blob/4.0.0/AEPServices/Sources/utility/Date%2BFormat.swift) from the AEPServices module. | + + + +iOS 3.x + + + +iOS 4.x + + diff --git a/src/pages/resources/migration/ios/tabs/migrate-to-3x.md b/src/pages/resources/migration/ios/tabs/migrate-to-3x.md new file mode 100644 index 0000000000..14964a97e7 --- /dev/null +++ b/src/pages/resources/migration/ios/tabs/migrate-to-3x.md @@ -0,0 +1,48 @@ + + +```objc +@import AEPCore; +@import AEPSignal; +@import AEPLifecycle; +@import AEPIdentity; +@import AEPUserProfile; +@import AEPServices; +... + +// AppDelegate.m +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + const UIApplicationState appState = application.applicationState; + [AEPMobileCore setLogLevel: AEPLogLevelDebug]; + [AEPMobileCore registerExtensions:@[AEPMobileSignal.class, AEPMobileLifecycle.class, AEPMobileUserProfile.class, AEPMobileIdentity.class] completion:^{ + [AEPMobileCore configureWithAppId: @""]; + if (appState != UIApplicationStateBackground) { + // only start lifecycle if the application is not in the background + [AEPMobileCore lifecycleStart:@{@"contextDataKey": @"contextDataVal"}]; + } + }]; + ... +} +``` + + + +```swift +// AppDelegate.swift +import AEPCore +import AEPIdentity +import AEPLifecycle +import AEPSignal +import AEPUserProfile + +func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + let appState = application.applicationState + MobileCore.registerExtensions([Signal.self, Lifecycle.self, UserProfile.self, Identity.self], { + MobileCore.configureWith(appId: "") + if appState != .background { + // only start lifecycle if the application is not in the background + MobileCore.lifecycleStart(additionalContextData: ["contextDataKey": "contextDataVal"]) + } + }) + ... +} +``` diff --git a/src/pages/resources/migration/ios/tabs/migrate-to-4x.md b/src/pages/resources/migration/ios/tabs/migrate-to-4x.md new file mode 100644 index 0000000000..26ea38be30 --- /dev/null +++ b/src/pages/resources/migration/ios/tabs/migrate-to-4x.md @@ -0,0 +1,21 @@ + + +#### Swift + +```swift +import AEPEdge +let date = Date() +let formattedDate = XDMFormatters.dateToFullDateString(date) +let formattedDateWithMs = XDMFormatters.dateToISO8601String(date) +``` + + + +#### Swift + +```swift +import AEPServices +let date = Date() +let formattedDate = date.getISO8601FullDate() +let formattedDateWithMs = date.getISO8601UTCDateWithMilliseconds() +``` diff --git a/src/pages/solution/adobe-campaign-standard/tabs/api-reference.md b/src/pages/solution/adobe-campaign-standard/tabs/api-reference.md index 55b20a3038..9a02d31e83 100644 --- a/src/pages/solution/adobe-campaign-standard/tabs/api-reference.md +++ b/src/pages/solution/adobe-campaign-standard/tabs/api-reference.md @@ -68,7 +68,7 @@ This API has been deprecated as of version 2.0.0. Please use the [Mobile Core re -This API no longer exists in the Adobe Campaign Standard extension. Instead, the extension should be registered by calling the `registerExtensions` API in the MobileCore. Please see the updated SDK initialization steps at the [migrate to Swift tutorial](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-swift/). +This API no longer exists in the Adobe Campaign Standard extension. Instead, the extension should be registered by calling the `registerExtensions` API in the MobileCore. Please see the updated SDK initialization steps at the [migrate to Swift tutorial](../../../resources/migration/ios/migrate-to-3x.md).