开发者

Xcode 4.1 Code Signing Issue

开发者 https://www.devze.com 2023-03-19 19:52 出处:网络
I\'ve read through many threads and can\'t find anything like my issue here. I think that this is a simple fix, but I just can\'t seem to find the answer.I\'m using Xcode 4.1 Gold Master.

I've read through many threads and can't find anything like my issue here. I think that this is a simple fix, but I just can't seem to find the answer. I'm using Xcode 4.1 Gold Master.

Basically, when I archive my Mac app, it goes through all the normal processes. The build is successful. However, when I submit to the app store, I get the following message back:

Invalid Code Signing Entitlements - Your application bundle's signature contains code 
signing entitlements that are not supported on Mac OS X; this may happen if your Mac OS X 
project was ported from iOS. Please check your Xcode project's code signing entitlements 
configuration, and remove any unneeded entitlements.

Specifically, key "application-identifier" in "My App" is not supported.

My app was not ported from iOS and I have never setup entitlements. After many hours of digging, I found that the code sign phase was generating an .xcent file in this format:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLI开发者_如何转开发C "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>My.App.Identifier</string>
    <key>com.apple.application-identifier</key>
    <string>My.App.Identifier</string>
</dict>
</plist>

The first key is the one causing the problem. When I remove that and force resign the app with the same .xcent file through the command line, then the app goes through.

I've removed and reinstalled xcode to see if that helps...it doesn't.

I know this file creation is tied to the provisioning profile. It seems to be getting the right data, but adding that existing tag. I've checked both the project and build settings and there are no code signing entitlements at all. Any idea how I can get Xcode to stop generating this key? I'm not really fond of doing this every time I want to submit to the app store.


I face the same problem. After reading your message I investigated a little bit.

It looks like during the building process the .xcent file is generated from the file located at /Developer/Platforms/MacOSX.platform/Entitlements.plist (it may also be located in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Entitlements.plist).

I edited this file and replaced "application-identifier" by "com.apple.application-identifier". So now the .xcent file contains only:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.application-identifier</key>
    <string>33R9UFHX3C.com.mycompany.myapp</string>
</dict>
</plist>

However I still face a invalid binary error when I build and upload it.

EDIT: it actually works. (I had another non-related issue)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号