0

I've taken an interest in Xamarin recently for cross-platform development (Xamarin.Forms), I'm just curious as to what things can be expected if I develop entirely using Xamarin, but on a Windows machine? I'm asking really about things like:

"The layouts won't be right because of blank."

"IOS handles x,y,z differently and is normally a problem with cross-platform development with Xamarin."

I.e. Is it worth it to develop an app using Xamarin if I wouldn't be capable of acquiring a Mac until the end of the production\What type of problems would be expected when a Mac was finally introduced? Would I be better off just sticking to android studio in this case?

I've already checked out this: Xamarin Visual Studio IOS Development Without a Mac? I know a Mac is necessary, I'm just curious as to how feasible it is to introduce one towards the end, and what issues are normally encountered.

schnondle
  • 121
  • 14

2 Answers2

1

TL/DR: It may be possible, but most likely it's not.

The answer to your question totally depends on what you are trying to achieve. If there are many platform dependent APIs you use (Contacts, Camera, Sharing, iCloud, whatsoever) or custom controls, development without a Mac (and at least one physical device) is near to impossible. Of course you could implement everything blindly and hope for only few fixes in late development, but we all know that this won't happen. Especially if you are not very experienced in iOS development, which I assume, since otherwise you might have access to a Mac, the iOS APIs (both UI and System), may be a bit ... well ... unintuitive and hard to get by.

If you develop a simple-ish app, that for example just queries a web UI and uses stock views to display the data it may be feasible. Depending on the consistency of UI you expect, there might be the need for some adjustments in late development, when you have access to a Mac, but if you're lucky this might only be few. There are tutorials on how to make a good looking UI with Xamarin.Forms, but still you will be quite limited with this approach.

Paul Kertscher
  • 9,416
  • 5
  • 32
  • 57
1

This is what I have done in the past - kept everthing to Xamarin Forms with no custom controls. However it depends how long you will have the Mac for. From experience, you will need to change font sizes and padding. Maybe also need to change margins and height requests. Anything that you set a specific number for will probably need changing.

A quick way to do this is to set values based upon devices:

<OnPlatform x:Key="MyTitleFontSize" x:TypeArguments="x:Double">
    <On Platform="UWP">36</On>
    <On Platform="iOS">28</On>
</OnPlatform>

<Label Text="{Binding FullName}" FontSize="{StaticResource MyTitleFontSize}"/>

I also set other attributes based upon platform:

<OnPlatform x:Key="iOSBoldOnly" x:TypeArguments="FontAttributes">
    <On Platform="UWP">None</On>
    <On Platform="iOS">Bold</On>
</OnPlatform>
Ryan Gaudion
  • 695
  • 1
  • 8
  • 22