use instruments - leaks with a device

一个人想着一个人 提交于 2019-11-29 22:03:25

The solution for me was to make sure that my Profile scheme was using the "debug" and not "release" build configuration.

In Xcode 4 select Product/Edit Scheme from the top menu then click on the "profile" button on the left. On the "info" pane you will see a setting for Build Configuration- set that to "debug"

This error is also thrown if you are trying to test your app on a device with a distribution profile selected. Make sure you have the correct code-sign settings for development.

William Jockusch

You CAN profile the release build on the device. What you have to do is build the release build with a developer certificate. See here.

Instruments basically does its work by becoming the debugger for the app. If you can't run Xcode's debugger against it, then you can't run Instruments against it.

Mostly, entitlements need to be set to allow debugging.

Sometimes after using XCode to debug apps, I find I can't use Instruments until I reboot the device.

Unlike XCode, Instruments can be confused between two apps with the same name, but different bundle IDs. (Or perhaps same name and similar bundle IDs.) When I have multiple versions of an app on a device, I often have to delete the extra to get Instruments to connect to the correct app. If you have one debug build and one release build, this could be the problem.

So, delete any duplicates of your app and restart the device. (You could change the display name for release and debug build configurations.)

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