0

i expected there is many devote for me for this post, however this is only the way to solve my problem since the xamarin document is too messy to me, it do not provide a one straight line walk through to me.

Now what is my question is, how do i create the project which can cross the both platform. I downloaded the xamarin, however the xamarin does not provide me any project which able to target both platform as the picture stated

enter image description here

What i am able to do is, create the project in my visual studio with targeting IOS, however in the xamarin studio itself unable to achieve it. Since it done by this, is it i need to code IOS in my visual studio, and code android in the xamarin? If that so, what is the purpose of the cross platform?? Since i have to code in two studio, what i want is just code in one studio, and deploy on two platform

Imdad
  • 769
  • 1
  • 11
  • 31
Ryan Shine
  • 442
  • 1
  • 9
  • 23
  • Xamarin.iOS development on Windows requires the use of VS; http://stackoverflow.com/questions/21190630/use-xamarin-studio-on-windows-to-build-ios-app http://stackoverflow.com/a/16158058/4984832 On OS-X, you can use XS for iOS and Android. – SushiHangover Mar 16 '16 at 10:11
  • Also, iOS development on Windows needs a business license, not an indie one... – Gusman Mar 16 '16 at 14:19

2 Answers2

2

You can have a Xamarin.Android and Xamarin.iOS projects in a single solution and have code sharing with a common business logic using MVVM design pattern , PCL (Portable Class Libraries) and Shared Projects. For the case of platform specific code in a shared code , inversion of control can be used

You try to squeeze as much as common code behind as possible , so you will only have to implement the GUI twice (Android and iOS)

Or you can use Xamarin.Forms codebase to create a single UI for all supported platforms

ad1Dima
  • 3,185
  • 2
  • 26
  • 37
iamIcarus
  • 1,428
  • 11
  • 28
  • that mean, if i develop on two platform, i have to code in both studio? if i use on the xamarin studio and the vs, if i copy the code from the xamarin to vs, the code can be reuse? – Ryan Shine Mar 17 '16 at 01:19
  • plus, even i open a share project, the thing is i still not able to target the ios platform, only android platform in the new project selection there. – Ryan Shine Mar 17 '16 at 02:32
  • doesnt matter if you user xamarin studio or visual studio. if you create a single solution and use the points i have mentioned above for code sharing you will get a cross platform xamarin app – iamIcarus Mar 17 '16 at 07:19
  • but only able to implement in the vs right? xamarin studio itself only able to develop the android only – Ryan Shine Mar 17 '16 at 09:26
  • Xamarin Studio can develop the iOS apps also. But you need a mac to develop iOS apps for both VS and Xamarin Studio – iamIcarus Mar 17 '16 at 09:35
  • that mean i have to develop in both studio with the sharing model – Ryan Shine Mar 18 '16 at 09:07
0

You must need a Mac in network to develop Xamarin.iOS project in both native or cross-platform manner.

You can use Xamarin Studio to build both Android and iOS in portable or shared way.

By using VS you can point your project to Windows Phone too.


Reference :

Yksh
  • 3,276
  • 10
  • 56
  • 101