I implemented a basic version of the Notification Service Extension but it doesn't get called. Would like to ask for an advice...
【Issue Description】
Step 1: Run the main app that contains the extension on my iPhone.
Step 2: Set the breakpoints and add some logs in the extension.
Step 3: Attach the extension to the process for debugging purpose. Besides the "scheme" section, it always shows “waiting to attach to Notification Service on Angel’s iPhone".
Step 4: Triggered the push notification when the device screen is locked. I immediately received a message which was apparently not modified.
Step 5: The title -"Notification Service Extension" appears in console area. But no logs was printed out on the console. And no breakpoint was hit. So apparently this extension target was not invoked.
【Attempts I made】
1.Make sure "mutable-content: 1" is in notification payload;
2.Make sure an alert dictionary with "title" field is in notification payload;
3.Make sure TARGETS (main) -> Build Phases -> Embed App Extensions -> Uncheck "Copy only when installing" is unchecked;
4.Check the deployment version of both main app and the extension target(13.0) are lower than my device version(15.4).
5.Tried to explicitly & directly run the extension target but received an XPCError -"connection invalid".
6.Tried to create a new extension with minimal code but met with the exact same issue.