I have an iOS project written in Swift.
I want to launch Xamarin.Forms Views inside iOS Native Project.
How to do two way communication from iOS Native Project to Xamarin.Forms view?
is there any way to achieve this task?
Ex. I can achieve this task using Flutter Module.
https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps
https://medium.com/flutter-community/add-flutter-to-existing-android-ios-app-ae8c4fb1582e
How to achieve above using Xamarin?
You maybe can di that with the Embeddinator-4000 that creates native libraries of .NET libraries. https://github.com/mono/Embeddinator-4000
This can be done with Xamarin Forms Native Views
Related
Currently, we have a Cordova plugin and a UWP Class library. The library is using native UIElements for different UI workflows. Is there a way to display those UIElements? I read, that XAML views can't be displayed. Is there a workaround somehow?
Cordova is using the WebViews. So, we just have the WebView environment. But yes, somehow use the XAML view, or communicating with it.
Yes. Cordova is using the WebViews in Android and IOS, but not in Cordova UWP. The low level of Cordova UWP actually is using javascript. The XAML view also is not available.
So, your requirement is impossible.
I was giving an interview for a company and I was told by the architect that they are creating iOS apps from Xamarin.iOS ( NOT Xamarin Forms) with MvvmCross framework and they use storyboards for UI. But if the UI is very simple they use XAML to create them.
I never knew we can use XAML for Xamarin.iOS and Xamarin.Droid. We had a small discussion/argument if that's even possible. He said they were using it successfully.
My question, is it really possible to use XAML in Xamarin.iOS and Xamarin.Droid. Because, if we can do that, I feel no use of using Xamarin forms.
If yes, can anyone provide some kind of documentation?
Thank you.
There is no way to design UI in XAML using Xamarin.Android or Xamarin.iOS, but you can include Xamarin.Forms page in Xamarin.Android or Xamarin.iOS app. This way you can have native app with UI using storyboards, but with some Xamarin.Forms pages designed in XAML.
There is a sample how to do that in Xamarin Forms samples project on GitHub.
Only Xamarin Forms support sharing of UI via XAML.
UI for iOS has to be made using xib or storyboard.
For Android using AXML.
Windows Phone, UWP, WinPhone Silverlight, Windows can use XAML for UI.
I have developed an app/component using Xamarin.Forms and as per the requirement I need to integrate that component with another app which is developed on Xamarin Native in Android as well as iOS.
Kindly help me with the suggestions or references
I've seen something like that on a sample called Native2Forms.
What it does, at least in Android, is to use a separete activity to integrate the Xamarin Forms PCL (FormsActivity).
I have a Xamarin iOS unified app.
I want to add a Xamarin form to it.
How can I do this?
Thanks,
Kaustubh
-You can not do it directly.
-Create a Xamarin PCL project, it will create a shared project and native projects to iOS and Android
-You can add you Xamarin native project, necessary files to it
-Create a page renderer in Xamarin Forms Shared project
-Use it to load required page from native project
-Page renderer will act as a native page.You can call your native functions, UI from that point onwards.
Xamarin forms is a kind of project, not a form you can add to a project that is not xamarin forms
You can just add a new project of type Xamarin.Forms in your solution and you'll then have to port your code or share as much as possible through a PCL.
Source and reference : developer.xamarin.com/guides/cross-platform/xamarin-forms/
[Edited to take comments into accounts]
I have a C# library that I want to use in my Xamarin project to deploy to an iPad.
Lets suppose the C# library is stored as MyUtilities.dll.
For a regular Windows app, I'd add MyUtilities.dll to my project Resources and then have a
using MyUtilities;
statement in the class where I wanted to use classes from that library.
How do I accomplish this same thing using Xamarin in an iPad app?
You will need to rebuild your library from the source using the Xamarin.iOS compiler. After that you would reference the same way you do in a Windows app - by either including a Reference to the dll in your project, or by including the Library project in your solution and referencing the project.