John Franklin
John Franklin

Reputation: 4912

How do I get Xcode to treat an Info.plist as an iPhone/iPad Info.plist?

I have two cocoa-touch apps in one Xcode project. Xcode gives me iPhone/iPad related options for keys in the first's Info.plist, such as "Launch Image (iPad)". But, Xcode gives me Mac OS X options for keys for the second, such as "Java classpaths" and "Quick Look preview height."

Here's how the project was built:

I created the new project as a Universal Window-based Application using Xcode, which came with a default Info.plist that translates raw plist keys like UIPrerenderedIcon to more human readable values like "Icon already includes gloss effects." All good.

In the same Xcode Project, I added a second target, also a Cocoa-Touch application, and built it from scratch, including the Info.plist file.

I've opened up the "Active Target" project settings for both apps and have exactly one "Setting Defined at This Level": Product Name. At the higher "Project Settings" level, no Product Name is defined and the Info.plist File is defined as ${EXECUTABLE_NAME}/${EXECUTABLE_NAME}-Info.plist. (Other settings, like Prefix Header, are similarly defined with variable substitution.)

Both apps build, run and use their respective Info.plist files appropriately, but Xcode still tries to give me Mac OS X Info.plist values when editing the second app's Info.plist.

How can I tell Xcode that the plist should be an iPad/iPhone Info.plist, not a Mac OS X Info.plist?

Upvotes: 1

Views: 2439

Answers (3)

Zoltán
Zoltán

Reputation: 1450

for Xcode 5 there's no View -> Property List Type so the solution is to open the file, right click anywhere in it and right under Show Raw Keys/Values you'll find the Property List Type menu.

Happy coding, Z.

Upvotes: 1

Dave Lee
Dave Lee

Reputation: 6489

Try this: select/open the Info.plist in question, and then from the menu, do

View > Property List Type > iPhone Info.plist

Upvotes: 3

W Dyson
W Dyson

Reputation: 4634

I'm also curious about this. I ran into the same thing while upgrading an iPhone project for iPad, and after days of trying to figure it out, I just made a new project and reimported the custom classes. I upgraded the target and this time the keys were still for iOS.

My best guess is this is an XCode bug.

Upvotes: 0

Related Questions