在 Visual Studio 中使用 MonoTouch 开发 iPhone 应用程序有多容易?
我了解 Monotouch,并且安装了虚拟 MacOS 和 Monodevelop/Monotouch。
然而,是在 Mac OS X 上的 Monotouch 中构建 iPhone 应用程序更好,还是像在 Visual Studio 中构建 iPhone 应用程序并通过 Monotouch 将其移植到 iPhone 一样简单?
有人尝试过将 c# 项目移植到 iPhone 上吗?它与使用 monodevelop/monotouch 在 Mac 操作系统上构建应用程序有什么不同?
附注我最喜欢的帮助实用程序在 mac 操作系统上不存在,这就是这个问题的原因
I know about Monotouch and I have virtual MacOS and Monodevelop/Monotouch installed.
However, is it better to build an iPhone application in Monotouch on Mac OS X or it's as easy as to build iPhone app in Visual Studio and port it to iPhone via Monotouch?
Is there anyone who tried porting c# project to iPhone? How different was it from building the app on mac os using monodevelop/monotouch?
ps. my favourite helper utilities does not exist on mac os and that's the reason for this Q
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
如前所述,要编译应用程序并将其上传以供应用商店使用,或使用模拟器进行调试,您需要在 Mac 上使用 MonoDevelop。
不过,可以在 Visual Studio 2008 或 2010 中编写大部分代码。
我主要使用 Visual Studio 编写了 6 个 Monotouch 应用程序,这些应用程序在应用程序商店中销量不佳。我使用 Windows 和 VS2010 的原因是我使用 Mac 键盘的速度要慢得多,我的 Visual Studio 设置是为了提高速度,而 PC 的处理能力大约是它的两倍。
以下是一些问题和提示:
我在此处。
As mentioned, to compile your applications and upload them for appstore use, or debug using the simulator you'll need to use MonoDevelop on a Mac.
However it is possible to write a large portion of the code in Visual Studio 2008 or 2010.
I've written 6 Monotouch apps that are selling badly in the appstore, using primarily Visual Studio. The reason I use Windows and VS2010 is I'm a lot slower with the Mac keyboard, have my Visual Studio setup for speed, and a PC that is about twice the processing power.
Here's a few gotchas and tips:
I've written a fair amount on the process here.
仅使用 Visual Studio 无法开发 MonoTouch 应用程序。您必须使用 OSX 工具来构建代码并为手机创建包。没有办法解决这个问题,最简单的方法是使用 MonoDevelop。
我和其他开发人员过去所做的就是使用 Visual Studio 为应用程序开发一些 C# 库,因为尽管 MonoDevelop 相当不错,但它仍然远没有 VS 那么好。例如,使用 Resharper 等工具重构代码会容易得多。
在 Visual Studio 中开发应用程序时,您需要处理很多事情;例如:
是我过去 6 个月一直在做的事情:
希望它有所帮助 。 !
You simply can't develop a MonoTouch application just using Visual Studio. You have to use the OSX tools to build the code and create the package for the phone. There's no way to work around that, and the easiest way to do it is using MonoDevelop.
What me and other developers have done in the past is to develop some of the C# libraries for the apps using Visual Studio, because even though MonoDevelop is pretty good, its still far from being as good as VS. Refactoring code, for example, is much easier with tools like Resharper, etc.
When developing the App in Visual Studio, there's a lot of things you'll have to deal with; for example:
So here's what I've been doing for the last 6 months:
Hope it helps!
实际上,随着新的 MonoTouch 版本更名为 Xamarin.iOS,这种情况已经发生了变化,它提供了紧密的 Visual Studio 集成。您仍然需要一台 Mac 来构建和测试,但您可以在 VS 上工作,没有太多障碍。
他们甚至连接了调试器:
在此屏幕截图中,VS 和 OS X 在同一台计算机上运行计算机,但他们不必这样做,因为它们之间存在本地网络连接。
在此处了解更多信息:
请注意,商业版提供 Visual Studio 集成,每个许可证 999 美元。
(该许可证是每人永久的,但您只能获得一年的免费升级。)
This has actually changed with new MonoTouch release rebranded as Xamarin.iOS that offers tight Visual Studio integration. You still need a Mac for building and testing but you can work from VS without much hurdle.
They even hooked up the debugger:
In this screenshot, VS and OS X run on the same computer, but they don't have to, given that there is a local network connection between them.
Read more here:
Note that Visual Studio integration is available in Business edition which is $999 per license.
(The license is perpetual per person but you only get free upgrades for a year.)
MonoTouch 主站点指出:
The MonoTouch home site states:
我认为使用 Visual Studio 时会遇到的一些问题是,
我会坚持在 Mac 上使用 MonoDevelop。
I think some of the problems you are going to have using Visual Studio are
I would stick with using MonoDevelop on the Mac.
由于您需要安装 Apple 的 iPhone SDK(仅适用于 OS X)才能使用 MonoTouch 进行开发,因此您将仅限于在 Mac 上进行开发。
MonoDevelop 是一个相当不错的 IDE,它与 Interface Builder 和 iPhone/iPad 模拟器的集成使得可以使用 MonoTouch 为 iPhone 进行开发一次非常好的经历。
Since you need the Apple's iPhone SDK (which is only available for OS X) installed to develop with MonoTouch you will be limited to developing on a Mac.
MonoDevelop is quite a good IDE, and its integration with Interface Builder and the iPhone/iPad simulator makes developing for iPhone with MonoTouch a pretty nice experience.