您是否需要 Xcode 来编写 iPhone 应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3539836/
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
Do you need Xcode to program iPhone apps?
提问by shadow
I'm interested in making apps for the iphone. I was wondering if it were possible to make apps, WITHOUT Xcode. the only reason is because I'm dirt poor, and can't afford an Apple.
我对为 iphone 制作应用程序感兴趣。我想知道是否可以在没有 Xcode 的情况下制作应用程序。唯一的原因是因为我很穷,买不起苹果。
回答by Zoobity Bop
If it's games you're interested in developing, then another option might be to take a look at Unity (http://unity3d.com/). This would let you develop on the PC for free in a friendly environment for a beginner. If you then develop something that you decide you want to publish on iPhone, then at that point you could invest in a Mac and just rebuild the Unity app for iPhone on that.
如果您有兴趣开发游戏,那么另一种选择可能是查看 Unity ( http://unity3d.com/)。这将使您在适合初学者的友好环境中免费在 PC 上进行开发。如果您随后开发了一些您决定要在 iPhone 上发布的内容,那么此时您可以投资购买一台 Mac,然后在其上重新构建适用于 iPhone 的 Unity 应用程序。
Also, Unity lets you write scripts in both C# and Java so you wouldn't have to learn Obj-C.
此外,Unity 允许您使用 C# 和 Java 编写脚本,因此您不必学习 Obj-C。
回答by Weston C
The short answer is no. The long answer is "not exactly," but you can get started in some ways while you're working on getting access to a Mac you can do the work you'd like to do on.
最简洁的答案是不。长的答案是“不完全是”,但是您可以通过某些方式开始使用 Mac,同时您可以完成您想做的工作。
"XCode" is more or less really two things:
“XCode”或多或少实际上是两件事:
(1) an IDE
(1) 一个集成开发环境
(2) a toolchain with a C/ObjC/C++ compiler (really a version of gcc) and a big library of apps
(2) 一个带有 C/ObjC/C++ 编译器(实际上是 gcc 的一个版本)和一个大型应用程序库的工具链
You don't have to use #1 in order to build iPhone Apps, though it's genuinely helpful. You can get by with #2.
您不必使用 #1 来构建 iPhone 应用程序,尽管它确实很有帮助。你可以通过 #2 过关。
But without #2, you're going to have a hard time building an App you can sell in the App store.
但是如果没有#2,您将很难构建可以在 App 商店中销售的 App。
So, it depends on what your goal is.
所以,这取决于你的目标是什么。
If it really is to build an app and get it out there, the easiest path is probably going to be to find some way to get access to a machine running OS (probably 10.5 and up) you can do development on. That might be talking a friend who has one into letting you spend some scheduled time on it, or it might be working and saving up for a used intel-based Mac mini (probably something you could get for $300), or it might be turning a PC you've got into a Hackintosh(or maybe setting up a Hackintosh VM on the PC if you're sharing it with others who might not want it transformed thusly :).
如果真的要构建一个应用程序并将其发布出来,最简单的方法可能是找到某种方法来访问运行操作系统(可能是 10.5 及更高版本)的机器,您可以在其上进行开发。这可能是在说服一个朋友让你花一些预定的时间在它上面,或者它可能正在工作并为使用过的基于英特尔的 Mac mini 存钱(可能是你可以花 300 美元买到的东西),或者它可能正在转向一台您已经进入Hackintosh的 PC (或者,如果您要与可能不希望它如此转换的其他人共享它,则可以在 PC 上设置一个 Hackintosh VM :)。
If your goal is to start learning how to do things while you work out how you're going to do the above, though, the good news is that it's not hard to get a hold of tools that will help you learn the technologies/languages involved in iPhone apps. Like I said earlier, Apple's compiler is really just a version of gcc. You can probably install gcc on your machine and write objective C programs with it. You could also look into GNUStepwhich could help you get familiar with a lot of the concepts and practices underlying how the Cocoa libraries work for the iPhone and OS X. And you could learn OpenGL ES, which would be great help if you ever end up working on an iPhone game.
但是,如果您的目标是开始学习如何做事,同时您要弄清楚如何做上述事情,那么好消息是,掌握可以帮助您学习技术/语言的工具并不难涉及 iPhone 应用程序。就像我之前说的,Apple 的编译器实际上只是 gcc 的一个版本。您可能可以在您的机器上安装 gcc 并用它编写客观的 C 程序。您还可以查看GNUStep,它可以帮助您熟悉 Cocoa 库如何在 iPhone 和 OS X 上工作的许多概念和实践。并且您可以学习 OpenGL ES,如果您最终获得帮助,这将有很大帮助正在开发一款 iPhone 游戏。
回答by Przemys?aw Wrzesiński
Actually You can develop apps without a Mac. You can use a number of languages and tools that enable writing apps for iOS like:
实际上,您可以在没有 Mac 的情况下开发应用程序。您可以使用多种语言和工具来为 iOS 编写应用程序,例如:
- Python
- PhoneGap
- Appcelerator
- Mono
- Unity3D
- Unreal Engine
These all can export to iOS.
这些都可以导出到iOS。
The only step that requires a Mac is publishing to the app store. But You can use any Mac for that, so You can publish from a friend's/neighbour's or actually anyone's Mac. That is the last step when You're sure everything is running perfectly. Perhaps Your application will earn You Your own Mac.
需要 Mac 的唯一步骤是发布到应用商店。但是您可以为此使用任何 Mac,因此您可以从朋友/邻居或实际上任何人的 Mac 发布。当您确定一切正常运行时,这是最后一步。也许您的应用程序将为您赢得您自己的 Mac。
Also there are a number of publishing service providers in the internet (which don't cost nearly as much as a Mac). I don't remember any particular one at the moment, but I'm sure if You search You will find many. Good luck!
互联网上还有许多出版服务提供商(它们的成本几乎没有 Mac 多)。我现在不记得任何一个特定的,但我相信如果你搜索你会发现很多。祝你好运!
回答by mc54
Yes it's possible to develop applications for the mac/ipad/iphone without Xcode and without a mac/ipad/iphone.I own a imac,an ipad,and and a mac book pro.I tried to develop in xcode.
是的,可以在没有 Xcode 和 mac/ipad/iphone 的情况下为 mac/ipad/iphone 开发应用程序。我拥有 imac、ipad 和 mac book pro。我尝试在 xcode 中进行开发。
After some quick search on the internet I found this http://www.gnustep.org/. This is a framework you can use to develop in the objective C language,using GCC (the GNU compiler).There are other tools you can use,like GNU STEP Application project:this seems to be a sort of IDE (I didn't test it yet).
在互联网上进行了一些快速搜索后,我找到了这个http://www.gnustep.org/。这是一个您可以使用目标 C 语言开发的框架,使用 GCC(GNU 编译器)。您还可以使用其他工具,例如 GNU STEP 应用程序项目:这似乎是一种 IDE(我没有测试一下)。
回答by Supertecnoboff
Yes and no. You can use alternative SDK's but they can be a pain to use and don't offer the publish/signing capabilities that Xcode does.
是和否。您可以使用替代 SDK,但它们使用起来很麻烦,并且不提供 Xcode 提供的发布/签名功能。
回答by fogelbaby
In short, you need a mac. There a number of screwed up ways to do this without a mac, but for all intents and purposes you need a mac. A mac mini you can buy used for $300 on ebay will do the trick. You don't need a powerful machine.
简而言之,你需要一台 mac。没有 mac,有许多搞砸了的方法可以做到这一点,但出于所有意图和目的,您需要一个 mac。您可以在 ebay 上花 300 美元购买的 mac mini 就可以解决问题。您不需要强大的机器。
回答by Jorge Israel Pe?a
Unfortunately, although there are 'alternatives' (phonegap, mono touch, etc.) I believe you ultimately need Xcode and its tools to package/sign/publish your applications.
不幸的是,尽管有“替代方案”(phonegap、单声道触摸等),但我相信您最终需要 Xcode 及其工具来打包/签名/发布您的应用程序。
If you are really motivated though, you can look about ways of installing Mac OS X on a PC, though that is beyond the scope of this website.
如果你真的有动力,你可以看看在 PC 上安装 Mac OS X 的方法,尽管这超出了本网站的范围。
回答by Hemant
Though Xcode itself is free it does require an Intel based Mac running Snow Leopard. You have 2 options:
尽管 Xcode 本身是免费的,但它确实需要运行 Snow Leopard 的基于 Intel 的 Mac。您有 2 个选择:
- Buy a refurbished Mac Pro or Mac minifrom Apple website. They are not that expensive. You can use non-Apple peripherals with them to bring down the cost. And you will not be disappointed with quality.
- Use Hackintoshto run the OS X on other Intel platform. Its hacky, difficult (carshes) and illegal.
- 从 Apple 网站购买翻新的 Mac Pro 或Mac mini。它们并没有那么贵。您可以将非 Apple 外围设备与它们一起使用以降低成本。而且您不会对质量感到失望。
- 使用Hackintosh在其他 Intel 平台上运行 OS X。它的hacky,困难(carshes)和非法。
Update:
更新:
For Objective C you can refer a pretty good documentation of Objective C languageat iPhone developer portal. There are many other documents like memory managementand human interface guidelineswhich should help you get started.
对于 Objective C,您可以在iPhone 开发人员门户上参考一份关于Objective C 语言的非常好的文档。还有许多其他文档,如内存管理和人机界面指南,可以帮助您入门。
Once you have developed the familiarity with Objective C, you can then browse through various programming guides on iPhone development centre. If you want to follow a systematic approach, you may refer to "Beginning iPhone Development"book which I found pretty good.
一旦您熟悉了 Objective C,您就可以浏览 iPhone 开发中心的各种编程指南。如果你想遵循一个系统的方法,你可以参考“Beginning iPhone Development”这本书,我发现它很不错。