简体   繁体   English

Visual Studio 2015,Xamarin和目标设备

[英]Visual Studio 2015, Xamarin and target devices

I just downloaded and installed Xamarin for VS2015, including VS2015 SP2 and a host of other stuff. 我刚下载并安装了Xamarin for VS2015,包括VS2015 SP2和其他一些东西。 I created a "hello world!" 我创造了一个“你好世界!” app and got targets for iOS, Android, Universal Windows, Windows 8.1 and Windows Phone 8.1. 应用程序并获得iOS,Android,通用Windows,Windows 8.1和Windows Phone 8.1的目标。

I am new to developing for Android and iOS and know that if I want an iOS solution I'll need to purchase a Mac to do that. 我是Android和iOS的新手,我知道如果我想要一个iOS解决方案,我需要购买一台Mac才能做到这一点。 I have a couple of Windows Phone apps that I might convert to android and iOS apps, so a Mac seems inevitable. 我有几个Windows Phone应用程序,我可能会转换为Android和iOS应用程序,所以Mac似乎是不可避免的。

However, my question is can I use the (now) free Xamarin for VS2015 to create and build C# apps that will run on OS X (not iOS), or do I have to learn Objective-C to do that? 但是,我的问题是我可以使用(现在)免费的Xamarin for VS2015来创建和构建将在OS X(而不是iOS)上运行的C#应用​​程序,还是我必须学习Objective-C才能做到这一点?

Yes, it is possible to create and build MAC OS apps with Xamarin and C#. 是的,可以使用Xamarin和C#创建和构建MAC OS应用程序。 Here you have the official Getting Started guide , where you'll find the requirements, such as: 在这里,您有正式的入门指南 ,在那里您可以找到要求,例如:

  • A Mac computer running Mac OS X Yosemite(10.10) or greater. 运行Mac OS X Yosemite(10.10)或更高版本的Mac计算机。
  • Xcode 7 and above Xcode 7及以上版本
  • Xamarin.Mac and Xamarin Studio Xamarin.Mac和Xamarin工作室

Correct me if I'm wrong, but Visual Studio is free in Mac OS only for MSDN subscribers. 如果我错了,请纠正我,但Mac OS中的Visual Studio仅适用于MSDN订阅者。 However, Xamarin Studio is free. 但是,Xamarin Studio是免费的。

Xamarin provides Xamarin.Mac which consists of a set of OS-X API bindings (which in the Unified API version contain many of the same APIs as Xamarin.iOS as 64-bit iOS and OS-X share many of the same Frameworks, in name, function and parameters). Xamarin提供了Xamarin.Mac ,它由一组OS-X API绑定组成(在Unified API版本中包含许多与Xamarin.iOS相同的API,如64位iOS和OS-X共享许多相同的框架,名称,功能和参数)。

That said, you will need to use Xamarin Studio Community Edition on a Mac to do that C#/F# development as Xamarin.Mac is not supported within the Windows/Visual Studio environment. 也就是说,您需要在Mac上使用Xamarin Studio Community Edition来进行C#/ F#开发,因为Windows / Visual Studio环境中支持Xamarin.Mac

From Xamarin's FAQ: 来自Xamarin的FAQ:

Can I still develop Xamarin.Mac apps? 我还可以开发Xamarin.Mac应用程序吗?

Yes! 是! All Xamarin Studio developers on Mac now have the ability to create Mac apps with Xamarin.Mac, in addition to iOS (and tvOS and watchOS). 除了iOS(以及tvOS和watchOS)之外,Mac上的所有Xamarin Studio开发人员现在都可以使用Xamarin.Mac创建Mac应用程序。

Ref: https://www.xamarin.com/faq#xpq9 参考: https//www.xamarin.com/faq#xpq9

There has been a ton of confusion over the new licensing schemes for Xamarin and Visual Studio so one of my coworkers (Amy Burns) put together this great, interactive guide: Licensing Options . 对Xamarin和Visual Studio的新许可方案存在很多困惑,因此我的一位同事(Amy Burns)整理了这本优秀的交互式指南: 许可选项

Just follow through the "options" from the top to the bottom by clicking on the appropriate links in a "choose your own adventure" style. 只需点击“选择自己的冒险”风格中的相应链接,从上到下按照“选项”进行操作。

The short story is this: if you meet the requirements of the license, you can use the Community Edition of Visual Studio or Xamarin Studio to code in Xamarin.iOS (this includes watchOS and tvOS), Xamarin.Android and Xamarin.Mac. 简短的故事是:如果您符合许可证的要求,您可以使用Visual Studio的Community Edition或Xamarin Studio在Xamarin.iOS(包括watchOS和tvOS),Xamarin.Android和Xamarin.Mac中进行编码。

If you don't meet the free license requirements you can purchase Visual Studio standalone or MSDN versions Professional or Enterprise (which includes extra features such as discounts on Test Cloud for Enterprise). 如果您不符合免费许可证要求,则可以购买Visual Studio独立版或MSDN版本Professional或Enterprise(其中包括额外功能,例如Test Cloud for Enterprise的折扣)。 Visual Studio Professional and Enterprise both include Xamarin Studio on Mac of the same level for free (see the Visual Studio Comparison Chart ). Visual Studio Professional和Enterprise都免费提供相同级别的Mac上的Xamarin Studio(请参阅Visual Studio比较图表 )。

Any Apple OS (iOS, watchOS, tvOS or OS X) requires a physical Mac with the latest version of Xcode and Xamarin Studio installed. 任何Apple OS(iOS,watchOS,tvOS或OS X)都需要安装了最新版Xcode和Xamarin Studio的物理Mac。 For all Apple OSes (excluding OS X), the Mac can be networked to a Windows machine running Visual Studio and development done from there. 对于所有Apple操作系统(OS X除外),Mac可以联网到运行Visual Studio的Windows计算机,并从那里完成开发。 Mac OS X development in Xamarin.Mac must be done in Xamarin Studio on a physical Mac. Xamarin.Mac中的Mac OS X开发必须在物理Mac上的Xamarin Studio中完成。 These are Apple's restrictions, not Xamarin or Microsofts. 这些是Apple的限制,而不是Xamarin或Microsofts。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM