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

Page updated Apr 19, 2024

Use AWS 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 AWS services used by the Amplify Predictions category that isn't available, we provide an escape hatch so you can get a reference to that service. For example, to get a reference to AWSRekognition:

guard let predictionsPlugin = try Amplify.Predictions.getPlugin(for: "awsPredictionsPlugin") as? AWSPredictionsPlugin else {
print("Unable to cast to AWSPredictionsPlugin")
return
}
guard let rekognitionService = predictionsPlugin.getEscapeHatch(key: .rekognition) as? AWSRekognition else {
print("Unable to get AWSRekognition")
return
}
let request = AWSRekognitionCreateCollectionRequest()
if let request = request {
rekognitionService.createCollection(request)
}

In addition to AWSRekognition, this same pattern can be used to get access to AWSTranslate, AWSPolly, AWSTranscribeStreaming, AWSComprehend, and AWSTextract. For example:

guard let translateService = predictionsPlugin.getEscapeHatch(key: .translate) as? AWSTranslate else {
print("Unable to get AWSTranslate")
return
}
guard let pollyService = predictionsPlugin.getEscapeHatch(key: .polly) as? AWSPolly else {
print("Unable to get AWSPolly")
return
}
guard let transcribeService = predictionsPlugin.getEscapeHatch(key: .transcribe) as? AWSTranscribeStreaming else {
print("Unable to get AWSTranscribeStreaming")
return
}
guard let comprehendService = predictionsPlugin.getEscapeHatch(key: .comprehend) as? AWSComprehend else {
print("Unable to get AWSComprehend")
return
}
guard let textractService = predictionsPlugin.getEscapeHatch(key: .textract) as? AWSTextract else {
print("Unable to get AWSTextract")
return
}

API Documentation Resources