I have tried on a Mac OS X computer and on a Windows 10 PC. I want to create a mobile application with Xamarin. I want to run this application on both iOS, Android and Windows Phone devices.
When i am creating a new solution, i can choose a multiplateform Application Project, but it creates sub projects for each architecture. I want a single project common for the 3 architecture. Is it possible ?
Thanks
If you want to create a Cross Platform project you have to (in Xamarin Studio. If you want UWP, you have to use Visual Studio)
File -> New Solution
App -> Forms App -> Next
App name ->
Target platforms -> Select PCL or Shared Project (I prefer PCL) ->
Next
Location -> Create
at the end you should have a PCL project and X Platform Specific Projects
In order to create a full multi-platform app (iOS, Android, Windows phone, MacOS, Windows) you need to use visual studio on Windows. Using Xamarin Studio on the Mac will only allow Mac and Android projects. Still you want to create a Xamarin Forms App, Portable application.
Only Visual Studio you can create projects for platforms IOS, Android e UWP, for it you need connect your Mac the network (Xamarin Mac Agent) for build applications for IOS.
On IOS you only create projects on XamarinStudio or Visual Studio For Mac for platform Android and IOS.
Related
I would like to start a new Android Wear project with Xamarin, but when I try to create a new project with Visual Studio for Mac I can't find the Android Wear template.
Am I Missing something?
This is my wizard:
Thanks a lot
On what version and update channel are you?
I have a template available with the current version on stable channel.
I found out a way to create Android Wear application on Visual Studio for Mac on macOS High Sierra:
create a blank solution (new project -> miscellanous -> blacn solution)
then right click on the solution -> add project -> Android -> Wear
I am currently making a cross platform mobile application . Where in I am targeting Android, IOS as well as the Windows OS.I have just made a hello world form and debugged it for android. Runs perfect on the emulator. Now want to send the .apk file to my coworker to see on her Android Mobile. How do i generate the .apk file???
Right click on solution with Android app and click on Archive more HERE
You have to run your application in release mode. The generated apk is located in the bin\release folder of the android project
Can Xamarin point to a different location for Android SDK and the NDK than its normal directory in <username>/Library/Developer/Xamarin/ where Xamarin installer has put them in, is there anything special to those locations for Xamarin, or the dir Android Studio Setup Wizard uses ok? For example to the /usr/local/opt/android-sdk where homebrew installs it.
The reason I want to be able to do this is to save disk space since I want to use another tool/ide, Deco for React Native development, as well as Xamarin that asks for Android SDK. Android SDK and Android NDK is more than 10GBs. Also this would keep me download and update time.
Is there anything specific for Xamarin with those directories it puts Android SDK and NDK in? If not, when I change those dirs from Xamarin preferences, will it take any other effort to set, configure Xamarin for that change?
Xamarin Studio / Preferences / Projects / Android
Android Studio Using the same directories:
Note: On my personal Mac, I have Android Studio pointing to where Xamarin installs the Android SDK/NDK.
Note: Xamarin does not make any changes to these directories, they are maintained by Google's installers and Xamarin content copies out of them when they to inflate a zip, etc...
You can change Xamarin to point to the SDK/NDK that Android Studio installs, your choice.
I have a project in Android Studio (on a pc), and as far as I know now Microsoft owns Xamarin and its free once you have a Visual Studio license, then you can develop apps using C#(Already know that I have to port the JAVA code) and then compile in a MAC the IOS app.
My 2 concerns are:
When you can't compile, will the IDE show the IOS related errors?
There is a clear implementation of "cross platform code" vs "specific code"?
How Xamarin manage it?
In addition, our plan is to finish the app for Android which is our primary target and then manage the IOS, besides the other questions, what I need to know is if that is possible.
Yes, the VS IDE will show you build errors from the iOS build server.
Yes, you can build an Android app using Xamarin and later extend it to build an iOS app also. This is easiest if you use Xamarin Forms, but it also possible with native Android/iOS UI, but will be much more dependent on how you architect your applications.
I have some confusions About the IDE to use for MvvmCross
a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well?
b) Xamarin IDE supports Android and iOS development on Mac but, is it true that Xamarin doesn't support Mono.iOS on windows? Isn't it strange that Visual studio can use the network mac for iOS development but why not Xamarin Studio?
Thank You for your time.
Regards,
Saurav
a) VisualStudio (VS) uses Xamrarin.iOS and Xamarin.Android plugin for iOS and Android development. But can we also use PCL(Portable Class libraries) and MVVMCross/Monocross frameworks in VS? I see the PCL option on VS but, i don't see the support for Android & iOS. Do i need to install additional plugin for PCL to support these two platforms as well?
MvvmCross currently uses Profile104 for Portable Class Library development. You can easily develop for this profile without installing Android and iOS. The mapping of PCL profile to platforms is, however, quite confusing (it's not exactly obvious) so the easiest way I find to create a Profile104 PCL is:
to create any PCL
then to manually edit the csproj file to say Profile104 - look for a line like: https://github.com/slodge/MvvmCross-Tutorials/blob/master/Babel/Babel.Core/Babel.Core.csproj#L14 in the csproj
I have customers who develop in medium size teams where only some people have the Xamarin tools installed - most people have just Windows tools and work on the PCLs using Unit Tests and using WindowsPhone/Store user interfaces.
b) Xamarin IDE supports Android and iOS development on Mac but, is it true that Xamarin doesn't support Mono.iOS on windows?
Yes, this is true.
Isn't it strange that Visual studio can use the network mac for iOS development but why not Xamarin Studio?
This may feel strange, but I believe this is actually this is Xamarin listening to their customers.
I believe, that the reason customers wanted Windows support for iOS was because they wanted to use Visual Studio and they wanted to use plugins like Resharper. Xamarin provided this in their 2.0 release.
It is true that they could also have added iOS functionality to XamarinStudio for Windows as well - but this (I believe) wasn't what any of their customers were asking for - so adding it would have created more work (both in creating and maintaining it) without adding any significant benefit (IMO)