I have that big project it's for some websites so I made a subclass from AFHTTPSessionManager as service class, everything was working fine till iOS 9 released, then login doesn't work I checked I get token and everything but I can't use them I mean when I request to see my cars for example server sends me that I am not logged in. I used those keys for server exception but didnt work. I am sorry for that lame question.
afnetworking with iOS 9 sessions
463 Views Asked by Hady Nourallah At
2
There are 2 best solutions below
0
Vikram Jain
On
If you’re developing a new app, you should use HTTPS exclusively. If you have an existing app, you should use HTTPS as much as you can right now, and create a plan for migrating the rest of your app as soon as possible.
For a quick hack you can do the following,
Add this to the Info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Related Questions in IOS
- Overlapping UICollectionView in storyboard
- Cannot pod spec lint because of undeclared type errors
- Is the transactionReceipt data present in dataWithContentsOfURL?
- UIWebView Screen Fitting Issue
- ZXingObjC encoding issues
- iOS: None of the valid provisioning profiles allowed the specific entitlements
- How to hide "Now playing url" in control center
- CloudKit: Preventing Duplicate Records
- Slow performance on ipad erasing image
- Swift code with multiple NSDateFormatter - optimization
- iOS 8.3 Safari crashes on input type=file
- TTTTimeIntervalFormatter always returns strings in English
- How do I add multiple in app purchases in Swift Spritekit?
- Setup code for xibs in iOS. -awakFromNb:
- iOS Voice Over only reads out the title of any alert views
Related Questions in AFNETWORKING
- Bulletproof HTTP Monitor for iOS
- In UITableViewCell, UIImageView content repeats after some cells using AFNetworking
- NSURLSession/NSURLConnection HTTP load failed on iOS 9
- AFNetworking 2.0 Cache Issue
- UICollectionView and AFNetworking image doesn't load sometimes
- UITableViewAutomaticDimension + AFNetworking
- AFNetworking on Swift
- Multipart/form-data POST request gets timeout and is never sent using AFNetworking
- What is an appropriate way to handle API loop with progress indicator?
- Uploading an Array of images using AFNetworking
- Wrong content-type received (AFNetworking bug)?
- From ASIHTTPRequest to AFNetworking
- Replacing NSURLConnection with AFNetworking
- Block set by setDataTaskWillCacheResponseBlock on AFHTTPSessionManager is never called
- AFNetworking JSON RESTful Service parameters
Related Questions in IOS9
- BETA iOS9 deployment to test devices
- CFNetwork SSLHandshake failed iOS 9
- Can UIStackView also be used within a UITableViewCell?
- XCODE 7 App on Device Crashing
- iOS9 with Xcode 7 beta breaks AFNetworking
- Registering for local notification returns UIUserNotificationTypeNone after user chooses "Allow" on iOS9
- NSURLSession/NSURLConnection HTTP load failed on iOS 9
- How do I load an HTTP URL with App Transport Security enabled in iOS 9?
- Find User Name or First/Last Name in iOS9 CloudKit / ABPerson (ABAddressBook)
- Install app on iOS without Apple Developer Program (Xcode 7)
- Xcode 7 beta NSURLConnection error
- Linking error when building Parse in Xcode 7
- Swift 2.0 Core Spotlight API - search only for title
- UIStackView Layout
- Is it possible to opt your iPad app out of multitasking on iOS 9
Related Questions in AFHTTPSESSIONMANAGER
- No visible @interface for 'AFHTTPSessionManager' declares the selector 'POST:parameters:progress:success:failure:'
- File uploading progress issue
- iOS AFNetworking 2.0 how to make AFHTTPSessionManager to automatically apply cookies for a domain?
- AFNetworking 3 uploadTaskWithRequest / uploadTaskWithStreamedRequest handlers not called
- how to get status code from success block I am using AFHTTPSessionManager?
- How to provide unique id to get match details with CricAPI?
- Raw XML Post using AFHTTPSessionManager
- AFHTTPSessionManager subclass swift
- AFHTTPSessionManager http registration, Objective-C IOS
- Confused about Alamofire sessionmanager
- The data couldn’t be read because it isn’t in the correct format -objective c
- AFNetworking 3.x what is the different between AFHTTPSessionManager and AFURLSessionManager?
- Added header in network request using AFNetworking not working
- AFHTTPSessionManager to use SOAP based service
- Passing Parameters Using AFNetworking in swift
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I solved my problem by adding this method to my subclass of AFHTTPSessionManager
so it's like every time I create data task I will just force it to send the header.