2

Is it possible to use mongoDB locally in an iOS app? Or do I have to convert the data to SQLlite?

user3142695
  • 15,844
  • 47
  • 176
  • 332

4 Answers4

3

MongoDB Realm is your solution! check here

Alessio Campanelli
  • 970
  • 11
  • 19
1

For local data storage on iOS device from your app you should consider CoreData as the recommended approach or go for SQLite. There is no mongodb for iOS.

Gurdev Singh
  • 1,996
  • 13
  • 11
1

Since you were looking at mongoDB, I would assume that you were looking at a NoSQL alternative and/or specifically a JSON based Document store for your local storage. In that case, as noted above, MongoDB does not have a local storage option for mobile apps. You may want to look into Couchbase Mobile which includes Couchbase Lite which is NoSQL embedded storage for iOS, Android, Windows. Depending on your needs, you can use Couchbase Lite in standalone mode or you can sync your data to the cloud via Couchbase Sync gateway and persist data in the cloud using Couchbase Server.

Some other considerations to be factored into your choice of mobile database - platforms to be supported, type of data to be stored (structured, semi-structured, unstructured) - the importance of a schema/ data model, how frequently do you expect your data model to evolve - need for data migrations ,data sync capabilities among others

rajagp
  • 1,443
  • 8
  • 10
0

No, Mondodb is a DB storage system designed for backend enviroments. For iOS os recommended use CoreDate. But if you looking for storage NoSql, i recommend use Realm or CouchBase

Realm: https://realm.io/

CouchBase: https://developer.couchbase.com/documentation/mobile/current/installation/ios/index.html This tecnologys can work with any API and you can storage values from any source.