Configure Marketing Cloud Engagement
Runtime Toggles
Event Tracking
Troubleshoot Initialization and Registration
Troubleshoot Push Implementation
Troubleshoot Issues in iOS Service Extensions
Handle URLs
Data Protection and Privacy
Changelog
This guide provides a structured approach to troubleshooting common issues in iOS Service Extensions, ensuring seamless integration and functionality.
Embedded binary signing errors occur when you disable automatic signing and your Main Target and Notification Service Extension are signed with different certificates. If you encounter build failures or runtime issues related to code signing, follow these troubleshooting steps.
Make sure both your app and its extension are set up to use the same App Group. Check the entitlements file and the App Groups setting in both the app and extension targets.
1<plist version="1.0">
2 <dict>
3 <!-- App Group for your app and extensions -->
4 <key>com.apple.security.application-groups</key>
5 <array>
6 <string>group.com.yourcompany.yourapp.shared</string>
7 </array>
8 </dict>
9</plist>A common source of errors in Service Extensions is incorrect Info.plist settings. To avoid potential issues, review these key configurations.
Make sure the NSExtension key in your extension’s Info.plist is set up correctly. For the Notification Service Extension, make sure that NSExtensionPrincipalClass is properly set. If you’re using Swift, prefix it with $(PRODUCT_MODULE_NAME) to link to the Swift class.
1<key>NSExtensionPrincipalClass</key>
2<string>$(PRODUCT_MODULE_NAME).NotificationService</string>1<key>NSExtensionPrincipalClass</key>
2<string>NotificationService</string>Make sure that the SF_MARKETINGCLOUD_APP_GROUP_KEY key in the Info.plist of your extension is set to the correct value.
To make sure your Notification Service Extension functions correctly with the SDK, verify these configurations.
Make sure your NotificationService class inherits from SFMCNotificationService. Incorrect inheritance can cause the extension to not work properly.
Enable debug-level logging using the sfmcProvideConfig() method to help debug any issues when setting up the SDK.
1override func sfmcProvideConfig() → SFNotificationServiceConfig {
2 return SFNotificationServiceConfig(logLevel: .debug)
3 }1- (SFMCNotificationServiceConfig *)sfmcProvideConfig {
2 return [[SFMCNotificationServiceConfig alloc] initWithLogLevel:SFMCExtensionSdkLogLevelDebug];
3 }Notification Service Extension has a limited time to handle notifications. Make sure your code doesn’t exceed these limits. For more information, see the official documentation on Apple Developer.
Service extensions can have memory issues or use too many resources. Use Xcode’s Instruments (like Allocations and Leaks) to monitor memory usage and stay within limits.