简体   繁体   English

为什么我可以通过XCode在设备上运行我的应用程序,但不能对其进行配置文件?

[英]Why can I run my app on my device from XCode but not profile it?

I am trying to profile my app. 我正在尝试分析我的应用。 I can run it on device from Xcode but when I try to profile it I get an error message in Instruments 'Target failed to run: Permission to debug com.xxxx.xxxx was denied. 我可以从Xcode在设备上运行它,但是当我尝试对其进行配置文件时,会在“仪器无法运行目标”中得到一条错误消息:调试com.xxxx.xxxx的权限被拒绝。 The app must be signed with a Development Entity (eg, 'iOS Developer).' 该应用必须使用开发实体(例如“ iOS开发者”)签名。

I have edited my scheme so that 'Run xxxx' and 'Profile xxxx' are both set to use my Release Configuration. 我已经编辑了方案,以便将“运行xxxx”和“配置文件xxxx”都设置为使用我的发布配置。

My code signing identity is set to an specific iPhone Developer identity (ie, 'iPhone Developer: myname (X234X234X234)'), not 'iOS Developer', so I don't think there is any confusion about which identity to use. 我的代码签名身份设置为特定的iPhone开发人员身份(即“ iPhone开发人员:myname(X234X234X234)”),而不是“ iOS开发人员”,因此我认为使用哪种身份不会造成任何混淆。 I do have 2 developer identities, one for Enterprise Distribution. 我确实有2个开发人员身份,一个用于企业分发。

I think my app is properly signed because it runs. 我认为我的应用已正确签名,因为它可以运行。 Any idea why profiling it fails? 知道为什么分析失败了吗?

Ran into the exact same issue earlier today. 今天早些时候遇到了同样的问题。

Under Schemes -> Edit Schemes 在方案下->编辑方案

Select Profile : and switch to Debug (should be Release by default). 选择配置文件:并切换到调试(默认情况下应释放)。

This is pretty weird though. 不过这很奇怪。 Should be Debug by Default (Hey Apple!) 默认情况下应该是调试(Apple嗨!)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM