Enable rich notifications
These docs cover Amplify Gen 1. For new web apps, we recommend the latest AWS Amplify, with a simplified CLI and native integrations for databases, storage, and AI models. Get started with the latest AWS Amplify.
Amplify currently supports adding images to your notifications, but there are some additional steps required.
Create a Notification Service Extension
-
Open
<your-app-name>.xcworkspacelocated inside the/iosfolder of your application project with Xcode. -
In the Xcode project, select File > New > Target...
- Select Notification Service Extension > Next.
- Enter a name for your service extension (e.g. MyNotificationServiceExtension) and select Finish.
Provide the extension with the Amplify service class
-
Open
Podfilelocated inside the/iosfolder of your application project with a text editor. -
Add
AmplifyUtilsNotificationsto the extension you created above.
target 'MyNotificationServiceExtension' do # Replace with your service extension pod "AmplifyUtilsNotifications"end- Install the new pods by running the following command at the root of your application project.
npx pod-install-
Open
<your-app-name>.xcworkspacelocated inside the/iosfolder of your application project with Xcode. -
Find your extension folder in the Project navigator pane and select the Info Property List.
- Update the
NSExtensionPrincipalClassproperty with the valueAmplifyUtilsNotifications.AUNotificationService.