【发布时间】:2011-11-20 08:32:42
【问题描述】:
这是一个非常简单的 Objective-C 控制台应用程序:
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
NSLog(@"Hello world!");
[pool drain];
return 0;
}
我在我的 Mac 上使用 gcc main.m -o main -ObjC -framework Foundation -framework CoreLocation 编译它。
我的 Mac 上也安装了 iOS SDK。如何修改此命令以在我的计算机上编译相同的代码,以便在(越狱的)iOS 设备上使用?
然后我可以通过 ssh 传输可执行文件并使用ldid 对其进行签名。
【问题讨论】: