I currently have an iphone app that I want to make an ipad version of. I don't want it to be "universal" though. I want to sell the ipad version for a different price than the iphone version.
My question - what is the best way to go about this in Xcode? Do I just copy the project and then maintain two separate projects, and do the ipad build from the new project? Seems this is the only way to go, but will be a pain to make updates to both. Suggestions? Advice? Thanks.
In almost the same way that you would make an app universal, you can make a separate iPad version. Disclaimer: I haven't actually done this before, I went the universal route. Now what you need to do is first right click on your target and click "Upgrade Current Target for iPad..." Then click "Two device-specific applications" and "OK." Good luck.
I went through something similar with my apps. I had a working iPhone version of an app that I wanted to port to the iPad. I created an iPad-specific project and added the share-able code to this. Fortunately for me, I had a pretty clean separation of the data and UI code and was able to share most of the data code; in the new iPad project, the only thing I had to write new code for was the UI stuff.
I'm totally open to changing the way I handle this separation. In theory, it would seem that you could specify different bundle identifiers and turn on/off settings to enable iPad or iPhone versions. But I had decided that it'd just be simpler to separate out my iPad/iPhone projects.
Hope this helps!
Instead of using two projects, add an iPad app target to your iPhone project. This way, whenever you change shared code, it is updated for both apps.
Related
I started developing a universal app because I was told to do that way as a requirement, but now I'm being asked about the possibility of switching to separate iPhone and iPad versions and I need to give an idea of the effort that making this change will have.
I've been looking for posts dealing with this issue but what I found mostly dealt with moving from separate to universal, not in reverse, so I need somebody who had to do the same to help me to make clear some questions I have:
1) Having a project target set to universal, if I simply set it to iPhone or iPad, does the build ignore all the resources the app won't need (~iPad resources if set to iPhone, and viceversa), or it will include them in the build anyway? Is it needed to remove the unnecessary resources from the target's build phases section?
2) So, should I create two more targets in addition to the universal one, or is it enough to change the device in my current target to the one I need, iPhone or iPad, and just build it?
Thanks in advance
I wrote an iPhone app. Then, I changed the interface a fair bit, added higher res images, and made an iPad version of it. In a perfect world, I would like for anyone who buys the iPad version to get the iPhone version for free (though not conversely). Since Apple doesn't seem to have a way to do that (right??), my next favorite solution is to make the iPad version include the iPhone version somehow.
I know that I could just convert the iPad version to "universal", but since the face of the app is so different, that seems like a real pain. I have many view controllers and they are almost completely different between the two versions. Some of the methods are the same, but only about 30%. Is there an easy solution along the lines of this:
Check if device is iPhone or iPad
If iPhone, then use one group of files
If iPad, then use a different group of files
Thanks in advance!
Try creating a new project in Xcode and choose to make it a universal app. In the default way Xcode lays it out, there is a distinct divide between the iPad and iPhone versions. You can make the two versions of the app as similar or different as you want.
In addition, you can check which device you are running on at runtime by using UI_USER_INTERFACE_IDIOM(). Currently the two values for this are UIUserInterfaceIdiomPad and UIUserInterfaceIdiomPhone.
The "easy solution" you describe is basically how iOS loads Universal apps.
There's no other real way around it. You'll have to merge your two projects into one again to do what you want.
The first problem will be that some (many?) names of classes will be common between both projects. You can save yourself some pain by using the "Refactor..." functionality in Xcode to change the names of the classes in one project (say, your iPhone app, since it's older) before you merge them together. The second problem will be your Info.plist; you'll need to ensure that the correct "Main nib file base name", the correct supported interface orientations, icon files, and so on are set to correct values for both iPad and iPhone respectively.
Please bear with me, this isn't a programming question per se but a question about releasing for the App Store.
I have an App on the store that is a universal binary, with a separate UI for the iPad. I've been creating some new features and working exclusively in the iPhone version. I've been rethinking my iPad UI because I feel like it's kind of poor and could be more well done. I'd like to branch off and create a specialized iPad only version and abandon the iPad code in the current universal binary, and instead just target the individual platforms instead of both.
The reasons are as follows:
I want to be able to do a release with new features without having to commit to working them all in on the iPad version of the universal binary.
I want to distinguish the iPad version from the iPhone version.
First, I want to know if this is even possible. Second, I want to know what kind of fallout is possible from something like this. I remember two years ago when Tweetie 2 was a new bundle and the general public mostly whined about having to pay again. My app is much smaller than Tweetie 2 and I don't have a ton of users. In fact, I don't use any analytics to discover daily use, feature use, or anything.
Have any of you ever done something like this?
Thanks for your time, and please don't flag.
That would really suck for iPad-only users who bought your program.
What you could do is leave the existing app out there as version 1. Don't upgrade it.
Release version 2 in separate iPhone and iPad flavours. No existing customer gets left out. You get to split your releases. If your app is truly good then people will pay again for the upgraded version.
I have an iPhone app that I would like to port over to the iPad, but I would like to have as little duplication as possible.
How do people usually go about doing this?
In xcode can you have different targets for iPhone and iPad and perhaps do some pre-processor checks? Or is it best to simply have two separate projects altogether?
Note, Im NOT talking about running the iPhone app on the iPad, I mean creating a native 3.2 app...
EDIT
So it looks like creating a universal application is the way to go:
http://developer.apple.com/iphone/library/documentation/General/Conceptual/iPadProgrammingGuide/StartingYourProject/StartingYourProject.html#//apple_ref/doc/uid/TP40009370-CH9-SW8
But what I still dont understand is how to select different NIB files based on your current deployment???
Thanks a lot
For minimal duplication, you can use one project, with 2 sets of .nib files, but one set of source code files which include run-time checks for the UIUserInterfaceIdiom differences.
If you want two (or more) apps instead of a Universal app, just create two targets containing only the appropriate .nib files, and #ifdef the run-time check results using a Preprocessor Macro define in each target's Build Settings to force iPhone or iPad idiom only.
The latest (3.2.3) Xcode auto-generates a Universal project which is a great starting point to see how to target iPad and iPhone in one Xcode project.
File > New Project > Window-based Application > Product : Universal
I started building a Universal app and it turned out the design doesn't work well with the iPad, so I've decided to make it a stand-alone iPhone app instead. By that, I mean I'd like the app store to see my app as an iPhone app, not a Universal app. I was just about to create a new project and move my existing iPhone code over to it and it's a ton of work because I had existing Core Data stores and other files that require some labor.
Is that the route I should take or is it easy to convert my existing Universal app to a stand alone iPhone app? If it's easier to convert it, what do I need to do?
I was exploring the Build settings of my project (I don't know what most of them mean), but I see the "Targeted Device Family" setting. Am I fortunate enough that I could simply set this to "iPhone" and that's the end of it?
Thanks in advance for your help! I'm going to continue looking into this now...
UPDATE: I found that all I needed to do was set the "Targeted Device Family" build setting to "iPhone". Seems to be working fine so far.
I believe that ends up setting the UIDeviceFamily key in Info.plist, which should be what the App Store looks at. You might still have a bunch of iPad resources floating around, but I wouldn't worry too much about that.