4 ms·
We do not actually provide a lowest-common-denominator. It is simpler to think of Xamarin as providing you with: * C# language on iOS, Android, Mac * 1:1 API
by migueldeicaza 14y ago
We do not actually provide a lowest-common-denominator.
It is simpler to think of Xamarin as providing you with:
* C# language on iOS, Android, Mac
* 1:1 API bindings to whatever is native on a given platform. On iOS, the CocoaTouch APIs, on Android, the Android APIs, on Mac the Cocoa/CoreFoundation-based APIs.
From this basic setup, you can already see that you wont get code that will run on all platforms. You will need to split your code into cross-platform code (database access, web services, xml, json parsing, offline caches, authentication) and things that are UI-specific (Android activities, Android widgets, iOS View Controllers, and so on).
- zura 14y ago>We do not actually provide a lowest-common-denominator. This actually is the reason I keep away from Xamarin, and I guess I'm not alone... I think that there is a room for having a cross-platform lowest-common-denominator, including UI, File system, Networking, etc... with ability to dive into platform specific details when needed.
- jstedfast 14y agoWe've got some abstractions that build on top of the native APIs as well such as Xamarin.Mobile.
- coldtea 14y agoNothing stops you from treating Xamarin as one. But it also supports the full experience for each platform.
- zura 14y agoYou can't treat Xamarin as one... e.g. you can't write a simple calculator UI in a cross-platform way - You would have to code the UI part separately for iOS and Android. At least, that's my understanding and OP (Miguel) confirms it. And I guess your mileage won't vary in this aspect ;) Although, Xamarin.Mobile is a step in the right direction, as commented here.
- coldtea 14y ago>You can't treat Xamarin as one... e.g. you can't write a simple calculator UI in a cross-platform way - You would have to code the UI part separately for iOS and Android. Yes, but they do offer a "base" abstraction layer besides the C# libraries, that includes stuff like GPS access, accelerometers, etc. As for the UI part, one could use a Webkit View as the view, and link the various heavy actions to C# code. For something like a common denominator UI, for a simple calculator or some form based stuff, it would be perfectly fine.