Reputation: 379
I tried two ways to debug while the extension is running:
a. using NSlog, such as
NSLog(@"%@", ((NSExtensionItem *)self.extensionContext.inputItems.firstObject).userInfo);
but no log shows.
b. using code like
p self.extensionContext
in the lldb debug mode, but it tells me
error: property 'extensionContext' not found on object of type 'ShareViewController *'
error: 1 errors parsing expression
Upvotes: 1
Views: 295
Reputation: 3838
As mentioned HERE, you can debug share extension by attaching target
Debug -> Attach Process -> By process name or PID
In our case, PID will be Share extension bundle name as mentioned in Share Extension Target.
Upvotes: 0
Reputation: 1502
You need to use simulator debug. On Simulator, click on Debug Menu, Open System Log.
Upvotes: 1