After I finished an iPhone project, I decided to create a similar project based on that one. So, I copied the previous project directory to an new directory and build it. Everything goes fine, the new project was correctly signed and installed on the machine, the icon and Default.png was correctly displayed. But, only one thing was out of my expectation.
I installed the debug version of the previous project on the simulator and want to compare the look and feel, but after I install the new project, which was derived from the old project, on the iPhone simulator, shit happened! The old project was disappeared! Only the new project was there. I checked the project setting over and over again and got no clue completely. This drove me mad! Was it because I did not rename the project? I simply copied to a new directly, without changing the project name. Nope, it wasn’t. Was it because I set the wrong Product Name? Nope, it was not. What made the iPhone thinks this 2 apps were the same?
After I googled and tried a lot, just before I want to give up, I suddenly saw a key in info.plist file. the key is “Bundle Identifier“. Oh My GOD! It should be the reason! My instinct told me! I added some suffix to the identifier to make it unique, then try again on the simulator, it WORKED! It’s the reason!
Yes, iPhone Programming Guide told us every project need an unique identifier, thus Apple recommend us use the Java Package Style to identifier each app. But if you are copying project from here to there, you might miss this because without modify it, the app also worked fine. Dude….
I hope this would help you if you are facing similar problem as me.




