I would like to ask which is the best strategy for creating an application that will be developed both on Mac and iPad, so to make minumum effort to port it from one platform to the other, starting from iPad, for example, but rather trying to make both at the same time. The application, in fact, would be an iPad-style one on the Mac too. How should I have to plan the project? Which are the main tricks to easily get the goal?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You'll have to recode the UI no matter what. The OS X UI is different enough to the iOS UI to mean that any lesser attempt at porting the UI direct (such as the one mentioned by Chiron) is going to result in a less than perfect compromise.
So, given that you need to redesign your UI, you need to separate the functionality from the UI as much as possible. This is somewhat encouraged in MVC anyway. However, one way to enforce this is to physically separate the model (the M part) by compiling it as a static library on iOS and a framework on Mac OS X. Careful design of the controllers (the C part) using maybe protocols or delegates might allow you to reuse some code there too.
Anyway, the one thing you should never do (this applies to any app on any platform) is compromise the UI in the name of portability.
I can't really answer your question but I may suggest a new route.
Have a look at Chameleon Project:
It is used to develop Twitterrific.