I have an existing application developed using Microsoft Visual Studio 2010 C#. I just purchased Xamarin's Monotouch product which allows me to use their IDE MonoDev to create iPhone/iPad applications from scratch by coding C#. Right now I don't want to code a new application. I want take my existing C# application import the source into monodev/monotouch and have the result run on the iPhone/iPad. My existing C# application is designed for deployment on Android phones/tablets using Xamarin's Android product. It works great! I have begun wading into the Xamarin documentation, samples, tutorials etc. But I need to port the existing application to iPhone/iPad right now, right away. I really don't have the luxery to spend time learning from scratch. I've got to belive someone has already gone down this migration path. If you have can we talk, email, or do you know if there is a guide describing the specific steps to take to accomplish this?
TIA
Xamarin MonoTouch does not allow you to run any C# application and run it immediately on an iPhone. The UI layer is native, so the C# code that constructs the UI must use the Xamarin bindings onto the Apple UI APIs.
The 'standard' migration process is to create an empty MonoDevelop project then start adding your existing C# business logic files, resolving any compilation issues as they arise.
Related
where can I learn to make UWP apps using visual c++.The only resource I've found shows how to make a 'Hello World' app. This is insufficient because I want to make an app that has multiple pages and utilizes custom classes.
To develop UWP apps, the official channel is the official document: https://learn.microsoft.com/en-us/uwp/
Depending on your requirements, you need to use the appropriate APIs in your app.
For the specific API, there's specific code sample for your reference. You could get the demos from GitHub: https://github.com/Microsoft/Windows-universal-samples
If you want a complete project to learn how to develop a UWP app. There's an existing open source project MS-Calculator. It's UWP app and developed by c++ language.
This should not be so difficult!
In normal C++ one can write static or dynamic libraries that can be used in multiple application projects. I want to do the same thing for UWP apps using C++/winRT.
I have written a simple C++/winRT UWP app that discovers Bluetooth Low Energy Devices. I used the Core UWP project template that set up all that pch.h stuff. What I want to do is to make a library out of the code I wrote that did the Bluetooth work so it can be shared across many UWP apps but I have no idea which project template I should use to do that.
I have come to the conclusion that writing a Windows Runtime Component is not what I want. I am not making a run time component though I need to use runtime components for the Bluetooth.
In the end I will be calling that library from a Java application but that's off in the future.
All my problems would be solved if they had a Java/winRT option (a Java language projection in Microsoft-speak).
Note that the project selection interface in Visual Studio 2019 must be very different than 2017 as none of the demos I have seen online look like what I see.
I am new to Xamarin development. And, currently I want to integrate the zendesk chat.
As per my RnD and after contacting Zendesk support center they are not supporting the xamarin yet.
Currently they have sdk for native android and ios respectively.
I need you expertize people's guidelines for the development regarding what scenario i should follow to achieve the same using xamarin.forms :
Integrate the both platforms native sdk's for xamarin in each platform and later call it from Xamarin.Forms by adding platform dependency using Device.OnPlatforms . ( I am not sure about this scenario, please suggest)
Create a jar/aar of Zendesk SDK and use it using binding library concept.( I am not sure it will be accessible into ios platform)
Kindly, suggest me the best approach for this.
Any sample reference for suggestions will be grateful.
Thanks in advance.
I think it's a mix of number 1 and number 2 (and a little extra).
You will need to create the Binding libraries for both iOS and Android. Xamarin has a good documentation of how to do this: Android/Java and IOS/Objective-C
Then you can go either with Xamarin Native (Xamarin.iOS and Xamarin.Android projects) adding the binding to each project. Or you can go with Xamarin.Forms but this will require a little more work as you will need to create an interface of the methods you want to use from the SDKs (most likely all off them) and create the implementations for each platform.
Let's say your interface is called: ISendeskSdkService you will need at least two implementations: ISendeskSdkServiceiOS and ISendeskSdkServiceDroid. These implementations will be on the Platform project and they will be calling the binding libraries you just created and added to each of these projects.
You will be developing your app on top of your interface and which implementation to use will be set on the application load when you are configuring your IoC.
Hope this gives you an idea.
I saw this SO question asking for a PDF viewer for MonoTouch, which is just what I need. First I tried the Xamarin code sample suggested by poupou, but this needs a lot of extra work to use. So I decided to try the mTouch-PDFViewer suggested by Alex.
So I went to the download page and on to the GitHub for this component and cloned the repository. The problem is that the Visual Studio solution opens with a message saying I need a different license for Xamarin than I have. I only have a Xamarin Indie license and am therefore not able to build this library.
Is there a way around this? If I copied all the code into the Xamarin Studio, would it work then or can't I use this component at all due to licensing problems? Will it work in the app as long as I get hold of the dll file or do I need the more expensive license?
I have sent an email to the support email address for the mTouch-PDFViewer asking if the dll is available somewhere, but I was wondering in general if the licensing limits the use of dlls or just the ability to compile the code.
Indie license does not have Visual Studio support. An Indie license requires you to use Xamarin Studio on a Mac. There should not be any restrictions on using specific components.
Also, for basic PDF viewing, iOS has excellent built in support, which you might try before using a 3rd party component.
I have existing iOS and Android native apps. Is it possible to extend the apps with Xamarin coded part ?
Both Xamarin.iOS and Xamarin.Android are currently setup to take control of your application, so you need to make your main program be written in C# and then call into the existing code.
The way that you would do this is to bind your existing Objective-C or Java code as C# libraries, and then consume those libraries from C#. The binding technology is precisely what drives both the Xamarin.iOS and Xamarin.Android tools, so you would effectively be doing the same.
Once you have bindings, the interoperability works both ways: you can call native code, and native code can call C#.
The bad news is that instead of starting to enjoy writing code with both tools from day zero, the first thing you have to do the bindings, which is in general, not as fun as watching colored squared move on your screen.
Ok I find an answer here : http://www.whitneyland.com/2013/05/why-i-dont-recommend-xamarin-for-mobile-development.html
For example, code written in Xamarin cannot be used in native or HTML5
apps.