How to convert iphone application to Android using Titanium? - titanium

I have implemented iphone application using Titanium..But I want to convert in to android application.
Is it possible doing small chnges?

There are changes, but not major changes. Here is what i would do in my case?
Understand How iPhone works and Android works. Compare them in terms
of working model and OS Architecture. This will purely give you more idea on how to make an real Android App... else you would end up cloning your iPhone feel to Android again.
List out all the components i have used in iPhone and check out the
similar component available for me to replace. { For instance,
TableView has a delete option for iPhone and not for Android }
I would remove the back button implemented in iPhone and check how i
can move between windows with the Android BackKey.
Styles and Animation i have used in iPhone will not be the same for
Android. I think they don't have full supported ones too.
For example: style:Titanium.UI.iPhone.ActivityIndicatorStyle.BIG,

maybe you experience some performance differences depending on your implementation since the javascript engine is not the same. if so, you maybe need to restructure your app to ensure a performance enhancement.

Related

How to deal with the ios Launch files

It has been a while since I created my last app and I missed the change with the launch file (since titanium 5.2.0).
I want my app to have a custom splashscreen (full screen image). In the past I used the various png files for the splashscreens Default.png, Default#2x.png etc.
I'm testing with the launch file and the custom Storyboard. At the moment it's not clear to me how I can achieve the behavior i want: A full screen image in the splash screen.
What is the best approach?
Thanks for the help.
Go to http://docs.appcelerator.com/platform/latest/#!/guide/Icons_and_Splash_Screens-section-29004897_IconsandSplashScreens-iOSgraphicassetrequirementsandoptions and take a look at the Purpose column. You'll see 9 splash screen sizes. You have to make each of them and put them in app/assets/iphone. Note that you have to name them exactly as told in the table.
This worked for me, Ti-5.4.0 tested on iPhone 7, iPad Air, iPhone 4S and iPhone 6S Plus.
Since version 5.2 storyboards were introduced. You can use them or you can disable it and use the "old" method to implement splashscreens.
To disable it, add this to tiapp: (of course, within the existing ios section in tiapp
<ios>
<enable-launch-screen-storyboard>false</enable-launch-screen-storyboard>
</ios>
To use it, look at the documentation how to implement it correctly.

how to make an ios app adaptive in Xcode 6.1(objective C) using auto layouts or any other simple approach

I am very new to Xcode and so as with auto layouts and i want to make my app which i've created, adaptive in a very easy way. I have seen lots of tutorials on internet but nothing helped me with my app. so i don't know how to make my app adaptive. so i need a help.
I have made an app that generate report in second view controller after providing inputs in first view controller.so i need to see how can i use auto layouts in my respective app to make it adaptive or there any easy way to get the results. i have seen all the videos related to it.
thanks in advance.
The best way is to use Auto Layout and Size Classes. This way your app will work with all iPhone sizes and all iPads. It will also behave correctly in portrait and landscape.
For more details, you will need to read and watch a lot of documentations/WWDC videos.

Display App in 3.5" Resolution on iPhone 5 for Development/Debugging

Does anyone know if there is a way to force an app you're developing to run in a 3.5" screen size mode if you're on an iPhone 5, just for dev/debug purposes? Something such as what might look like a toggle in the Development section of Settings or something. In other words, run the app such that it LOOKS like it's running on a non-5 iPhone (black bars on top/bottom), that way I can test certain UI functions.
For clarification, I'm NOT saying "I don't want to support iPhone 5" - I most certainly do. Also, I'm aware that I can do the 'old' retina display in the simulator, but I do not want to use the iOS Simulator as the app includes libraries that do not support i386 architecture, uses push notifications, and heavily relies on GPS to function correctly. I'm just looking for a way to test both aspect ratios on the same device to save money/time.
Thank you!
It appears that by removing the app from device, deleting the Default-568h#2x.png launch image, cleaning the project, and re-running app, I can get the functionality I'm looking for, although not as nicely as a toggle switch.
Letter box in iPhone5

Managing an iOS app across different platforms

I have an iOS 5.0 app presently and had a few questions regarding deploying the app across multiple platform and multiple OS upgrades. I would like to know if there is a clean and configurable system that allows me to have one project handle deployment to the iPhone iOS5 and iOS6 and the latest iPad iOS without having ugly selection statements everywhere determining the platform the app is being currently run on. So I would like to know if there is a way to manage the code from a dev prespective so i can support all version/platform specific features of my app depending on what platform/version it is being currently run on (for ex. automatically switching to use the longer dimension background images if the app is being run on an iPhone 5 with iOS 6)
Is there any way to have this functionality?
I am slightly confused with your question, but I'll explain what I know. Xcode already has a way to change your app depending on what Device/iOS Version the user is running. If you use storyboards, then it will automatically resize your app content depending on whether the screen has retina support, and the size of the screen. In addition, you can have a storyboard for iPad, so that when you run the app it will use the iPad version. It also will change the app icons. Just go to the project settings and scroll down until your get to the icons and lunch images.
Now, if you mean you want to change how your app works using the source code directly, then there is no easy to way to manage it. Your best bet is to go with Storyboards, as it makes it very easy to resize content depending on what device your using.

Port an iOS App to Mac/Mac Ruby from Obj-C?

I have a native objective c ios application that I would like to convert to run on my Mac. How could I begin such a journey? Is there a way to run a native objective c ios app on a mac without ios simulator? Or some sort of in place framework I can use?
Although your logic code will be fairly portable, there is no quick way to port an app from iOS to OS X. The only way to do this is to create a new app from the Xcode template and move your code accordingly.
Remember, the View paradigm in OS X is completely different than iOS (i.e. UITableView vs. NSTableView). How will you handle user input? Is a series of tableviews the best way or would an NSBrowser work better?
There are many things to consider and at the end of the day you'll need to account for that when creating your new app.
You are going to have to re-implement the GUI in App kit, App Kit uses a lot of the same design patterns as UIKit, delegation, datasources, view controllers, View hierarchy with views having a bounds and a frame, responder chain, Nib files, if you are competent with iOS programming you will pick up Mac OS X very quickly. If your application is structured with good business logic separation from your GUI, you will be able to use all your model classes with little or no modification. Foundation Kit, Core Data and others are on both platforms and they are very similar, it is usually the case that the iOS versions have reduced API and so going other direction, Mac OS X to iOS, can require some work, for example iOS does not have NSXMLDocument classes.