visual-studio Visual Studio 2010 是否支持 iPhone 开发?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/998235/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Does Visual Studio 2010 support iPhone Development?
提问by Chad
Possible Duplicate:
How can I develop for iPhone using a Windows development machine?
Does Visual Studio 2010 support iPhone Development?
Visual Studio 2010 是否支持 iPhone 开发?
回答by Ben Bahrenburg
I believe you can use Mono to develop for the iPhone. You can read more about this here www.mono-project.com/Mono:Iphone
我相信你可以使用 Mono 为 iPhone 开发。您可以在此处阅读更多相关信息 www.mono-project.com/Mono:Iphone
This requires Static compilation, and I've heard the process is pretty difficult at this point. Here is an article that provides some details http://arstechnica.com/open-source/news/2009/01/open-source-mono-framework-brings-c-to-iphone-and-wii.ars
这需要静态编译,我听说这个过程在这一点上非常困难。这是一篇提供一些细节的文章http://arstechnica.com/open-source/news/2009/01/open-source-mono-framework-brings-c-to-iphone-and-wii.ars
If you are beginning iPhone development similar to myself I'd suggest sticking with XCode and the Apple tools. Although they offer a different developer experience then we are used to from Microsoft tools, they seem to have a good helpful community around them.
如果您正在开始与我类似的 iPhone 开发,我建议您坚持使用 XCode 和 Apple 工具。尽管它们提供了与我们习惯于使用 Microsoft 工具不同的开发人员体验,但它们似乎围绕着一个很好的有用社区。
Update: Mono Touch now allows you to do development using MonoDevelop and statically compile for the iPhone. Here is the link with more info http://monotouch.net/
更新:Mono Touch 现在允许您使用 MonoDevelop 进行开发并为 iPhone 静态编译。这是包含更多信息的链接http://monotouch.net/
回答by Dan McClain
回答by Baget
According to my knowlage, the iPhone SDK must be run on Mac OSsystem, so I dont think that you will be able to develop using VS.
据我所知,iPhone SDK 必须运行在Mac OS系统上,所以我认为你不能使用 VS 进行开发。
回答by Kenneth Noland
Okay, I know this post is old, but I feel as though I need to correct some things. First of all, it is entirely possible to develop for iPhone using Visual Studio 2010. The steps required to do so are long and complicated, but basically involve the following
好吧,我知道这篇文章很旧,但我觉得我需要纠正一些事情。首先,完全可以使用Visual Studio 2010为iPhone进行开发,所需的步骤又长又复杂,但主要涉及以下几点
(note: these are rough steps as I don't recall the exact commands I used to invoke these things, but I have managed to get a working ARM CortexA8 and A9 GCC compiler successfully running with the latest iOS Dev SDK on Win 7 x64 and using Visual Studio 2010)
(注意:这些是粗略的步骤,因为我不记得我用来调用这些东西的确切命令,但我已经设法让一个可用的 ARM CortexA8 和 A9 GCC 编译器在 Win 7 x64 和最新的 iOS Dev SDK 上成功运行使用 Visual Studio 2010)
Get Cygwin and make sure you grab the GCC compiler collection.
Get LLVM and the GCC front-end(not sure if Clang works as I haven't tried it)
Get ODCCTools.
Download the latest Xcode(from a torrent if you're on a PC). Note: Due to the fact that Xcode and the iOS SDK use various open source copyleft packages, Apple hasto release the SDK to the general public for free. However, as of iOS 5, they've decided to make it so that only people using the App Store on a Mac can download it. I have attempted to contact Apple to see if they plan on releasing the various packages openly, but I haven't heard a response.
Compile LLVM
Compile ODCCTools. Note: ODCCTools requires some modifications in order for it to work with the latest LLVM GCC Front-end. I've contacted the current owner and he basically told me he is no longer supporting it.
Using the assembler and linker you just compiled from ODCCTools, recompile the GCC front-end.
获取 Cygwin 并确保获取 GCC 编译器集合。
获取 LLVM 和 GCC 前端(不确定 Clang 是否有效,因为我还没有尝试过)
获取 ODCC 工具。
下载最新的 Xcode(如果您使用的是 PC,请从 torrent 下载)。注意:由于 Xcode 和 iOS SDK 使用各种开源的 copyleft 包,Apple必须免费向公众发布 SDK。然而,从 iOS 5 开始,他们已经决定让只有在 Mac 上使用 App Store 的人才能下载它。我曾尝试联系 Apple,看看他们是否打算公开发布各种软件包,但我还没有收到回复。
编译LLVM
编译 ODCCTools。注意:ODCCTools 需要进行一些修改才能与最新的 LLVM GCC 前端一起使用。我已经联系了当前的所有者,他基本上告诉我他不再支持它。
使用刚从 ODCCTools 编译的汇编器和链接器,重新编译 GCC 前端。
At this point, you'll have a working compiler for the iOS platform using all the latest and greatest from the LLVM guys and the fixes and improvements that have been made to GCC(C++0x anyone?). Or, if you're really lazy and you don't want to go through all this hassle, you can use the compiler that is already generated from iphone-devtools. However, doing this will only give you a compiler that doesn't support the CortexA8 or A9 instruction set which means that your application will run a little slower, plus the are using an older version of GCC which means all the fixes and improvements that have been made in the last 4 years will be ignored.
在这一点上,您将拥有一个适用于 iOS 平台的编译器,使用 LLVM 人员提供的所有最新和最出色的内容以及对 GCC(有人是 C++0x 吗?)所做的修复和改进。或者,如果您真的很懒惰并且不想经历所有这些麻烦,您可以使用已经从iphone-devtools生成的编译器。然而,这样做只会给你一个不支持 CortexA8 或 A9 指令集的编译器,这意味着你的应用程序运行速度会慢一点,而且使用的是旧版本的 GCC,这意味着所有的修复和改进都有在过去 4 年中所做的将被忽略。
All you need to do now is configure visual studio.
您现在需要做的就是配置visual studio。
There are a few ways to configure visual studio to accept the new compiler you just made(or downloaded). I opted to use a python script which then generates makefiles and the various project/solution files, but you may want to choose something a little less heavyweight.
有几种方法可以配置 Visual Studio 以接受您刚刚制作(或下载)的新编译器。我选择使用 python 脚本,然后生成 makefile 和各种项目/解决方案文件,但您可能希望选择重量轻一些的东西。
At this point, you should be able to compile for iphone, but in order to run on the iphone you need to jailbreak your phone. Jailbreaking is legal, but it does void your warranty. Once jailbroken, then you can use SSH to upload your executable to the phone and then you're done.
此时,您应该可以为 iphone 编译,但是为了在 iphone 上运行,您需要越狱您的手机。越狱是合法的,但它会使您的保修失效。越狱后,您就可以使用 SSH 将可执行文件上传到手机,然后就大功告成了。
If you want to publish your app on the App Store, you'll still need to get a developer certificate and go through the publishing process outlined by Apple. At this point, you will need a Mac. If all you want to do is develop for the iPhone, then this will allow you to do so, but if you want to publish to the App Store, you will need a Mac.
如果您想在 App Store 上发布您的应用程序,您仍然需要获得开发者证书并完成 Apple 规定的发布流程。此时,您将需要一台 Mac。如果您只想为 iPhone 开发,那么这将允许您这样做,但如果您想发布到 App Store,您将需要一台 Mac。
The reason I went through the pain of doing all of this is because I have a very complicated setup for my continuous integration. I compile for 8 different target machines, 5 different configurations, and deploy and run massive amounts of unit tests. I didn't want to have to setup a different Mac box just to handle the iOS platform when I knew that I could just set it all up to run on one machine. Ultimately, trying to do iOS programming on a Win7 machine if iOS is your target platform is definitely not worth the hassle for ordinary developers.
我经历所有这些痛苦的原因是因为我的持续集成设置非常复杂。我为 8 种不同的目标机器、5 种不同的配置进行编译,并部署和运行大量的单元测试。当我知道我可以将它全部设置为在一台机器上运行时,我不想为了处理 iOS 平台而必须设置不同的 Mac 盒。最终,如果 iOS 是您的目标平台,那么尝试在 Win7 机器上进行 iOS 编程对于普通开发人员来说绝对不值得。
回答by Aditya
Yes it is possible go to this link: http://www.pmbaty.com/iosbuildenv/
是的,可以访问此链接:http: //www.pmbaty.com/iosbuildenv/
回答by Mohammed Shirajum Monir
I don't think visual studio 2010 is supporting native iOS app development. But it is possible to write applications for ios using visual studio 2010. As far as I am concerned, microsoft is trying to make it possible. According to my experiences of developing applications for iOS, I used mac air book, Xcode & iOS sdk for building iOS apps. The main language for building native iOS apps is objective c and the framework is cocoa touch. There is no support for these technolOgies in visual studio and .NET framework, although mono develop is trying a lot iOS is the most advanced OS for mobile devices which is to us from Apple. According to their requirements for developing iOS apps you have to use:
我认为 Visual Studio 2010 不支持原生 iOS 应用程序开发。但是可以使用 Visual Studio 2010 为 ios 编写应用程序。就我而言,微软正在努力使其成为可能。根据我开发 iOS 应用程序的经验,我使用 mac air book、Xcode 和 iOS sdk 来构建 iOS 应用程序。构建原生iOS应用的主要语言是objective c,框架是cocoa touch。在 Visual Studio 和 .NET 框架中不支持这些技术,尽管 Mono 开发正在尝试很多 iOS 是最先进的移动设备操作系统,这是我们从 Apple 那里获得的。根据他们开发 iOS 应用程序的要求,您必须使用:
- Intel based mac OSX.
- Ios sdk
- Xcode or Dashcode.
- 基于英特尔的 mac OSX。
- 开发包
- Xcode 或 Dashcode。
All these are available on only apple mac. So no luck for .NET players. But you can pure c to develop ios apps on widows. Just google it.
所有这些仅在苹果 mac 上可用。所以 .NET 玩家没有运气。但是你可以纯c在寡妇上开发ios应用。只是谷歌它。
I think it made you clear of the ios app developing processes, and it's requirement. Thank you.
我认为它让您清楚了 ios 应用程序开发流程,这是要求。谢谢你。
回答by ist_lion
Due to the libraries used - I'm fairly sure you need to run this on a Mac OS System. You can do some basic gcc compiling using cygwin if you wanted to - but other than that I would think you'll need Mac OS
由于使用的库 - 我相当确定您需要在 Mac OS 系统上运行它。如果您愿意,您可以使用 cygwin 进行一些基本的 gcc 编译 - 但除此之外,我认为您需要 Mac OS
It's why most of us are stuck buying a Mac Mini - getting a putty knife and adding more RAM and then struggling to get our old LCD monitors to work
这就是为什么我们大多数人都坚持购买 Mac Mini 的原因 - 获得一把油灰刀并添加更多内存,然后努力让我们的旧液晶显示器工作
回答by Peter Vrenken
Apple supported development from within Visual Studio would be really great! However, as far as i know Apple has absolutely no intention to release such a thing. Even the usage agreement that all iOS developers have to agree to disallows usage of the SDK on 'non-Apple branded computers'. In my humble opinion, this is really a bad thing because it forces multi-platform applications to be developed on multiple operating systems.
Apple 支持的 Visual Studio 开发真的很棒!但是,据我所知,苹果绝对没有打算发布这样的东西。甚至所有 iOS 开发人员必须同意的使用协议也不允许在“非 Apple 品牌计算机”上使用 SDK。在我看来,这确实是一件坏事,因为它迫使在多个操作系统上开发多平台应用程序。
Because of this, i have started implementing a Visual Studio 2010 package that allows for iOS development from within the IDE. To workaround the SDK agreement compilation is executed on a iOS powered device.
正因为如此,我已经开始实现一个 Visual Studio 2010 包,它允许从 IDE 内进行 iOS 开发。解决方法是在 iOS 驱动的设备上执行 SDK 协议编译。
Development progress (including screenshots) can be folowed on:
开发进度(包括截图)可以关注:
http://www.petervrenken.nl/visual%20studio
http://www.petervrenken.nl/visual%20studio
Greetings,
问候,
Peter Vrenken
彼得·弗伦肯
回答by Rainer
I think it's possible to identify a device/browser on the server side. Therefore, it should be possible to develop server-sided applications that behave like an iPhone app but run in the iPhone's Safari browser. I could very well imagine that with VS2010 the device support is significant for the iPhone in the way that it comes with a special JavaScript Library that your Safari implicitly downloads the first time. The Commerce Server appears to have a support like this already - good news for everybody who is not in love with Objective-C or maybe wants to minimize effort ind iPhone development http://www.microsoft.com/downloads/details.aspx?FamilyID=2df25ab7-f38d-439e-9391-ef8f025e8064&displaylang=en
我认为可以在服务器端识别设备/浏览器。因此,应该可以开发行为类似于 iPhone 应用程序但在 iPhone 的 Safari 浏览器中运行的服务器端应用程序。我可以很好地想象,在 VS2010 中,设备支持对 iPhone 来说意义重大,因为它带有一个特殊的 JavaScript 库,您的 Safari 会在第一次隐式下载该库。Commerce Server 似乎已经提供了这样的支持 - 对于不喜欢 Objective-C 或者可能希望尽量减少 iPhone 开发工作的每个人来说是个好消息 http://www.microsoft.com/downloads/details.aspx? FamilyID=2df25ab7-f38d-439e-9391-ef8f025e8064&displaylang=en

