csaunders
csaunders

Reputation: 1742

Using single Info.plist to build separate iPhone and iPad apps

I need to build a separate iPhone and iPad app with different identifiers and am curious to know if it's possible to have my info.plist contain both required entries in it so I don't have to remember to change things when executing a build.

I know you can do this for various resources and mappings on iOS such as:
<key>ApplicationName</key>
<string>My iPhone App</string>
<key>ApplicationName~ipad</key>
<string>My iPad App</string>

Would it be possible to have this work for different bundle names too, or will I need to have a separate plist file and build target entirely?

Upvotes: 0

Views: 927

Answers (3)

Richard
Richard

Reputation: 3386

I recommend using different Info.plist files.
However, you should be able to accomplish your stated goal with info.plist preprocessing.

Upvotes: 0

TomSwift
TomSwift

Reputation: 39512

You can have multiple targets and a single info.plist. You can change the bundle name (and many other parameters) in the plist by setting their values via parameters set in each target's build settings.

Upvotes: 0

Rog
Rog

Reputation: 17170

If you want to have different bundle names then yes, you need two info.plist files and hence you will need two targets.

Why are you worried about changing the info.plist file so much? It should be relatively static once your project is under way.

Upvotes: 1

Related Questions