Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug Notification Extensions

I'm building a set of Notification Extensions (Service/Content). I'm unable to connect to Xcode debugger or even log out to the device log or console.

Is there any way to see any kind of output?

like image 396
dogsgod Avatar asked Jul 01 '16 08:07

dogsgod


People also ask

What is notification extension?

An object that modifies the content of a remote notification before it's delivered to the user.


2 Answers

Change the target to run the extension

Change Target

then select run and choose your app from the 'Choose an app to run:' window.

enter image description here

like image 164
brendan Avatar answered Sep 17 '22 14:09

brendan


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 extension 2) Select Debug / Attach to Process by PID or name 3) Enter the name of the extension target 4) Trigger the push notification 

Before step 2 make sure to stop your current running app.

like image 29
Saurabh Prajapati Avatar answered Sep 21 '22 14:09

Saurabh Prajapati