0

I am moving from Parse to open source Parse Server on Amazon Web Services. I have done the following steps,

  • Hosted Parse Server on AWS
  • Migrated Parse DB to MongoDB
  • Tested that the application is pointing to MongoDB and updating on Mongo DB, while using api.parse.com

The last pending step is pointing my app to AWS Parse Server, instead of the default api.parse.com.

I know this can be achieved my using following step:

https://parse.com/docs/server/guide#using-sdks

The question is,

Where to put the code to update ParseMutableClientConfiguration, should I put it into the first view controller?

Also, what is the swift version of the code.

[Parse initializeWithConfiguration:[ParseClientConfiguration configurationWithBlock:^(id<ParseMutableClientConfiguration> configuration) {
   ...

   configuration.applicationId = @"YOUR_APP_ID";
   configuration.clientKey = @"YOUR_APP_CLIENT_KEY";
   configuration.server = @"http://localhost:1337/parse";

   ...

}]];
rickerbh
  • 9,731
  • 1
  • 31
  • 35
Parth Tiwari
  • 855
  • 2
  • 9
  • 23
  • Possible duplicate of [How to connect my Swift app to my Parse Server?](http://stackoverflow.com/questions/35088410/how-to-connect-my-swift-app-to-my-parse-server) – fraxool Feb 15 '16 at 20:43
  • Yes, one unanswered question was where to place the code, but I got my answer, place in AppDelegate – Parth Tiwari Feb 15 '16 at 23:18

1 Answers1

0
Parse.initializeWithConfiguration(ParseClientConfiguration(block: {(configuration:ParseMutableClientConfiguration) -> Void in
configuration.applicationId = "YOUR_APP_ID"
configuration.clientKey = "YOUR_APP_CLIENT_KEY"
configuration.server = "YOUR_PARSE_SERVER_URL"
}))

This needs to be added in the App Delegate file

Parth Tiwari
  • 855
  • 2
  • 9
  • 23