0

I'm relatively new in iOS development and one of my goals is to communicate with our server and retrieve data from the database.

My question is, how do I add AJAX components/methods in Xcode?

Please forgive my clumsiness but of all the example I've found on the web, they all seem to use AJAX on either web-based apps only, does that mean I have to create a web view within my app to utilize AJAX?

Is there a better/more appropriate method to achieve my goal?

Wain
  • 118,658
  • 15
  • 128
  • 151
J.Doe
  • 1,097
  • 1
  • 16
  • 34

1 Answers1

1

If you want to use Ajax you will have to use something like Cordova. However, objective-C has a way to perform the same action using their own API. Here's another thread talking about this: NSURLConnection deprecated in iOS9

Briefly, you have to go through NSURLSession and send an NSURLRequest object. This is the simplest method for basic Get and Put calls in iOS development, which is what Ajax does most of the time.

Community
  • 1
  • 1