Question

So I'm trying to get ObjCMongoDb up and running in an iOS application but I keep getting this error.

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)

I have a feeling that this means that the framework was not compiled for iOS but for Mac OS X.

Does anyone know how to integrate ObjCMongoDb into an iOS application?

Thanks!

Was it helpful?

Solution

To use a framework on iOS you need to build it as a static library, which the Xcode project that's part of ObjCMongoDB doesn't provide a way to do.

The simplest way is to follow the instructions for getting started on Mac OS, which should work equally well on iOS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top