Changing XCode project name

In the StarTrooper project, I set the bundle identifier in the Unity Player settings to com.technicat.StarTrooper and couldn’t get past the dreaded “unexpected error” message during the installation phase, until I noticed the XCode project name was Unity-iPhone.

When I changed the bundle identifier in the Unity Player settings to com.technicat.Unity-iPhone, it built and transferred to my iTouch just fine.

So how can I specify a bundle/project name besides Unity-iPhone?

I went into the Developer Portal and made a new App Id called com.chuckt.* and added that to my provisioning profile- then in Unity, in the Player settings, I set the identifier to com.chuckt.NameIWantTheAppToBe

When XCode creates the App, it’s named “NameIWantTheAppToBe”

Good luck!

And don’t forget in the Info.plist to set the bundle display name to something different if you want spaces. This is the only place you can name the app Name I Want The App To Be when it displays on the iPhone/touch home screen. Spaces are generally verboten otherwise.

PS. Also careful with the length of the name displayed. They need to be shortish to be not cut off.

Hmm, I guess there’s something flakey about the project. After discovering that I had it working with com.technicat.Unity-iPhone (my app ID is com.technicat.*, by the way and I had it running with the iPhone SDK demos), I switched it back to com.technicat.StarTrooper in the Player settings, verified it didn’t work, switched back to com.technicat.Unity-iPhone, verified it worked again.

But after I built and ran UnityRemote (as com.technicat.UnityRemote), which was really cool, successfully used it to control StarTrooper running in the Unity editor, I haven’t been able to install StarTrooper at all, with either bundle ID!

I guess I’ll convert another project over and see how that goes. Thanks for the feedback, good to know the project naming works as expected for most of you!

Maybe I ran into a case-sensitivity issue. After it stopped working with com.technicat.Unity-iPhone, I switched it back to com.technicat.StarTrooper, didn’t work. But then I renamed it to com.technicat.Startrooper, and it worked.

Or maybe there’s just else messed up and I have to keep renaming it. But all my other projects work OK, so I’ll just leave this one alone!

UPDATE: Today’s lesson is question the “unquestionable”. I’m leaving my post below in case someone searches and finds this remotely useful. The short of it is, if your device (iPhone, iPod Touch) has been working and all of sudden Xcode complains you don’t have a provisioned device connected, go into Xcode Organizer, and check if there is a little yellow dot next to your device… i.e. something bad has happened. If so, reset your device by holding down the power button to power cycle your device. For me, this happened once before but I didn’t think to do it before writing the post below… anyways, this has cleared up my problem and maybe it will for you as well.

[original post below]

I’ve been having similar problems and it doesn’t make sense.

This morning I was building and testing the Unity iPhone Match project on my iPod Touch and everything built and was running fine. I have a com.trisosceles.* wildcard provisional profile properly installed and have been building and installing test apps on my device correctly up until about lunch time today. I switched over to another Unity iPhone project I’m working on and was playing with the PostprocessBuildPlayer script here (http://forum.unity3d.com/viewtopic.php?t=17373) and then all of the sudden I couldn’t install my app or any of the Unity test apps on my device any more. The build targets (and Xcode project name) for all the Unity-built projects are now “Unity-iPhone”, and from what I can tell, that hyphen doesn’t fly with Xcode.

The exact error I get is “No provisioned iPhone OS device is connected.” But I know this is blatantly untrue, because my provisional profile did not change between breakfast and lunch today, and it was working for weeks up until today!

…at this point something clicked in my brain and I now just wrote the “update” at the top.