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

Page updated Apr 12, 2024


For advanced use cases where Amplify does not provide the functionality, you can retrieve an escape hatch to access the underlying Amazon Pinpoint client.

Note: While the Amplify Library for Swift is production ready, please note that the underlying AWS SDK for Swift is currently in Developer Preview, and is not yet intended for production workloads. Here is additional reading material on the stability of the SDK.

Add the following import:

import AWSPinpointAnalyticsPlugin

Then retrieve the escape hatch with this code:

do {
// Retrieve the reference to AWSPinpointAnalyticsPlugin
let plugin = try Amplify.Analytics.getPlugin(for: "awsPinpointAnalyticsPlugin")
guard let analyticsPlugin = plugin as? AWSPinpointAnalyticsPlugin else {
// Retrieve the reference to PinpointClientProtocol
let pinpointClient = analyticsPlugin.getEscapeHatch()
// Make requests using pinpointClient...
// ...
} catch {
print("Get escape hatch failed with error - \(error)")