My question is this: I have an application designed for iPhone and I decided to fork the code, in other words, I will develop two versions of the application at this initial phase, one for iPhone and the other for iPad.
My question is this: how do I fork the code? I would like to continue using one project for both versions but, obviously, I will have to write sections of code for the iPhone and other sections exclusively for iPad and will, of course, have many parts in common for both releases.
How do I do that without creating a mess on the code?
What are the best practices? Thanks for any help.
The problem with the multiple targets is that it might conflict with the distribution model.
From what I understand, iPad and iPhone applications will be distributed as a single binary. The application has decide whether to show the iPad or iPod user interface at runtime.
This means that if you do not want to have to separate apps on the store, ‘Foo’ & ‘Foo iPad Edition’, that you cannot use multiple targets and that you somehow will have to work with one code base.
I kind of hate this because there could be a lot of conditional stuff in the app. If iPad then do this, otherwise do that. If iPhone then show this view controller otherwise show the other. I don’t htink this will lead to nice code.
So what I am currently thinking about is to do something in the middle: I will create basically two code bases and somewhere really early in the app I will decide to go a full iPad or iPhone code path.