Migrate to Adobe Experience Platform 4.x SDKs for iOS

data-variant=info
data-slots=text
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

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
  2. 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.

# 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.

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 from the AEPServices module.

iOS 3.x

iOS Swift

import AEPEdge
let date = Date()
let formattedDate = XDMFormatters.dateToFullDateString(date)
let formattedDateWithMs = XDMFormatters.dateToISO8601String(date)

iOS 4.x

iOS Swift

import AEPServices
let date = Date()
let formattedDate = date.getISO8601FullDate()
let formattedDateWithMs = date.getISO8601UTCDateWithMilliseconds()