Debug Notification Extensions
Change the target to run the extension
then select run and choose your app from the 'Choose an app to run:' window.
I have tried as per brendan's Answer but is not working for me at all!
I am getting below error in console
Program ended with exit code: 0
Then after searching on google i have checked this answer. however this also not worked for me for while!
Then i have tried same steps again as given in answer, After stopping my current running app. then follow same steps.For clarity i am writing this steps as below:
After running the app that contains the extension,
1) Set your breakpoint in the extension2) Select Debug / Attach to Process by PID or name3) Enter the name of the extension target4) Trigger the push notification
Before step 2 make sure to stop your current running app.
This worked for me to stop at breakpoints in the extension and see the extension log:
- Choose the notification extension scheme, not the main app scheme
- Run the app and select the main app from the list
Choose an app to run
- Stop the app in Xcode and terminate it manually on the device; not terminating it manually results in
Message from debugger: Terminated due to signal 9
after step 6. [Update: Terminating the app manually on the device doesn't seem to be necessary, try either way if it doesn't work.] - Select Menu
Debug > Attach to Process by PID or Name
- Enter the correct extension name, not the main app name
- Send the push notification