0

I have created an application and generated IPA file for development deployment. I am using AFNetworking to make network calls.

The problem is that when I attach the iPhone 5s and run in debug mode everything works fine but when I generate IPA and install it via iTunes it generates AFNetworking error code 200 unacceptable content-type text/html.

I don't understand how that could happen. I created development provisioning profile and made sure that it is used while creating archive.

KSR
  • 1,699
  • 15
  • 22
Manan Devani
  • 434
  • 3
  • 15
  • Can you post code where you call webservice ? – vishnuvarthan Sep 08 '16 at 10:35
  • The error is related to the content type you receive and how you have handled it and not due to the profiles or ipa creation – vishnuvarthan Sep 08 '16 at 10:38
  • see this http://stackoverflow.com/questions/19114623/request-failed-unacceptable-content-type-text-html-using-afnetworking-2-0 – Anbu.Karthik Sep 08 '16 at 10:44
  • I forgot to mention that it happens with all the web services in the application called using AFNetworking. – Manan Devani Sep 08 '16 at 11:21
  • @vishnuvarthan, I know how to handle this error if it does not work at all. But it does work in simulator and on real device if installed using xcode. It does not work only if installed using IPA. – Manan Devani Sep 08 '16 at 11:23
  • Did you try calling the service in browser/print the response data and check if you get the correct response, may be your service got updated or changed when you installed it using IPA. – vishnuvarthan Sep 08 '16 at 13:01
  • Thanks for your reply but I have tried so many times in device and simulator with xcode and itunes but nothing changes. I'm going to try to reinstall pod for `AFNetworking` and check it on tomorrow. Hope it helps. I will reply you with the result. – Manan Devani Sep 08 '16 at 13:21

0 Answers0