Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
839 views
in Technique[技术] by (71.8m points)

ios - Changing manually $(AppIdentifierPrefix) property?

I had application uploaded on apple store. Now I am developing update version. But instead on working on existing project, i created new project with different name. When i finished i changed name and bundle identifier to match existing app.

I tried uploading app to test flight but i got error

"Invalid IPA: The keychain-access-group in the embedded.mobileprovision and your binary don't match."

So I started browsing net for answers... What I have come up is to enable entitlements. I did, but to no avail... Then i edited entitlements, changing from this:

$(AppIdentifierPrefix)com.xxxx

to this:

12HJ2312.com.xxxx (the number is number of prefix from developer portal)

And it worked, i could upload. And the world was fine once again. Or was it? I still don't understand why I had to change this. From where is

$(AppIdentifierPrefix)

is red? I thought is is red from keychain, but it seems not, because in keychain is the same value I entered. So how can i see this value, and where does it draw its contents?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The app identifier prefix is specified in the provisioning profile you are using. Locate the provisioning profile in finder. To do that, in Xcode, go to Window>Organizer. In organizer, right click on the provisioning profile and select 'Reveal Profile in Finder'). Open the file in TextEdit or some other text editor and you will see something similar to this inside , somewhere in the middle (search for "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>

The app identifier prefix in this case is A1B2C3D4E5


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...