MongoDB with iOS app -


my case is: have ios application, want use mongodb store data.

but when tried connect this:

nserror *error = nil;  self.mongo = [mongoconnection connectionforserver:@"127.0.0.1:27017" error:&error]; 

i receive mogo object null.

can it? if yes, how should it?

okay, let me explain:

  1. your ios app describe trying use connection string contains address 127.0.0.1. localhost adapter, , yet have not heard of mongodb running on ios.

  2. related point above doing wrong thing, again you doing wrong thing. do not want connect application directly mongodb.

for kinds of reasons, security, not want database openly exposed web. has always been , in 2014, remains bad idea.

you need "webservice" of sorts, act go between phone application , database. can find some links in mongodb documentation possible solutions.

otherwise google or build own. rest api's not hard. do not connect directly.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -