Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fix for Xcode 12 - Warnings related to iOS 8 support (Cocoapods) #345

Closed
wants to merge 3 commits into from

Conversation

runyonkj
Copy link

@runyonkj runyonkj commented Jul 26, 2021

Checklist

  • I've checked that all new and existing tests pass
  • I've updated the documentation if necessary (no changes)
  • I've added an entry in the CHANGELOG to credit myself

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.

@runyonkj runyonkj closed this Jul 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant