Enable rich notifications
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 use_frameworks!
pod "AmplifyUtilsNotifications"end- Install the new pods by running
pod installin theios/of your application project.
cd iospod 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.