Migrating to AEPPlaces reference
This document is a reference comparison of AEPPlaces (3.x) APIs agains against their equivalent ACPPlaces (2.x) APIs.
The AEPPlaces extension is implemented purely in Swift and is compatible with the AEPCore swift SDK. To ensure a smooth transition from the ACPPlaces SDK, there are no major changes on the API names or definition. For more details, follow the migration guide below for your Swift or Objective-C mobile application. If explanation beyond showing API differences is necessary, it will be captured as an info hint within that API's section.

Public classes

Type
AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
Primary Class
Places
AEPMobilePlaces
ACPPlaces
Enum
PlacesQueryResponseCode
AEPPlacesQueryResponseCode
ACPPlacesRequestError
Class
PointOfInterest
AEPPlacesPoi
ACPPlacesPoi
Enum
PlacesRegionEvent
AEPPlacesRegionEvent
ACPRegionEventType

Public APIs (alphabetical)

clear

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func clear()
Copied!
1
+ (void) clear;
Copied!
1
+ (void) clear;
Copied!

extensionVersion

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static var extensionVersion: String
Copied!
1
+ (nonnull NSString*) extensionVersion;
Copied!
1
+ (nonnull NSString*) extensionVersion;
Copied!

getCurrentPointsOfInterest

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func getCurrentPointsOfInterest(_ closure: @escaping ([PointOfInterest]) -> Void)
Copied!
1
+ (void) getCurrentPointsOfInterest: ^(NSArray<AEPPlacesPoi*>* _Nonnull pois) closure;
Copied!
1
+ (void) getCurrentPointsOfInterest: (nullable void (^) (NSArray<ACPPlacesPoi*>* _Nullable userWithinPoi)) callback;
Copied!

getLastKnownLocation

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
If the SDK has no last known location, it will pass nil to the closure.
1
static func getLastKnownLocation(_ closure: @escaping (CLLocation?) -> Void)
Copied!
1
+ (void) getLastKnownLocation: ^(CLLocation* _Nullable lastLocation) closure;
Copied!
If the SDK has no last known location, it will pass a CLLocation object with a value of 999.999 for latitude and longitude to the callback.
1
+ (void) getLastKnownLocation: (nullable void (^) (CLLocation* _Nullable lastLocation)) callback;
Copied!

getNearbyPointsOfInterest

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
Rather than providing an overloaded method, a single method supports retrieval of nearby Points of Interest. The provided closure accepts two parameters, representing the resulting nearby points of interest (if any) and the response code.
1
static func getNearbyPointsOfInterest(forLocation location: CLLocation,
2
withLimit limit: UInt,
3
closure: @escaping ([PointOfInterest], PlacesQueryResponseCode) -> Void)
Copied!
1
+ (void) getNearbyPointsOfInterest: (nonnull CLLocation*) currentLocation
2
limit: (NSUInteger) limit
3
callback: ^ (NSArray<AEPPlacesPoi*>* _Nonnull, AEPPlacesQueryResponseCode) closure;
Copied!
Two getNearbyPointsOfInterest methods exist. The overloaded version allows the caller to provide an errorCallback parameter in the case of failure.
1
// without error handling
2
+ (void) getNearbyPointsOfInterest: (nonnull CLLocation*) currentLocation
3
limit: (NSUInteger) limit
4
callback: (nullable void (^) (NSArray<ACPPlacesPoi*>* _Nullable nearbyPoi)) callback;
5
6
// with error handling
7
+ (void) getNearbyPointsOfInterest: (nonnull CLLocation*) currentLocation
8
limit: (NSUInteger) limit
9
callback: (nullable void (^) (NSArray<ACPPlacesPoi*>* _Nullable nearbyPoi)) callback
10
errorCallback: (nullable void (^) (ACPPlacesRequestError result)) errorCallback;
Copied!

processRegionEvent

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
The order of parameters has the PlacesRegionEvent first, and the CLRegion that triggered the event second. This aligns better with Swift API naming conventions.
1
static func processRegionEvent(_ regionEvent: PlacesRegionEvent,
2
forRegion region: CLRegion)
Copied!
1
+ (void) processRegionEvent: (AEPRegionEventType) eventType
2
forRegion: (nonnull CLRegion*) region;
Copied!
The order of parameters has the CLRegion that triggered the event first, and the ACPRegionEventType second.
1
+ (void) processRegionEvent: (nonnull CLRegion*) region
2
forRegionEventType: (ACPRegionEventType) eventType;
Copied!

registerExtension

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
Registration occurs by passing Places to the MobileCore.registerExtensions API.
1
MobileCore.registerExtensions([Places.self])
Copied!
Registration occurs by passing AEPMobilePlaces to the [AEPMobileCore registerExtensions:completion:] API.
1
[AEPMobileCore registerExtensions:@[AEPMobilePlaces.class] completion:nil];
Copied!
1
+ (void) registerExtension;
Copied!

setAuthorizationStatus

AEP 3.x (Swift)
AEP 3.x (Objective-C)
ACP 2.x (Objective-C)
1
static func setAuthorizationStatus(status: CLAuthorizationStatus)
Copied!
1
+ (void) setAuthorizationStatus: (CLAuthorizationStatus) status;
Copied!
1
+ (void) setAuthorizationStatus: (CLAuthorizationStatus) status;
Copied!
Last modified 3mo ago