Can one IOS app connect to multiple Parse.com apps?

I am currently developing an IOS app for a business client. They have 7 branches in different locations and I am building one IOS app for 7 branches. Each user chooses their own business at the beginning. I want to create 7 different parsing apps for all branches. My question is, can Parse.com use one IOS app to access multipipe parse.com backend apps?

+3


source to share


2 answers


The answer is no - the database is designed to represent the entire dataset for a given application. Using multiple databases as a secure solution is dangerous and unnecessary.

If you have a Gym client with 7 branches owned by 7 different people, the correct and safe solution here is to create your own backend server that connects to the Parse.com database and only displays the relevant data for each client.



For more information, contact your Parse.com administrator: https://www.parse.com/questions/multiple-databases

0


source


So FYI, this is possible in limited capacity. You can easily create a cloud code endpoint that you can call from a user device via a REST API. So your app is connected to Parse app A, but calls the cloud code endpoint in Parse B app via REST API.



let request = NSMutableURLRequest(URL: NSURL(string: "https://api.parse.com/1/functions/myFunction")!)

request.setValue("App Id", forHTTPHeaderField: "X-Parse-Application-Id")
request.setValue("Rest API key", forHTTPHeaderField: "X-Parse-REST-API-Key")

var error: NSError?
request.HTTPMethod = "POST"
var dataSTR = NSString(data: NSJSONSerialization.dataWithJSONObject(params, options: NSJSONWritingOptions.allZeros, error: &error)!, encoding: NSUTF8StringEncoding)
request.HTTPBody = dataSTR?.dataUsingEncoding(NSUTF8StringEncoding)
NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) { (response, data, error) -> Void in
     // Done
}

      

0


source







All Articles