Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Using native iOS SDK and Android SDKs in Xamarin apps.

$
0
0

I've been doing iOS development for a few years now and I know Android dev probably enough to build a "Hello World"x4 app but I'm completely new to Xamarin. My company has built some app in native code and some in Xamarin, my team has been assigned the task to figure out how to create portable component that can be used across native and Xamarin apps. Based on some initial reading I think the below is possible but asking here for some validation and also asking for pointer to any official documentation (and hopefully code samples) on how this should be architected in the Xamarin side. So this is what we have on mind:

Assume these are our requirements.

Create a component that is sharable across native and Xamarin apps that makes an REST API call. The API returns a "Hello World" string, the string needs to be displayed in the middle of the UI and a text field should be also added along with a Send button. When the Send button is pressed the content of the text field is sent to the backend. And there is an API to change the background color of the component. This is just to excerscise some basic communication between the component and the host app (native or Xamarin).

This is what we are thinking:
1. Create an iOS SDK that encapsulated the view component and the logic to call the backend. It also exposes the view APIs to read the text from the text field and change the background color.
2. Build #1 for Android.
3. Create a binding library for iOS in Xamarin and use the iOS SDK from #1
4. Create a binding library for Android in Xamarin and use the Android SDK from #2
5. Use these binding libraries in a Xamarin app
6. Use the original native SDKs in the respective native apps.

So #3, #4 and #5 are the places where I feel we need a huge knowledge gap on How To and if that is the correct approach. Also in #5, it sound that we end up with two different bindings one for iOS and one for Android, I read something about NuGet packages. Would that wrap both into a unified Xamarin package that is used in the Xamarin app?

Any pointers to documentation, code samples, case studies would be great. I'm really looking forward to learning Xamarin!

Thanks!


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>