ObjCMongoDB
ObjCMongoDB copied to clipboard
Accesing mLab mongodb
To connect using the mongo shell:
mongo ds015962.mlab.com:15962/physio4d -u
Thats the information about my new mongodb that I set up in mLab. On my code I have:
NSError *error = nil; MongoConnection *dbConn = [MongoConnection connectionForServer:@"192.168.1.29:49448" error:&error]; [dbConn connectToServer:@"192.168.1.29:49448" error:&error]; MongoDBCollection *collection = [dbConn collectionWithName:@"physio4d.users"]; //BSONDocument can only read one document. And right now, each user is a document. MongoKeyedPredicate *predicate = [MongoKeyedPredicate predicate];
but I cannot connect to the database.