High Level Appcelerator Question
I'm trying to figure out if I'm properly understanding how Appcelerator works. Using the appcelerator API if I develop an application on Windows for Android what will I need to do to make it work on iPhone? Just move the source to a MAC and recompile?
4 Answers
-
Accepted Answer
As Chris said, you'll need a mac. So you're right, you'll need to move/copy your code to the mac and recompile. Ultimately, though, the process is fairly complex.
I've found lots of little differences in the way my app runs on android & iOS. For example, omitting height/width values for a view on android implies an '100%' value so the view will fill the screen. On iPhone, the missing values are interpreted as '0' values, so the view is invisible.
You'll need to deal with device & UI convention differences. For example, iPhones don't have a back button. So, your UI needs to include one–and to get approved by Apple, your app is going to need to follow Apple's UI guidelines for navigation bars, button placements, etc. On Android, you'll have to add event listeners for the back button so that your app closes, or doesn't close, as you intend when users tap that button.
There are the operational differences caused by Apple's tight control over distribution. You can just plug in your android phone and install your app. You can even email someone the apk file to have them test your app. You'll need to register (and pay) with Apple to get a developer certificate. Then, you'll need to register each iPhone with them in order to test your app on a real device. IMO, the Apple process is unnecessarily cumbersome. But, you have no choice but to deal with it.
My first app has been out for over a month for android. I'm still struggling to get it to work the same on iOS. I tried for a long time to maintain a single code base with if/then statements. Over time, the code got so complex and slow that I created separate versions.
I've learned a lot. In fact, I should probably just scrap my entire code and start over. My second app will be cleaner, code-wise. YMMV
-
Hi Frank,
In order to build your app for iP|hone you'll need the iPhone SDK. This only exists for OSX (Mac).
The code you write sits in a 'resources' directory.
When Titanium Developer installs it checks for the presence of the Android and iPhone SDKs. So to port to iPhone you'd need a Mac OS (a VM 'may' work) with the iPhone SDK installed and create a 'blank' mobile project there in Titanium Developer.
You can then paste the resources folder across.
Hope that helps a bit.
Cheers,
Chris. -
How do you install the iPhone SDK on windows?
-
No, you don't need to move the source to MAC. You can compile for iphone on windows also. However, you would then need to create a new project for iphone, copy all the files there and change the code which will utilise the iphone sdk.