代码之家  ›  专栏  ›  技术社区  ›  TinkerTank

验证应用程序商店分发的代码签名时出现奇怪的错误

  •  1
  • TinkerTank  · 技术社区  · 15 年前

    在生成要分发到应用程序商店的应用程序时,我收到以下警告:

    warning: Application failed codesign verification.  The signature was invalid, or it was not signed with an Apple submission certificate. (-19011)  
    Executable=/Users/tijszwinkels/Dropbox/Documents/projects/iphone/BatteryLogger Pro/build/App-store distribution-iphoneos/BatteryLogger Pro.app/BatteryLogger Pro
    codesign_wrapper-0.7.10: using Apple CA for profile evaluation    
    Illegal entitlement key/value pair: keychain-access-groups, <CFArray 0x104270 [0xa0376ee0]>{type = mutable-small, count = 1, values = (
        0 : <CFString 0x104170 [0xa0376ee0]>{contents = "eu.TinkerTank.BatteryLoggerPro"}
    )}
    Illegal entitlement key/value pair: application-identifier, eu.TinkerTank.BatteryLoggerPro
     - (null)
    

    提交时,我收到相同的“应用程序失败代码签名验证”错误。

    这是一个据说出错的文件:

    <?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>application-identifier</key>
        <string>eu.TinkerTank.BatteryLoggerPro</string>
        <key>keychain-access-groups</key>
        <array>
            <string>eu.TinkerTank.BatteryLoggerPro</string>
        </array>
    </dict>
    </plist>
    

    但是,我没有配置任何“manual”权限.plist文件。因此,此文件自动从以下位置生成:Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk/Entitlements.plist

    <?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>application-identifier</key>
        <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
        <key>keychain-access-groups</key>
        <array>
            <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
        </array>
    </dict>
    </plist>
    

    有什么问题吗?

    2 回复  |  直到 15 年前
        1
  •  1
  •   Maciej Swic    13 年前

    在我看来 密钥链访问组 是错误的。很容易错过,Filemerge不得不把它交给我。

    不正确:

    <key>keychain-access-groups</key>
    <array>
        <string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
    </array>
    

    对的:

    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
    </array>
    

    完整正确的文件:

    <?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.developer.ubiquity-container-identifiers</key>
        <array>
                <string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
        </array>
        <key>com.apple.developer.ubiquity-kvstore-identifier</key>
        <string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
        <key>keychain-access-groups</key>
        <array>
            <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
        </array>
    </dict>
    </plist>
    
        2
  •  0
  •   Brock Adams    14 年前

    一个朋友(谢谢马蒂金!)发现此文件通常包含bundle seed id(App id前缀)。

    手动创建 Entitlements.plist 而填写VAR允许我提交。

    这是我的 权利.plist :

    <?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>application-identifier</key>
        <string>78Z2PTX5KR.eu.TinkerTank.BatteryLoggerPro</string>
        <key>keychain-access-groups</key>
        <array>
            <string>78Z2PTX5KR.eu.TinkerTank.BatteryLoggerPro</string>
        </array>
    </dict>
    </plist>
    

    其中'78Z2PTX5KR'是捆绑包种子id,并且 eu.TinkerTank.BatteryLoggerPro 是捆绑包标识符。

    这确实解决了我的问题,但是 $(AppIdentifierPrefix) 应该是自动解决的。我做错什么了?