Unity to Xcode to iPhone build problem

Hello,

I’ve just managed to get my activation to the iPhone Developer Centre sorted out.

I believe I have have done all of the certificates and provisioning correctly - I have managed to build and install the Unity Remote on to my iPhone successfully.

However, when I try to build&Run a project (eg. Saved As: test) from Unity I get the following error:

CFBundleExecutable doesn’t match built bundle at /Users//Desktop/test/build/app.app

  • The error comes from Xcode, at the point where it is ‘…installing app to iPhone…’, last stage of the build)… I did not get this error when installing unity remote, which i guess points the finger at the unity build?

  • I have set the Player Settings (IPhone Bundle Identifier) to the exact same bundle ID as I used in the provisioning [ie. com.digitaldouble.app].

Anyone have any ideas what this error means and how I can resolve it please?

Many thanks!

try changing the bundle identifier product name so in your case just put something like: com.digitaldouble.test

1 Like

Hi imparare, thanks for the suggestion, just tried that now ( downloaded the matching provisioning profile) - I got:

CFBundleExecutable doesn’t match built bundle at /Users//Desktop/test/build/test.app

this is really frustrating because I know I’m so close!

any other thoughts, anyone?
thanks

I have one single provisioning profile which is ‘my name + the word profile’ thats it. The bundle id I use does not in any way match this and I change the product name on the bundle id depending on what I am doing.

I wonder if you are getting confused between the profile and the app-id ?

check the executable file in the Info.plist

Thanks for the help guys, but I’m still very confused.

Please (PLEASE!) can someone walk me through the last few stages of App ID, Provisioning, and building. (I’m tearing my hair out here - must have tried this now over 20 times!)

Here is what I am doing (but clearly it’s not right somewhere):

  1. Unity (iPhone) will not let me build my project unless I have set the player settings in the format of com.[company].[application]. + i need to have a matching provisioning profile set up in xCode.

  2. In order to have a provisioning profile, I must have set up an App ID first. So in AppID (on the iPhone Dev Site) I enter the following:

AppID Name = myapp
AppID (Bundle Seed ID + Bundle Identifier)= com.digitaldouble.myapp

then Submit.

  1. In Provisioning - I hit ‘Add Profile’, and make the following settings:

Profile Name = myprofile
Certificate = ticked
AppID = myapp (from the drop down menu)
Devices = ticked

  1. After Downloading the provisioning Profile, I drop it into Xcode (in the provisioning box of the organiser) then quit xcode.

  2. Finally I create a simple scene in Unity (iPhone). In the player settings, in the iPhone Bundle Identifier field I enter:

com.digitaldouble.myapp

  • then build run. (saving it in a folder called ‘myapp’)
  1. Xcode is launched, resources are copied across, etc - but I get the error message:

Can’t Install application:

CFBundleExecutable doesn’t match built bundle at /Users//Desktop/myapp/myapp/build.myapp.app

  1. If I get ‘info’ on the target (called Unity-iPhone), under the ‘Properties’ Tab I see:

Identifier: com.digitaldouble.${PRODUCT_NAME:identifier}

…and under the ‘Build’ Tab I see that:

‘Code Signing Provisioning Profile’ is set to Any iPhone OS Device = myprofile

… and lower down, under the packaging heading I see:

Product Name = myapp

Info.plist for Unity-iPhone has the following information:

Localization native development = en
Bundle display name = {PRODUCT_NAME} Executable file = {EXECUTABLE_NAME}
.
Bundle identifier = com.digitaldouble.{PRODUCT_NAME:identifier} . Bundle name = {PRODUCT_NAME}
Bundle OS type code = APPL
Bundle creator OS type code = ???
.
.

Please can someone advise me further here… many, many thanks!

Robbie, I can’t identify where you have gone wrong, but here are some ideas:

  1. Play around with the iphone sdk and build install some empty cocoatouch example projects to get the workflow down re: certificates and provisioning profiles
  2. The Unity build system, I think uses scripts and probably does some string parsing , so don’t name your name somethingapp.app (i.e. the string “app” should only appear once in the bundle id). Just a guess.
  3. When creating a new provisioning profile at Apple, give it a unique name. I got into the habit of appending the date like 20081105 just to guarantee a unique name for the proifle. I posted about it in this forum last week: it’s something that has bit me a number of times.

OK hope this helps

Thanks mindlube,

I have done this, exhaustively, and I have no trouble building and installing the Unity Remote application from XCode to iPhone.

For example, I use the following AppID / Provisioning settings:

App IDs:
App ID Name: unityremote
App ID (Bunndle Seed ID + Bundle Identifier): com.digitaldouble.remote

Provisioning:
Profile Name: remote
Certificates: ticked
App ID: unityremote (from the drop down list)
Devices: ticked

