Run Xcode Instruments on device with a ios keyboard extension

匆匆过客 提交于 2019-12-21 21:27:23

问题


I'm developing a custom keyboard but it's very slow and sometimes it's crashing.

Because I'm not sure where it comes from, I'd like to Time Profiler with Instruments. But when I select MyIphone > Keyboard Extension (target), I get:

Target failed to run

or

Waiting for x.x.x.Keyboard

Please take appropriate action to initiate the launch of 'x.x.x.Keyboard.'


Is it even possible to use Instruments with an app extension? If yes, how should I proceed?


回答1:


I can't use Instruments to analyze my keyboard before, however my method might be helpful to you.

  1. Run the project on your iPhone.
  2. Xcode the left column, the seventh button 'Show the Debug navigator', select the 'Memory' column.
  3. In the right 'Memory Report', select 'Profile in Instruments' in the upper right corner. Instruments will open.

I used this method to enter the Instruments tool to analyze the memory. I noticed that the software name displayed on the Instruments tool was followed by a number, like com.xxx.xxx.keyboard (4489).

Accessing Instruments directly from Xcode->Product->Profile does not work properly. This may be the key.

Hope this helps you.



来源:https://stackoverflow.com/questions/47513051/run-xcode-instruments-on-device-with-a-ios-keyboard-extension

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!