JSON parsing with POST parameters using AFNetworking 3.0




Step 1 : Search AFNetworking in github and install the AFNetworking in your project through cocoa pods .

  1.  Go to terminal .
  2.  Open your folder where you have created your project by simply writing cd location of your project. e.g.: cd /Users/SaurabhPc/Desktop/Saurabh 
  3.  Write pod init 
  4. After that write open -a Xcode Podfile in the terminal . This command will open projects pod file .
  5. Add the following command to add AFNewtorking pod to the project


pod 'AFNetworking', '~> 3.0'

    6.  write pod install to install the pod

After few minutes the pod will be added to your project

Step 2 : Open your project using workspace.
  1.  #import <AFNetworking/AFNetworking.h> in your project.
  2. Now add the code to your viewDidLoad to hit web service.


For more post on AFNewtorking visit JSON parsing using AFNetworking

Thankyou :)



Comments

  1. Replies
    1. Hi sujananth

      Your welcome & keep reading

      Thank you 😃

      Delete
    2. Hi sujananth

      Your welcome & keep reading

      Thank you 😃

      Delete
  2. He He saurabh nice blog ,
    have you update fro Swift 3.0.

    thanks

    ReplyDelete
  3. Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
    ios app development course

    ReplyDelete
  4. Thanks for this beautiful post IOS. It is really good for the beginners and I also liked the post.
    IOS Training in Bangalore
    IOS Training in Marathahalli

    ReplyDelete
  5. Thanks for sharing your valuable informationThanks for sharing your valuable information.
    IOS App Development Training
    IOS App Development Course

    ReplyDelete
  6. Broo

    it gave me this error

    Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad request (400)" UserInfo={NSLocalizedDescription=Request failed: bad request (400), NSUnderlyingError=0x600000257100 {Error Domain=com.alamofire.error.serialization.response Code=-1016 "Request failed: unacceptable content-type: (null)" UserInfo={NSLocalizedDescription=Request failed: unacceptable content-type: (null), NSErrorFailingURLKey=https://login.salesforce.com/services/oauth2/token, com.alamofire.serialization.response.error.data=<6572726f 723d756e 73757070 6f727465 645f6772 616e745f 74797065 26657272 6f725f64 65736372 69707469 6f6e3d67 72616e74 25323074 79706525 32306e6f 74253230 73757070 6f727465 64>, com.alamofire.serialization.response.error.response=

    ReplyDelete

Post a Comment

Popular Posts