(dropping the resulting Provisioning Profile on XCode)

… and I open the Unity Remote Xcode project, ensure that the identifier is set to ‘com.digitaldouble.remote’ (in the Target ‘info’ properties section) and Build and Go.

No trouble at all there - the Unity Remote app appears on my iPhone OK.

However, if straight away I then create a fresh Unity (iPhone) project (leaving all the provisioning in place), and I enter ‘com.digitaldouble.remote’ in the player settings (iPhone Bundle Identifier field) and hit Build and Go in unity - then I get these errors.

RE: your suggestions 2) and 3) - believe me I’ve tried many different name and provisioning profile combinations.

I’m at a complete loss as to what to try next and what is causing this - I’m very frustrated - maybe time to call the Unity Guys direct for some support??


The only other thing I think of is that it is something to do with the ${PRODUCT_NAME} string? … so in the above example, I’m making my own Unity Project build, and am entering ‘com.digitaldouble.remote’ in the player settings, and I’m calling the project remote also.

The resulting Info.plist from the build is as follows:

<?xml version="1.0" encoding="UTF-8"?> CFBundleDevelopmentRegion en CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile Icon.png CFBundleIdentifier com.digitaldouble.${PRODUCT_NAME:identifier} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS

… which does not appear to mention the word ‘remote’ anywhere. Although if I check the Product Name in Xcode it is “remote”.

Where as, on the other hand, the Info.plist from the included Unity Remote project is as follows:

<?xml version="1.0" encoding="UTF-8"?> CFBundleDevelopmentRegion en CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile Icon.png CFBundleIdentifier com.digitaldouble.remote CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS NSMainNibFile MainWindow

… and works for me. (yes I’ve tried to edit the Info.plist on my unity builds, manually including ‘com.digitaldouble.remote’… it gives 31 errors when I do that.

? ? ? ? ?

Are you getting compiler errors? Can you paste the compiler errors you are getting please.

no, the error message I get is the one described in posts 1 and 3 above, and pops up in the organiser after compile linking, when trying to tranfer to iPhone. Compile errors only come if I try to manually edit the Info.plist, which I don’t think I should need to do in anycase.

EDIT! Sorry yes I am getting errors (30 of them, all seem to be audio related?) - didn’t spot that at first as the organiser window was popping up in front, and it looked very much like it was built OK.

Here are the errors:

<><><>

Building target “Unity-iPhone” of project “Unity-iPhone” with configuration “(null)” — (30 errors)
cd /Users/Rob/Desktop/star
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g+±4.0 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk -L/Users/Rob/Desktop/star/build -L/Users/Rob/Desktop/star -L/Users/Rob/Desktop/star/Libraries -F/Users/Rob/Desktop/star/build -filelist /Users/Rob/Desktop/star/build/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/Objects-normal/armv6/remote.LinkFileList -miphoneos-version-min=2.0 -Wl,-dead_strip -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework OpenAL -liconv.2 -liPhone-lib -o /Users/Rob/Desktop/star/build/remote.app/remote
ld warning: in /Library/Frameworks//OpenAL.framework/OpenAL, file is not of required architecture
Undefined symbols:
“_alSpeedOfSound”, referenced from:
AudioManager::AudioManager(ObjectCreationMode)in libiPhone-lib.a(AudioManager.o)
AudioManager::AwakeFromLoad(AwakeFromLoadMode) in libiPhone-.
.
.
.
etc.
Build failed (30 errors)

I think the error “CFBundleExecutable doesn’t match built bundle at /Users//Desktop/test/build/test.app” means that the bundle ID you put into Unity doesn’t match the one in your Info.plist.

…yes, my thoughts too. But as you can see from the above post, which describes exactly what information I entered, and where, they should match. ?

I included the resulting plist too for reference, which uses a string $ for PRODUCT_NAME

?

do the regular test apps build?

Why I ask that: the error could as easily come from a missing second certificate. Because for iphone deploy you as well must have installed the global certificate for iphone devs from apple.

Also ensure that you are on 10.5.3+ Intel Mac with the current XCode if this is not the case (think that one could be forgotten thought)

Nothing built in unity works, not the example projects, not even a simple scene with just one camera and a box. But I must have all the correct certificates in place or I would not have been able to install the unity remote application on my iPhone?

Hi-

Looking at the compile errors you posted this looks like XCode is picking up the wrong OpenAL libraries. I think somebody else reported a problem along these lines as well: http://forum.unity3d.com/viewtopic.php?t=15092&highlight=openal

HTH,

-markus

kusako - THANK YOU!

That’s it:

A rogue OpenAL.Framework (of the wrong architecture in /Library/Frameworks). Probably from Torque?

THANK YOU! - THANK YOU! - THANK YOU!

These forums are a wonderful thing…