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:
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.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
Post a Comment