Added fix for Xcode 12 - Warnings related to iOS 8 support (Cocoapods) #345
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Description
Fix warnings generated by Xcode 12 related to iOS 8 support for users of the OHHTTPStubs cocoapod, similar to how PR #328 addressed these same warnings for those using OHHTTPStubs with SPM.
Motivation and Context
This PR eliminates Xcode 12's warnings related to support of iOS 8 both for users of the pod, and for the OHHTTPStubs unit tests. I also fixed warnings about of the use of deprecated NSURLConnection method sendAsynchronousRequest by replacing them with NSURLSession dataTaskWithRequest, and disabled the deprecation warning for sendSynchronousRequest since the synchronous call is specifically required for the test.
I ran and passed all four unit test targets locally after the changes.
Note: I did NOT commit the changes to the generated Pods project file due to the large number of diffs. It appears it has not has updates committed for quite a while and is out of date. I could provide another PR that modernizes the project a bit, using Cocoapods 1.10.1 and AFNetworking 4.0.1 for best pod and SPM support with Xcode 12. I believe the update to AFNetworking would require changing the minimum deployment of OHHTTPStubs (at least internally) from macOS 10.9 to 10.10.
Final note: The only change required to eliminate these warnings for consumers of the pod are the two lines in the podspec. If desired, I can close this PR and open another with only that change. I just thought I'd go a little farther and fix the same warnings for the project itself.