我听说如果你想开发iPhone应用程序,你需要一台Mac电脑。这是真的吗?

有可能使用Linux开发iPhone应用程序吗?如果是,我需要什么,我从哪里下载必要的工具?


当前回答

我建议使用mac,因为ios模拟器非常适合在应用的早期阶段进行测试。但我知道有一家与我们合作的小公司使用Unity进行开发,所以他们不需要大量的mac。这样,他们只需要一个mac的办公室,这只是编译最终版本。这也意味着它适用于android,但这取决于你的建筑,因为它是一个游戏引擎。你可能想要使用像Sencha Touch Mobile这样的框架来研究web应用

团结:http://unity3d.com/ Sencha Touch: http://www.sencha.com/products/touch/

其他回答

有一个叫做Rhodes的框架。

The concept is based on Ruby on Rails and you develop your mobile app in Ruby and HTML, and you can write your code in a Linux environment. You can then create an account at Rhohub, where you add the code (through GitHub), and it allows you to compile it for iPhone, Blackberry, Android, Windows Mobile and Symbian, all off the same code. You don't have to code in Objective-C for iPhone, nor Java for Android, etc. It does the conversions for you. All you need to do is stick to the Rules for creating an iPhone application (or the Phone's you want to develop for) so it can be accepted at iTunes (or the equivalent market).

这将允许你将应用程序添加到iTunes中。

然而,我还没有找到任何模拟器,这意味着要测试你的应用,你需要把它放在iPhone上,这是一项任务。

我正在使用这个选项,因为我想为所有手机创建应用程序,我已经使用Ruby on Rails。如果你只是想为iPhone开发一款应用,那就投资Mac吧。

希望这能有所帮助。

曾经有一个项目专门解决这个缺陷:iphone-dev

iPhone开发项目的目标是创建一个免费的、可移植的、高质量的工具链,以支持苹果iPhone和其他基于ARM/Darwin平台的嵌入式设备的开发。

在某种程度上,是的,这是可能的。你可以输入Objective-C代码并设置你的项目。您甚至可以使用gcc测试代码的C和c++部分。

你不能做的:

使用界面生成器来设置你的界面,因为它是mac专用的。(不是必需的,但推荐) 编译使用苹果Cocoa类的代码——它们在Linux上不存在。 在模拟器中测试代码——Linux中没有。 为真实设备或应用商店编译代码——所有这些都需要苹果只为OS X提供的工具。

到目前为止,这似乎是真的。苹果提供的唯一SDK仅针对macOS环境。我一直对此感到不安,但我现在正在考虑买一台mac电脑,只是为了开发iPhone。我真的不喜欢他们正在做的事情,我希望有一个好的SDK出现在其他环境中,比如Linux和Windows。

关于SDK的障碍:

The iPhone SDK and free software: not a match Apple's recently released a software development kit (SDK) for the iPhone, but if you were hoping to port or develop original open source software with it, the news isn't good. Code signing and nondisclosure conditions make free software a no-go. The SDK itself is a free download, with which you can write programs and run them on a software simulator. But in order to actually release software you've written, you must enroll in the iPhone Developer Program -- a step separate from downloading the SDK, and one that requires Apple's approval.

我认为他们认为只有macOS用户才能为他们的手机编写程序是相当精英的,而且如果你想发布你的东西,你需要购买100美元的许可证,这真的让业余程序员更加困难。不过,如果这是你需要做的,我打算跳过他们的圈子;我真的很想在我的iPhone上开发一些东西。

我曾尝试将cocos2d-iphone移植到GNUstep,这样你就可以基于cocos2d开发游戏了。但是对于发布,你需要一个mac. cocos2d-GNUstep。