xcode Apple/iPhone 开发 IDE 偏好?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/983206/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:36:44  来源:igfitidea点击:

Apple/iPhone Development IDE Preferences?

iphoneobjective-cxcode

提问by Eddie

I'm going to do something I never thought I'd do... learn how to program for Apple hardware . After working in C, C++, C#, .NET, and even in the golden days of DOS (a little DOS4G/W memory extender in Borland Turbo-C, anyone?) and even as a kid, playing around with Atari 8-Bit Turbo-BASIC, I feel a little traitorous on multiple levels :) Anyway, I'm going to grad school, studying music full-time - it'll be the first time in years I won't have a full-time programming gig - and I thought it would be fun to pick-up some Objective-C in my free-time - and maybe a little extra pocket change (one can always hope :)

我要做一些我从未想过会做的事情……学习如何为 Apple 硬件编程。在使用过 C、C++、C#、.NET,甚至在 DOS 的黄金时代(Borland Turbo-C 中的一个小小的 DOS4G/W 内存扩展器,有人吗?),甚至在小时候,玩过 Atari 8-Bit Turbo-BASIC,我在多个层面上都觉得有点叛逆:) 不管怎样,我要读研究生,全日制学习音乐——这将是多年来我第一次没有全职编程演出- 我认为在我的空闲时间拿起一些 Objective-C 会很有趣 - 也许还有一些额外的零钱(人们总是希望:)

So, to the point of the post. I'm very used to Visual Studio, the designer, the XAML editor, the code-behind, blah blah blah. A friend pulled up X-Code on his little MacBook to show off how cool it's supposed to be. Sure, it has the same sorts of things as VS overall, but it seemed a little more scattered then I'd like. I'm sure once I got used to it, it would be fine, but I was just wondering if there are other good, free (or almost free)/or open-source editors out there for the Intel-based Apples that could also handle iPhone development. Or any tips on getting into xCode?I've just decided to do this, so I feel like I'm starting from scratch. I'm not slamming X-Code... I haven't really used it yet. I was just wondering what coders' preferences are.

所以,到了帖子的重点。我非常习惯 Visual Studio、设计器、XAML 编辑器、代码隐藏,等等。一位朋友在他的小 MacBook 上拉起 X-Code 来炫耀它应该有多酷。当然,它具有与 VS 整体相同的东西,但它似乎比我想要的更分散。我敢肯定,一旦我习惯了它,那就没问题了,但我只是想知道是否还有其他好的、免费(或几乎免费)/或开源编辑器适用于基于 Intel 的 Apple,它们也可以处理 iPhone 开发。或有关进入 xCode 的任何提示?我刚刚决定这样做,所以我觉得我是从头开始的。我不是在抨击 X-Code……我还没有真正使用过它。我只是想知道程序员的偏好是什么。

Thanks for any advice!

感谢您的任何建议!

回答by Barry Wark

There really is no alternative IDE on OS X for writing native applications. Some dislike the Xcode built-in editor, however. One very popular alternative is TextMate(non-free, but well worth the ~$50). Xcode can be configured to use your editor of choice for editing text files. Free alternatives include Emacsand Vimports for OS X.

OS X 上确实没有其他 IDE 可用于编写本机应用程序。然而,有些人不喜欢 Xcode 内置编辑器。一种非常流行的替代方案是TextMate(非免费,但非常值得~50 美元)。Xcode 可以配置为使用您选择的编辑器来编辑文本文件。免费替代品包括适用于 OS X 的EmacsVim端口。

