I'm writing a Mac app in the sandbox, and can't seem to get code signing to work. I've selected "Developer ID" from the Info tab for my target, and I've tried letting Xcode set up my provisioning profile automatically as well as creating the profile myself. The app builds without any errors or warnings, but when I try to "build and run," it gives me the following error:
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In console.app
, I noticed I was getting the following message:
3/5/15 4:46:37.151 PM taskgated[73]: killed com.nateparrott.Boxcar[pid 27408] because its use of the com.apple.developer.ubiquity-container-identifiers entitlement is not allowed (error code -67050)
It turns out that the default entitlements file in my project included an empty list of iCloud container, which caused the sandbox to think the app needed iCloud permissions (which weren't included in the default provisioning profile). Removing the iCloud entry from the entitlements file solved the problem.
回答2:
Try to regenerate your certificates from the Dev Center. This happens most of the times when you switch to a new mac or after upgrading to a newer OS X version.
回答3:
- You have downloaded and installed your cert (in Keychain Access) from the portal. If you created the cert today on the same Mac you're trying to run it on this won't be your issue.
- Your cert from above is in the provisioning profile you imported into XCode.
- You actually imported your provisioning profile into XCode. It should be selectable form your Build Settings drop-down.
- The bundle identifier you created in the portal matches what you have designated in your project under the Target Info.
回答4:
I tried Setting Build Settings->code signing identity to "Mac Developer" and Provisioning Profile to "Automatic". The debugger worked fine after that.