I need to create an app for WP8, Android and iPhone that uses the Azure Mobile Service. I am really impressed by the MvvmCross project so I really want to use it.
Before starting I have some questions:
Can I add the AMS SDK to the .Core project and will it work for all platforms?
Is the a easy way to handle the login views for the authentication providers on the different platforms?
I am a little bit confused by the profiles, which one should I use?
I would really appreciate if anyone can answer my questions,
Michi
Can I add the AMS SDK to the .Core project and will it work for all platforms?
The Core project is a Portable Class Library.
If you want to use Azure Mobile Service SDK in it, it means you need to add it as a reference to the Core PCL, which means the AMS SDK needs to be a PCL also.
Further more, if you need it for all platforms (Windows Store, Phone, iOS, Android) this means the AMS PCL needs to have an implementation which works on all these platforms.
Looking to https://github.com/WindowsAzure/azure-mobile-services, it looks like the PCL is ony for Windows 8 and Windows Phone 8.
There is however a Xamarin component for Azure Mobile Services, but it's not a PCL (if you download it and check it, there's a separate DLL for Android and iOS):
http://components.xamarin.com/view/azure-mobile-services/
http://www.windowsazure.com/en-us/documentation/articles/partner-xamarin-mobile-services-ios-get-started/
If you want to have a portable functionality in the Core to be used by the view-models, what you can do is define an service interface like IMyAMSClientService in the Core and have it implemented on each platform (you implement MyAMSClientService on each platform, in the app project). You will need to think about a mechanism to handle the AMS functionality in an unified way.
Is the a easy way to handle the login views for the authentication
providers on the different platforms?
Like I said above, you can have something like an IMyAMSClientService in the Core. The actual implementation of it will be on each platform and it will do the calls to the AMS SDK.
I am a little bit confused by the profiles, which one should I use?
I assume you refer to PCL profiles?
You don't need to use anymore any hacks to get the Xamarin profiles available when you create a PCL. Did you try to create a PCL? The Xamarin profiles should be there. You need to have Xamarin installed though.
Related
I have an iPhone application (with an android counterpart), developed in Xcode and written in Objective-C. It is a classical native iOS app, already working and uploaded in the App Store. Similarly, the android version is built with Java and linked with the android SDKs. It's uploaded to the market place.
I was asked to port the app to Windows Phone. Is this possible without modifying the code?
I am not familiar with Windows Phone dev, however it looks like that is a completely
separate ecosystem for developing apps (different programming language, different IDE, different app store etc).
Can I go from Android to Windows Phone or from iOS to Windows Phone?
PhoneGap - or similar platforms - are not options since the code is already written in Objective-C and Java.
Like iOS and Android, Windows Phone is a completely different operating system and currently requires a completely different development platform.
It is not possible to take the existing code and make it function on a Windows Phone.
iOS commonly uses Objective-C for application development . Even if there was a way to compile Objective-C onto a Windows Phone, it would be inherently tied to platform features, and UI controls. While you could write some code in C++ and share it, with an iOS application, you'll still need some in Objective-C.
Android applications use Java normally. Java is not available for the Windows Phone platform. So, the language is out. Further, like iOS, the platform features are not necessarily shared and the UI control and behaviors are different. Android applications can use C++ (if you happened to code using it), but it has limitations, and by using it, again, you'd be tying the code to the Android platform potentially. Some code may be portable.
Windows Phone applications are usually written in C#/C++ and XAML or DirectX. While there is some similarity in languages (Java and C#), you'll encounter far more platform differences that could need significant effort to convert. From the way network requests are made to handling threads will be different (and many many more). Objective-C is also very different from C++.
Unless you had used something like Xamarin and written the underlying business logic using a common platform (C#/.NET), you'll need to consider a port to Windows Phone a fresh start.
It's not possible to just reuse all of the code that's been written. With a careful effort, you could share some common code (if it were written in C++), but as the shared code will not directly work with UI (and other platform features), you'd still need to do the UI on each platform, work around limitations, and potentially customize the user experience for each platform.
Microsoft has provided some guidance on porting, and provided some links with an API equivalency table here.
Yes, you can use Microsoft's Windows bridge for iOS to convert your iOS application code to Windows mobile platform code.
You need to use WinObjC SDK provided by Microsoft for this purpose.
Follow this link for more details.
No, you can't, WP apps are build with c# or .net and in visual studio IDE. There is no automated way to port a previously coded ios or android native app built with objetive-c or java to WP.
In my opinion there is no way to directly port a iphone app to windows phone app. You need to develop windows phone app with its needed environment like Visual Studio , windows phone sdk and with windows os.
You can also use cross platform like phonegap if it may fit to your requirement.
It looks like you have an existing Obj-C codebase for iOS, and a Java codebase for Android. No matter how you cut it, you're looking at [re]writing code to get something on WP8.
I don't know how "UI heavy" your app is; in general the UI code is the most platform specific (unless you're willing to put up with "cross platform" stuff that might not have good UX).
You might consider keeping the non-UI code mostly plain C++ and using Obj-C, etc. only for the parts where you have to talk to the framework. It will be easier to support multiple platforms with C++.
I took this approach with an app I'm working on; it's targeted for iOS but it's about 80% C++ (including Open GL). If I decide to port to Android I just need to deal with the 20%, mostly UI-ish code.
I developed an android application with Phonegap and I want to convert it to iOS as well. Before starting my project I heard that we are able to convert same project with multiple platforms using phone gap. But now I don't know how to convert my project to IOS. Can any one suggest good tutorial OR examples to do it.
And also mention what are all prerequisites to convert my android application to IOS using phone gap.
Suggest me some tutorials with examples.
With phongap you can target all platforms including iOS, android and windows etc. using HTML 5, avoiding each mobile platforms' native development language. Code base remains same for every platform. Applications execute within wrappers targeted to each platform, and rely on standards-compliant API bindings to access each device's sensors, data, and network status. refer docs http://docs.phonegap.com/en/3.2.0/guide_overview_index.md.html#Overview
Phonegap is not for converting one build to another.. Using phonegap you can develope for all platforms using phonegap framework, you can generate .apk,.ipa,ota, etc as you wish using sdk in your pc or using phonegap build service. You can read here(phonegap authentic doc) how can you do it for different plaforms.
Nb:Phonegap provides complete documents in their site itself, you can go through and understand, it is helpfull.
You can build on each platform. If you don't want to do that, they offer a Build service that build your app on each platform for you. See https://build.phonegap.com/ for more info.
With phonegap you can create all platform application with same package just you need to clear yourself that for IOS you need certificates to build it. Otherwise same package you are using for android can use for IOS also.
There are so many cross platform libraries that I am kinda lost to get an answer to a very basic java question.
I have a java library that works well on Android. It does not use any android specific functionality and also builds on the standard java sdk. This library uses sockets (plain simple Socket, ServerSocket kinda architecture) to communicate between the library and a server hosted (may be on a ec2 or some virtual public server).
Now my question is, can other developers import my java library (built using java sdk) to a application that uses html/css for User Interface, package all of this into a mobile application for iPhone (use native iPhone packaging, and a WebView to launch) ? Also can I ship this library so other software developers can build a web application to work on desktops and cross browser's ?
Some questions on stackoverflow are close to what I am looking for, but not quite there.
Developing Mobile Apps for Multiple Platforms (without a cross-platform framework!)
Will a webserver be able to use my library that connects to the server using sockets ?
And will every client that connects to this webserver create a new instance of my library ?
If you library doesn't use any dependencies on either Android or any other library, another developer can use it pretty much anywhere they want. Although keep in mind that platforms like EC2 may have a preferred way of using communication. (I'm no expert on EC2, so you'll have to see what they use.)
So I guess it's better to abstract out that socket functionality for good.
I don't think you can use a Java library in iPhone. iOS terms of use clearly states that you cannot use a compiler or interpreter on the device other than the one given in the SDK and the webkit javaScript engine in Safari. So there's no way your Java code is going to run on iPhone (without jail-breaking.)
I don't understand the question about webView. Do you mean navigating to a site that is powered by your library ? If yes, then yes as long as you keep it in the boundaries of Safari. (no Flash, no Java Applet .etc.)
Will a webserver be able to use my library that connects to the server
using sockets ?
For the most part, yes. But as I said, the platform may not allow raw connections, so it's good to abstract it out.
And will every client that connects to this webserver create a new
instance of my library ?
This depends on the design of your library and its public APIs.
Hope this helps.
How does one approach building the mobile app version of one's Rails app, with little to no mobile development experience? iOS, Android, one or the other, or both.
First, you might want to create (private) APIs for services your web app provides. The de facto standard for Android apps is REST-like endpoints that accept/return JSON. You can use whatever Ruby REST framework works best. Then you need to consider how you would authenticate Android apps, if needed. Do you use the same authentication database? Can you allow anonymous access, what parts of the app do you expose, etc.
Finally, you need to build the frontend. A few options here:
learn Android
hire someone to do it
use a framework that lets you develop using Web(-like) technologies: Thitanium, Rhodes, etc. The upside is that you get to use what you know and might also get an iOS app for free.
The downside is that you can never get the native performance, and look-and-feel might not be completely Android-like (never used Rhodes, so maybe it does this well enough, but still)
Consider using http://www.rhomobile.com/.
I am interested in supporting a few different platforms, like Android, iOS, Windows, and I was interested in Rhomobile might help? However, I am concerned about not being able to use any device specific syncing capabilities. Has anyone worked with PhoneGap/MoSync combo and what has been your experience?
I'm not sure I understand what you mean by "not being able to use any device specific syncing capabilities" with Rhomobile. You can always create your own syncing mechanism using the network libraries as described here:
Connecting Directly with Web Services
You can also create native extensions and use them inside your Rhodes project so no native capability is impossible to access. Of course you would have to replicate this extension for every platform you are targetting or manage the differences in implementation in your code in a platform specific way.
Regarding the comparisson with the other multi-platform frameworks, we evaluated using PhoneGap but ended up deciding for Rhodes because of the development tools. Having a development tool that has integrated step-by-step debugging and the Rhodes simulator that allows you to test and manipulate your style sheets and works 100 times faster than the android emulator is a major advantage.