Problem
Push templates (carousel images, background color, font color, and so on) do not display correctly in Push notifications when the Notification Content Extension is implemented.
Instruction
Verify the following steps:
- The Info.plist of the Notification Content Extension should look like this:
<key>NSExtensionAttributes</key>
<dict>
<key>UNNotificationExtensionCategory</key>
<string>MOE_PUSH_TEMPLATE</string>
<key>UNNotificationExtensionDefaultContentHidden</key>
<true/>
<key>UNNotificationExtensionInitialContentSizeRatio</key>
<real>1.2</real>
<key>UNNotificationExtensionUserInteractionEnabled</key>
<true/>
</dict> - Select MainInterface.storyboard in the Content extension, remove the default label, and set the background color of the View to clear.
- Check Build Phases in Main App Target.
- In Embed App Extensions/Embed Foundation Extensions, ensure that Copy only when installing is not selected.
- Ensure Consistent appGroupId Across Configurations.
- Verify that the appGroupId is consistent across all schemes and configurations (for example, Debug/Release/QA/UAT) in the project.
- Align Build Configuration.
- When running or archiving the project, make sure that the Build Configuration for the Main Target, Notification Service Extension, and Notification Content Extension Target points to the same scheme/configuration.