customerio / customerio-reactnative

MIT License
25 stars 11 forks source link

chore: fcm app not compiling and throws error on debugging #245

Closed ami-aman closed 7 months ago

ami-aman commented 7 months ago

closes : https://linear.app/customerio/issue/MBL-92/do-our-rn-sample-apps-on-main-work-as-expected

Context

React native FCM sample app's NotificationServiceExtension does not compile. It was found that it throws an error in the console log on debugging the extension target. The error log is:

__extensionPrincipalClass != nil - /Library/Caches/com.apple.xbs/Sources/ExtensionFoundation_Sim/ExtensionFoundation/Source/NSExtension/NSExtensionSupport/EXConcreteExtensionContextVendor.m:109: Unable to find NSExtensionPrincipalClass (NotificationServiceExtension.NotificationService) in extension bundle! Please verify that the extension links the required frameworks and that the value for NSExtensionPrincipalClass is prefixed with '$(PRODUCT_MODULE_NAME).' if the class is implemented in Swift.

This is the same error that one of our customer experienced and the same that prevented the app to display rich push notifications on the device.

For more context:

PR Summary

This PR fixes the error by removing the prefixed '$(PRODUCT_MODULE_NAME).' in Info.plist.

Test plan

To reproduce the issue on main branch:

After the fix: