Debug Notification Extensions

前端 未结 9 876
感动是毒
感动是毒 2020-12-08 19:10

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

9条回答
  •  情歌与酒
    2020-12-08 19:46

    This worked for me to stop at breakpoints in the extension and see the extension log:

    1. Choose the notification extension scheme, not the main app scheme
    2. Run the app and select the main app from the list Choose an app to run
    3. 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.]
    4. Select Menu Debug > Attach to Process by PID or Name
    5. Enter the correct extension name, not the main app name
    6. Send the push notification

提交回复
热议问题