You can, of course, use the gcc toolchain without Xcode (e.g. using one of the Unix-style build systems such as Make). You can also use xcodebuildat the terminal command line to build an Xcode project without using the Xcode GUI at all (you'd be hard-pressed to configure and manage the project without the GUI, however). Combining these two, one could cobble together an IDE from e.g Eclipseto build an OS X app. iPhone would be harder since Xcode handles certificate signing etc. for you, but still possible. You would loose all of the nice Objective-C completion and documentation integration you get from Xcode, of course.

当然,您可以在没有 Xcode 的情况下使用 gcc 工具链(例如,使用一种 Unix 风格的构建系统,例如 Make)。您还可以xcodebuild在终端命令行中使用以构建 Xcode 项目,而根本不使用 Xcode GUI(但是,您将很难在没有 GUI 的情况下配置和管理项目)。将这两者结合起来,就可以将Eclipse 中的 IDE 拼凑在一起,以构建一个 OS X 应用程序。iPhone 会更难,因为 Xcode 会为您处理证书签名等,但仍有可能。当然,您会失去从 Xcode 获得的所有优秀的 Objective-C 完成和文档集成。

So, in summary, Xcode is pretty much the only game in town. It will undoubtedly take a while to get used to coming from VS. In particular, code generation is almost unheard of in the Cocoa world. When you feel yourself searching for those kind of tools, train yourself to try a different approach. Objective-C's late-binding combined with the power of NIB/XIB (bundles produced in Interface Builder that describe the UI of an app; XIB is a newer, version-control-friendly XML-based format that is automatically compiled into a NIB, the old-style format from NextStep days) makes code generation unnecessary.

所以,总而言之,Xcode 几乎是城里唯一的游戏。毫无疑问,习惯来自 VS 需要一段时间。特别是代码生成在 Cocoa 世界中几乎闻所未闻。当您觉得自己正在寻找这类工具时,请训练自己尝试不同的方法。Objective-C 的后期绑定结合 NIB/XIB(在 Interface Builder 中生成的描述应用程序 UI 的包;XIB 是一种更新的、版本控制友好的基于 XML 的格式,它会自动编译为 NIB, NextStep 时代的旧式格式)使代码生成变得不必要。

For non-Cocoa/iPhone development, the ecosystem is naturally larger. Nokia has their own IDEfor the Qt toolkit which can be used to write OS X (but not iPhone) apps. Eclipsecan be used to write Java apps using any of the Java toolkits (including SWT and the Qt-Java framework, QtJambi).

对于非 Cocoa/iPhone 开发,生态系统自然更大。诺基亚有自己的 Qt 工具包IDE,可用于编写 OS X(但不是 iPhone)应用程序。Eclipse可用于使用任何 Java 工具包(包括 SWT 和 Qt-Java 框架 QtJambi)编写 Java 应用程序。

For pure Windows-developer familiarity, there's also Monowhich runs on OS X. MonoDevelopmay run on OS X, but I'm not sure.

对于纯粹的Windows开发者熟悉,这里还有单声道它运行在OS X上的MonoDevelop可以在OS X上运行,但我不知道。

回答by jr3

I think XCode is the most popular choice amongst Cocoa developers. I think the best thing you could do is go straight into writing apps and exploring.

我认为 XCode 是 Cocoa 开发人员中最受欢迎的选择。我认为你能做的最好的事情就是直接开始编写应用程序和探索。

http://cocoadevcentral.com/- Has some great tutorials, they're also usually very screenshot friendly.

http://cocoadevcentral.com/- 有一些很棒的教程,它们通常也非常适合截图。

回答by Adam B

For pure ease XCode will be the way to go since it integrates with the iPhone simulator and Interface Builder. Also, when you want to deploy your app to an actual device XCode does the certificate installation and management. I don't have experience with any other IDE's for OSX though so I can't 100% answer your question. But, these are things you'll want to be aware of during your investigation.

为了简单起见,XCode 将成为首选,因为它与 iPhone 模拟器和 Interface Builder 集成。此外,当您想将应用程序部署到实际设备时,XCode 会进行证书安装和管理。我没有使用任何其他 OSX IDE 的经验,所以我不能 100% 回答你的问题。但是,这些是您在调查期间需要注意的事情。

Let us know what you find!

让我们知道你发现了什么!