Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TrentS

macrumors 6502
Original poster
Sep 24, 2011
491
238
Overland Park, Kansas
I have created an iPad app in Xcode, and now want to make a new target inside the app for an iPhone version. When I name the new target, should I put "iPhone" on the end of the name, so I can distinguish this new target from the old target, or can you not put "iPhone", "iPad" into the new targets name?

If Apple doesn't allow this, then how do you distinguish the new target from the old target?
 
Why would you make two targets? If it's the same app then there's no reason to, you can make a universal app that works with both. It is possible to have two storyboards, one for iOS and one for iPad if you like.

Having two targets for iPad/iPhone would be a real mess.
 
I didn't use storyboards to make the app, it's all done in code. In my case, how can I make an iPhone version within the same iPad project, isn't that what multiple targets are for?
 
That's pretty old school ;)

How are you drawing to the display? Perhaps you could call
[[UIDevice currentDevice] platformString] and then perform different logic based on whether the resulting string begins with 'iPhone' or 'iPad'.
 
The recommended way to do this is with a Universal app that runs on both platforms. As of iOS 8 Apple is recommending that developers write Adaptive Interfaces that change based on size classes and not on the interface idiom (iPad vs iPhone). This will build an app that runs on devices like iPhone 6+ and future devices that may not fit into the iPhone/iPad sizes in simple ways.

While it's possible to do this in code doing it with a storyboard makes much more sense.
 
  • Like
Reactions: dejo
Thinking out loud I'd think you'd have to create two App IDs and distribution profiles for each of those and associate the profiles with the appropriate target. Also each target needs its Bundle Identifier set to match the app id.

The only good reason I can think of to create unique iPhone and iPad versions is for revenue. You gain in those cases where customers want you app on both types of devices.

Being unique apps I would think could limit data sharing, at least when using the Apple sharing techniques.
 
You can name the targets anything you want: "Target 1" and "Target 2" will work The app supported device(s), product name, bundle ID, and text under the icon can all be set separately.

I've put well over a half dozen different Targets inside a single Xcode Project (iPhone-only, iPad-only, Universal, Free-Lite, Paid, Pro, just-for-testing-using-private-APIs, etc.) that share mostly the same code. Not all get submitted of course, after market analysis.

I do some iPad-only versions of apps because I've found that one can set the price higher for iPad apps and still get similar downloads, thus higher total revenue, without decreasing iPhone downloads.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.