On Apr 7, 2011, at 4:49 PM, Quincey Morris wrote:
On Apr 7, 2011, at 14:16, Logan Cautrell wrote:
I'm having some problems getting targets to work my way. In v3, it was simple to setup targets and point them at your own info plist files in arbitrary location. When I try to do this in Xcode 4, it insists on creating a new directory in the project to put all the target "stuff". When it try to change the plist file to a different location, the UI stops working and in most cases crashes.
Is Xcode 4 forcing targets to use a certain project layout now?
No, it works just like before -- functionally. (If Xcode itself crashes, then that's a bug and you should submit a bug report then go stand in line. :) ) However, the info.plist location in the new project template may well be different between 3 & 4. I can't say I noticed, because I always move it anyway.
One usability difference in Xcode 4 is that if the build setting pointing to the info.plist file is wrong -- which has nothing to do whether the info.plist file is the project's file list or not -- the Info tab of the build settings editor does not appear, either at the project level or the target level. The first time that happened it took me a while to figure out what was missing, let alone why.
Ok so here is what happens to me.
First I open my iOS project, then double click on the project file to open Project and Target settings in a new window. Add New Target -> iOS -> Application -> Window-based. I enter Product Name, select iPad for a device family, and finish. Now Xcode does some magic.
Part of this magic includes creating a new folder in the project root directory. Xcode 3 did not have this behavior, it would simply creating an info plist in the root project directory, aside from whatever gets added to the .pbxproj. This is the point where I run into problems. I don't want the directory or layout. Xcode 4 creates an app delegate, main.m, pch, en.lproj and info.plist. The only thing useful is the info.plist, all of those other files are completely useless for the new target.
I first open the Target settings -> Build Settings -> Packaging -> Info.plist File. I change it from Test/Test-Info.plist to InfoPlists/Test-Info.plist. In the Finder, I move the Test-Info.plist from Test into my InfoPlists directory. At this point Xcode is now in an invalid state, clicking on Summary shows empty fields that don't hold values for Identifier, Version, etc. Clicking back on Build Settings crashes.
This time after relaunch, Xcode seems to have figured things out. Maybe I was misspelling stuff the other time.
I'm still having massive problems with Templates not showing up. Time for dev forums and google.
-logan