Create one application for iOS, Android, Windows using QT. Possible?

m-jeri

A Nobody.
Skilled
Hi.

So I am free for couple of weeks in my office before my next assignment And lately few of my friends are moving to mobile applications. So I though to see how or what has to be done to develop an app.

My plan is to create a simple application. Just a dialog with a button, which when clicked will pop up a message box saying hello. I am a pure middle ware guy in windows and bit of linux mixed in. So iOS and android are all new for me. Also want the BL or Business logic to be same. and just the UI or GL to be different in these platforms. Dont think the same UI will run everywhere. So basically like a DLL or something in back should stay same acros the platform so that if i want to change just update the DLL once and replace evverywhere. Also, no idea how to simulate this. I read there is a virtual device sim in Android SDK. No clue in iOS.

From what i read, QT 5.1 seems to be a good bet. So can it be done. Any pointers or help will be appreciated.
I dont want spoon feeding. Just some idea so that i can learn and do it on my own. I want the concept to sink in.

Any help appreciated.

Thanks.
m-J
 
AFAIK, you can't use same Business Logic over all three platforms. What these frameworks do, is they have set of specific codes that are applicable to different platforms and only these codes you need to change in the project. I used PhoneGap and quite frankly it sucked. Now we are sticking to native android/iOS development. If you have no concern for performance, go woth QT/Phone gap.

BTW, if you are using frameworks, according to my understanding, this is how it works(PhoneGap).

1.You design UI using HTML/whatever the FW prefer.
2. Write BL in Javascript/whatever FW prefer.
3. Change particular line of codes before exporting it to executable for various platforms.

So, there is no way you can 100% share BL over all platforms.
 
Well. I think i have conveyed my idea bit wrong.

Lets ignore the BL part for now. coz as u said the sharing across will be tough. Coz i want to setup the UI properly first. And I am not talking about web apps here. but native.

I just want a dlg and a button in it in QT. I will build and all in windows and run it fine. Now i want the same to be done for android and iOS.
As far as i read, andorid can be done with certain changes, need to know some info there(Button Message map, events etc). But with iOS I am clueless. I am reading up about how to get these projects to build and all in XCode and all. And on top of it. Not even sure that UI will run in iOS. Coz I just now encountered something call Cocoa and Cocoa Touch. So I am guessing all the event handling will be different.

I assume you guys are more clear about what i am planning to do.

Also i read, in Java this is possible. But i am a C++ guy basically. So i want this to be done in C++..or most C#
 
AFAIK you can't. Android Apps needs to made in Java, IOS Apps needs to made in Objective C.

So there's no way you can port your C++/QT/C# code there.

Now as @rajkumar_pb mentioned about phonegap above, which is for Webapps, generally, there's Xamarin which is for native apps. I have tried it it's good. There you can write C# code for Windows, Mac, Android and IOS. Again this is a Framework or you can say a C# Wrapper which ports the code automatically.

But again as he mentioned already this is depending on framework and you can't be 100% sure that everything will work unless you code it and test it.

You can look more about Xamarin @ http://xamarin.com/
 
But again as he mentioned already this is depending on framework and you can't be 100% sure that everything will work unless you code it and test it.

Are you saying that QT framework i should test it out??

Can you please point to me some articles about these . if possible.

AFAIK you can't. Android Apps needs to made in Java, IOS Apps needs to made in Objective C.
[DOUBLEPOST=1377671966][/DOUBLEPOST]But also you mentioned about Xamarin. I cant use that to do what i want?? same UI across the platforms?? but then again my questions regarding how the message and events will be handled..and OS dependency will come.[DOUBLEPOST=1377672246][/DOUBLEPOST]
Android Apps needs to made in Java, IOS Apps needs to made in Objective

Also regarding this. I am talking to a colleague of mine also about this. He developed an app which runs in windows, android and iOS. of course the layout and all were bit different. but the logic worked he said. I even saw this today. but all in Java :(. Again he has no clue regarding C++ stuff.
 
Last edited:
Can you tell me why PhoneGap sucked ? and also you have any comparisons b/w Qt & PhoneGap ?

Well, first all your business logic is in Javascript, which sucks and this code need to be converted to native code, in order to run in different platforms., which is huge time taking process. I tested a simple login to DB application performance, and trust it was big shock for me.

Phone gap took 2.5 secs to login, whereas native took less than a second to load. Both tested at same device.

@m-jeri
Take a sample QT Application, test it across different platforms using emulator and see for yourself. Also, don't bother about UI part, as UI will be same across all platforms if you use, jQuery mobile, senga touch kinda frameworks.

First develop a sample with frameworks-native UI design and see if you can handle that framework, and it suits your need or not.
 
Are you saying that QT framework i should test it out??

lol no, that's not what I meant. I meant Xamarin. QT is much powerfull and base of KDE, so no one will dare to doubt on Qt.

Can you please point to me some articles about these . if possible.

Just write a simple app as you said in Xamarin under C#, test it on as many device as possible. Try to write basic camera, web, gps etc accessing app and test it if you need those features in future.

[DOUBLEPOST=1377671966][/DOUBLEPOST]But also you mentioned about Xamarin. I cant use that to do what i want?? same UI across the platforms?? but then again my questions regarding how the message and events will be handled..and OS dependency will come.[DOUBLEPOST=1377672246][/DOUBLEPOST]

Yes Xamarin will work. But I'm not 100% sure that all the features of native code will work perfectly or not.

Also regarding this. I am talking to a colleague of mine also about this. He developed an app which runs in windows, android and iOS. of course the layout and all were bit different. but the logic worked he said. I even saw this today. but all in Java :(. Again he has no clue regarding C++ stuff.

Yeah as JVM / JRE exists on all platforms, programs written in Java works fine without any change or some minor changes rarely. But this is not the case in case of others, with Python and all it's fine. But with C# it tough. I'm aware of Mono and all, but again as it's not officially supported peoples have 1000's of questions.

Anyway I'd say write some basic programs in Xamarin and test it out on as many devices as possible.
 
Last edited:
No way..!! You need iPhone or Mac :p[DOUBLEPOST=1377677388][/DOUBLEPOST]Check out the FAQ's http://xamarin.com/faq[DOUBLEPOST=1377677589][/DOUBLEPOST]And, I forgot to mention that for iOS app, you need $100 Licence I guess. My knowledge in this area is shady. So please confirm once.

I know Android charge $25 or something too, but that's for publishing the app, IOS charge for that SDK I guess. You need to have that SDK installed in your MAC in order to get it going.
 
Last edited:
Nooo... This is just a personal exercise. No publishing or anything. Just to get some idea.

I work in medical field. So many software now have this "mobile" "application" side. They are handled by application developers. And so many people i know are now in mobile.
I just wanted to have an idea. what all goes in this area. So picked this task for me.

One single application on 3 platforms.[DOUBLEPOST=1377678568][/DOUBLEPOST]And yea.. I may get a Mac in our test area. So thats ok. I guess. :)
 
Read this SOF Thread for clear explanation : Link

Once you pay 99$, you can publish any app, for 1 year. I don't know whether the same is applicable for free apps.

Now i can see, why there are lot of free versions available in android compared to iOS.
 
Regarding iOS, not just to publish, even if you want to test on iPhone you need to have developer account.
 
Back
Top