简体   繁体   English

从命令行构建iPhone应用程序,不使用xcodebuild

[英]Building an iPhone application from the command line, without xcodebuild

It is possible to build an iPhone application manually, without using xcodebuild nor an Xcode project? 可以手动构建iPhone应用程序,而无需使用xcodebuild或Xcode项目?

The idea is to build the application using SCons without creating an Xcode project. 我们的想法是使用SCons构建应用程序而不创建Xcode项目。 I know there is the codesign command line tool, that I could use, but before I start reverse engineering the Xcode build process, I was wondering if anybody has experience with this or has done it before. 我知道有一些我可以使用的codesign命令行工具,但在我开始对Xcode构建过程进行逆向工程之前,我想知道是否有人有过这方面的经验或之前已经完成过。

Yes, It's possible to write a makefile using gcc. 是的,可以使用gcc编写一个makefile。 You're going to want to set your GCC to use frameworks from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/ (frameworks being in system/library/frameworks, and usr/lib). 您将要设置GCC以使用/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.2.sdk/中的框架(框架位于system / library / frameworks和usr / lib中)。

As far as specifics, I think you're going to have to work that out yourself - but pay careful consideration to the architecture options in GCC and you should have something working quickly. 至于细节,我认为你将不得不自己解决这个问题 - 但要仔细考虑GCC中的架构选项,你应该有一些快速的工作。

Xcode just wraps gcc/g++ and ld (and yes, codesign). Xcode只包装gcc / g ++和ld(是的,代码签名)。 Take a look at any Xcode project build output and you'll see what commands it uses. 看看任何Xcode项目构建输出,你会看到它使用的命令。 I believe the key to building an iphone app is the -arch parameter. 我认为构建iphone应用程序的关键是-arch参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM