我的应用程序出现运行时错误:
2011-05-17 09:42:31.124 rxsync[67464:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSMutableURLRequest setHTTPBodyWithFormMultipartValues:fileNames:contentTypes:usingBoundary:]: unrecognized selector sent to instance 0x4e3cd90'
这个方法,
NSMutableURLRequest setHTTPBodyWithFormMultipartValues: fileNames: contentTypes: usingBoundary:]
, 由属于我的 .xcworkspace 的静态库定义。这是我到目前为止检查过的内容:
OTHER_LDFLAGS = -ObjC
) 中有 ObjC。 (事实上,我的静态库中也有它,因为它基于相同的 xcconfig 文件。)我错过了什么可能性?
我正在使用 Xcode 4.0.2。这是一个 iPhone 目标。
最佳答案
您还需要将 -all_load 添加到使用静态库的目标的其他链接器标志中。
关于xcode - 尽管 Objcflags,"unrecognized selector sent to instance"到静态库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6034283/