0

所以我试图让 ObjCMongoDb 在 iOS 应用程序中启动并运行,但我一直收到这个错误。

ignoring file /Users/user/Documents/Programming/ObjCMongoDB/ObjCMongoDB.framework/ObjCMongoDB, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6 0x 0 0x 0 0x 0 ) which is not the architecture being linked (armv7): /Users/user/Documents/Programming/ObjCMongoDB/ObjCMongoDB.framework/ObjCMongoDB
Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_BSONDecoder", referenced from:
      objc-class-ref in MongoDbConnection.o
  "_OBJC_CLASS_$_MongoKeyedPredicate", referenced from:
      objc-class-ref in MongoDbConnection.o
  "_OBJC_CLASS_$_MongoUpdateRequest", referenced from:
      objc-class-ref in MongoDbConnection.o
  "_OBJC_CLASS_$_MongoConnection", referenced from:
      objc-class-ref in MongoDbConnection.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我有一种感觉,这意味着该框架不是为 iOS 编译的,而是为 Mac OS X 编译的。

有谁知道如何将 ObjCMongoDb 集成到 iOS 应用程序中?

谢谢!

4

1 回答 1

1

要在 iOS 上使用框架,您需要将其构建为静态库,作为 ObjCMongoDB 一部分的 Xcode 项目不提供这样做的方法。

最简单的方法是按照在 Mac OS 上入门的说明进行操作,这在 iOS 上应该同样适用。

于 2013-08-20T02:23:41.613 回答