locked
How to use Xamarin in existing iOS or Android Application? RRS feed

  • Question

  • User389922 posted

    I have an iOS project written in Swift. I want to use Xamarin Views inside iOS Native Project. is there any way to achieve this task?

    Wednesday, October 23, 2019 10:40 AM

All replies

  • User369978 posted

    Xamarin.Forms allows ContentPage-derived pages to be added directly to native Xamarin.iOS, Xamarin.Android, and UWP applications , please refer the link : https://docs.microsoft.com/en-us/xamarin/xamarin-forms/platform/native-forms.

    I want to use Xamarin Views inside iOS Native Project.

    It is impossible , they used different IDE and in different develop language .

    Wednesday, October 23, 2019 1:13 PM
  • User389922 posted

    Above Link is How to use Xamarin.Forms in Xamarin Native Projects.

    But My Requirement is how to use Xamarin.Forms inside XCode Project written in Swift. How to communicate with Xamarin.forms View from Xcode iOS View?

    Thursday, October 24, 2019 11:47 AM
  • User369978 posted

    @amitkhoth said: Above Link is How to use Xamarin.Forms in Xamarin Native Projects.

    But My Requirement is how to use Xamarin.Forms inside XCode Project written in Swift. How to communicate with Xamarin.forms View from Xcode iOS View?

    Impossible .

    Thursday, October 24, 2019 11:48 AM
  • User389922 posted

    Thank You for Your Response.

    Recently I went through Flutter Document. In Flutter, Developer can create dedicated module called Flutter Module . Flutter Module can communicate with Native code(Swift/obj-c or java). Flutter Module can be added in existing iOS or Android Application.

    is there any similar thing exist in Xamarin that can interact with Naive code(Swift/obj-c or java) and can be added to existing iOS or android Project?

    Thursday, October 24, 2019 1:57 PM
  • User369978 posted

    We could create binding library with native obj-c or java code and used in Xamarin.Android or Xamarin.iOS project .

    Android instruction : https://docs.microsoft.com/en-us/xamarin/android/platform/binding-java-library/

    iOS instruction : https://docs.microsoft.com/en-us/xamarin/ios/platform/binding-objective-c/

    Thursday, October 24, 2019 2:02 PM
  • User389922 posted

    Right,We could create binding library with native obj-c or java code and used in Xamarin.Android or Xamarin.iOS project .

    in this scenerio I have to make Library of my existing native code and needs to bind them. but I have to use Xamarin Other Way.

    But My Scenerio is Different. * I have to use Xamarine in Native iOS or Android App.*

    My Requirment: 1) “Host App” should be made Native Language Project. Host App will Launch Plugin App. (Kotlin or Java for Android / Swift or Obj-C for iOS) 2) “Plugin App” should be made in Native Language (Kotlin or Java for Android / Swift or Obj-C for iOS)Project. 3) “Host App” and “Plugin App” each have a different bundle ID. 4) Plugin App should interact with Xamarin.Forms. 5) Data transmission must be bidirectional between xamarin.forms and native App(Ex.Plugin App).

    How I can Achieve this Task Using Xamarin?

    Thursday, October 24, 2019 2:14 PM
  • User369978 posted

    @amitkhoth said: Right,We could create binding library with native obj-c or java code and used in Xamarin.Android or Xamarin.iOS project .

    in this scenerio I have to make Library of my existing native code and needs to bind them. but I have to use Xamarin Other Way.

    But My Scenerio is Different. * I have to use Xamarine in Native iOS or Android App.*

    My Requirment: 1) “Host App” should be made Native Language Project. Host App will Launch Plugin App. (Kotlin or Java for Android / Swift or Obj-C for iOS) 2) “Plugin App” should be made in Native Language (Kotlin or Java for Android / Swift or Obj-C for iOS)Project. 3) “Host App” and “Plugin App” each have a different bundle ID. 4) Plugin App should interact with Xamarin.Forms. 5) Data transmission must be bidirectional between xamarin.forms and native App(Ex.Plugin App).

    How I can Achieve this Task Using Xamarin?

    AFAIK , we can't achieve it.

    Thursday, October 24, 2019 2:19 PM
  • User389922 posted

    Thank You :)

    Thursday, October 24, 2019 2:22 PM
  • User389922 posted

    @ColeX can you explain why we can not achieve it? if Possible please explain in Detail.

    Thursday, October 31, 2019 12:10 PM
  • User369978 posted

    While we want to use one programming language in another programming language , we should convert it first , make them look like the same way, e.g https://docs.microsoft.com/en-us/xamarin/android/platform/binding-java-library/ ,https://docs.microsoft.com/en-us/xamarin/ios/platform/binding-objective-c/ .

    The IDE can't handle the two different programming languages in one project .

    Friday, November 1, 2019 7:22 AM
  • User389922 posted

    @ColeX We can achieve using: https://github.com/mono/Embeddinator-4000

    Wednesday, November 6, 2019 5:28 AM
  • User392497 posted

    hey, @amitkhoth can you elaborate on how you achieved this with Embeddinator-4000? I'm also looking for the same.

    Thursday, January 30, 2020 5:19 AM
  • User395628 posted

    Cross-platform applications for iOS, Android or Windows are constructed utilizing Xamarin. Structures device, which changes over application UI segments into the stage explicit interface components at runtime. As the utilization of Xamarin. Structures essentially speeds up m, it is an incredible choice for business-arranged undertakings.

    Tuesday, July 7, 2020 7:28 AM