I've tried to set the Alamofire.Manager.sharedInstance.session.configuration.HTTPAdditionalHeaders
with my custom HTTP Headers in iOS 7 but I have had no luck.
This works fine in iOS 8.
Does anyone have any suggestions?
I've tried to set the Alamofire.Manager.sharedInstance.session.configuration.HTTPAdditionalHeaders
with my custom HTTP Headers in iOS 7 but I have had no luck.
This works fine in iOS 8.
Does anyone have any suggestions?
I get stuck with the same problem, at the end I come up with the wolfing solution. (I changed a little bit the originally library, so be carefull!)
I was always calling the method:
And I noticed the call to the method:
Just inside this function i inserted one line of code:
with the following result (just to be clear):
I created also a method to pass the values. I hope this will work
I got it working.
This has no effect on iOS7:
This however will work on both iOS7 & 8:
I'm using the NSMutableURLRequest to set custom headers.
Check this example.
Below is the full code which works for iOS 7 and iOS 8
More info : Alamofire Issues - GitHub