Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 10, call directory extension not debugged

I am working on Call directory extension with callkit.

I selected Call directory extension for debug and when I run this target, no NSLog is shown.

How can I debug this extension?

ps : When I run this extension, Debug -> Attach to process -> no target is checked....

enter image description here

like image 829
Lisa Avatar asked Jun 30 '16 01:06

Lisa


2 Answers

Just use the menu point one above "Attach to Process by PID or Name" and use the name of the Callkit extension.

jvc

like image 95
Josen Avatar answered Sep 27 '22 19:09

Josen


Attaching the Xcode debugger to call kit extension is a little bit different from other extensions. When debugging it, although you see the extension "Waiting to attach" in debug navigator. Xcode doesn't attach it automatically like other extension! I am not sure if this is a Xcode bug.

So you have to attach the extension by yourself. I found there are 2 simple ways to do it,

  1. Run your extension target, let you app load the extension, then you can see the extension process in "Attach to Process" menu, attach it. Then for the 2nd time you run into your extension Xcode will stop at your breakpoint.
  2. Run your host app target, Attach to Process by PID or Name, use your extension target name. Then Xcode will stop at your breakpoint for the 1st time you run your extension.
like image 27
Qiulang 邱朗 Avatar answered Sep 27 '22 17:09

Qiulang 邱朗