Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 29, 2024

Use Amazon Location Service SDK

Amplify iOS v1 is deprecated as of June 1st, 2024. No new features or bug fixes will be added. Dependencies may become outdated and potentially introduce compatibility issues.

Please use the latest version (v2) of Amplify Library for Swift to get started. Refer to the upgrade guide for instructions on upgrading your application to the latest version.

Amplify libraries should be used for all new cloud connected applications. If you are currently using the AWS Mobile SDK for iOS, you can access the documentation here.

If you need functionality in the AWSLocation framework used by the Amplify Geo category that isn't available, we provide an escape hatch so you can reference it directly.

Note: If you provisioned your Geo resources via Amplify CLI, then the IAM policy will be specifically scoped to only allow actions required by the library. Please adjust your authorization permissions accordingly for your escape hatch use-cases.

import AWSLocationXCF
import AWSLocation

Then retrieve the escape hatch and call methods on AWSLocation directly:

do {
// Retrieve AWSLocationGeoPlugin
let plugin = try Amplify.Geo.getPlugin(for: "awsLocationGeoPlugin")
guard let locationPlugin = plugin as? AWSLocationGeoPlugin else {
return
}
// Retrieve reference to AWSLocation
let awsLocation = locationPlugin.getEscapeHatch()
// Make Request
let request = AWSLocationListMapsRequest()!
request.maxResults = 5
awsLocation.listMaps(request) { response, error in
// handle response ...
}
} catch {
print("Error occurred while fetching the escape hatch \(error)")
}

Documentation Resources

Maps

Places

Device Tracking