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
1.1k views
in Technique[技术] by (71.8m points)

ios8 - Xcode 6 error: "Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier."

I'm trying to build an extension project and Xcode keeps throwing the error in subject.

Xcode log error

Needless to day, the extension's bundle id is prefixed with app's bundle id.

Product Name: ro.chitza.TodayPics.$(TARGET_NAME:rfc1034identifier

Extension bundle id

I've tried cleaning the build folder and rebuilding, no luck. The funny thing is the entire project got built for a few times, but after some code and UI changes it started failing. Even if I create new projects, the same thing happens after about 5-6 builds.

Did anyone else encounter this error? Any hints for a solution or workaround?

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

It looks like the bundle ID behavior changed when WatchOS 2 arrived.

Previously I had an extension bundle identifier like this:

com.mycompany.myappname.watchkitextension

Somewhere else on Stackoverflow it was mentioned that the extension bundle identifier should be in this format, but no matter what I tried Xcode kept throwing errors at me.

The only possible solution is changing the extension bundle identifier to:

com.mycompany.myappname.watchkitapp.watchkitextension

I am pretty sure this wasn't the case with an WatchOS 1 app. A problem because of this change is that you can't actually generate an app id for the bundle identifier com.mycompany.myappname.watchkitextension. This isn't necessary, just set all provisioning profiles in the build settings to automatic and don't forget to use the right code signing certificate for you release/ad-hoc/debug schemes.

I actually found out that this approach works because Xcode suggested fixing the problem and this is what it did.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
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

...