手动更改$(AppIdentifierPrefix)属性?

Meg*_*anX 4 keychain uniqueidentifier ios

我在Apple商店上传了应用程序.现在我正在开发更新版本.但是,在处理现有项目时,我创建了具有不同名称的新项目.当我完成后,我更改了名称和包标识符以匹配现有的应用程序.

我尝试上传应用程序以测试航班,但我收到了错误

"Invalid IPA: The keychain-access-group in the embedded.mobileprovision and your binary don't match."
Run Code Online (Sandbox Code Playgroud)

所以我开始浏览网络以获得答案......我所提出的是启用权利.我做了,但无济于事......然后我编辑了权利,改变了这个:

$(AppIdentifierPrefix)com.xxxx
Run Code Online (Sandbox Code Playgroud)

对此:

12HJ2312.com.xxxx (the number is number of prefix from developer portal)
Run Code Online (Sandbox Code Playgroud)

它工作,我可以上传.世界再次变得美好.或者是吗?我仍然不明白为什么我要改变它.从哪里来

$(AppIdentifierPrefix)
Run Code Online (Sandbox Code Playgroud)

是红色的?我认为钥匙串是红色的,但似乎没有,因为钥匙串是我输入的相同值.那么我怎么能看到这个价值,它在哪里画出它的内容呢?

小智 12

应用程序标识符前缀在您使用的配置文件中指定.在finder中找到配置文件.为此,在Xcode中,转到"窗口">"管理器".在管理器中,右键单击配置文件,然后选择"在Finder中显示配置文件".在TextEdit或其他文本编辑器中打开文件,你会看到类似于里面的东西,在中间的某个地方(搜索"Entitlements").

<key>Entitlements</key>
<dict>
    <key>application-identifier</key>
    <string>A1B2C3D4E5.com.example.*</string>
    <key>get-task-allow</key>
    <false/>
    <key>keychain-access-groups</key>
    <array>
        <string>A1B2C3D4E5.*</string>
    </array>
</dict>
Run Code Online (Sandbox Code Playgroud)

在这种情况下,应用程序标识符前缀是A1B2C3D4E5

  • 有点晚了,但在以下答案中可以找到更好的答案:http://stackoverflow.com/a/28714850/774691 (2认同)

小智 5

正如艾哈迈德回答的旁注:

价值${AppIdentifierPrefix}"A1B2C3D4E5."

因此OP的原始问题是

${AppIdentifierPrefix}.com.xxx评估为A1B2C3D4E5..com.xxx,与您的个人资料所说的不符.