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

Add Swift Package Manager support #64

Merged
merged 3 commits into from
Dec 21, 2021

Conversation

mattboran
Copy link
Contributor

@mattboran mattboran commented Jun 20, 2021

This PR adds support for Swift Package manager to this repository.

The same versions of iOS, macOS, and tvOS are supported as before, and the project structure was not changed. This means that the Carthage and CocoaPods versions of this framework still work.

I had to make 2 small changes in ResponseDetectiveSpec.swift:

  1. Ensure buffer is initialized newly in the beforeEach block. Otherwise, running tests in a random order can fail
  2. I replaced stub(condition: isHost... with HTTPStubs.stubRequests; it's possible I configured something incorrectly, but my Swift compiler was unable to find that method.

Please let me know what you think!

@mattboran mattboran force-pushed the feature/swiftpm branch 2 times, most recently from 9f29900 to 6e42aa5 Compare June 21, 2021 00:02
@mattboran mattboran changed the title Feature/swiftpm Add Swift Package Manager support Jun 21, 2021
@mattboran
Copy link
Contributor Author

@akashivskyy could you take a look a this when you get a chance?

@akashivskyy
Copy link
Collaborator

Thanks for your contribution, Matt! Unfortunately, I'm no longer a maintainer of this project. I'm sure @Siemian will know someone who can help you get this PR sorted. Cheers! 🙌

@Siemian
Copy link
Contributor

Siemian commented Oct 20, 2021

Hi @mattboran, thank you for your contribution, i was testing your changes using Xcode 13 and unfortunately, it does not compile properly. Here is what i got:
Zrzut ekranu 2021-10-20 o 08 58 07
Could you confirm if that's working on your side? We would be happy to merge your changes.

Thanks @akashivskyy for the ping!

@mattboran
Copy link
Contributor Author

mattboran commented Oct 30, 2021

@Siemian thanks for taking a look! It looks like I had configured the header paths incorrectly. I have added some additional build settings to the internal Objective-C target. Now, using Xcode 13.0:

  • swift test - builds and tests pass ✅
  • ResponseDetective.xcodeproj - targets still build ✅
  • Demo app with swift package from mattboran:feature/swiftpm: - builds and runs ✅

Please let me know if you're seeing something different on your end!

Edit:
I did notice that ./carthage.sh bootstrap now fails to build Nimble (Xcode 13.0). This is true on the current develop branch as well

@mattboran
Copy link
Contributor Author

Bumping this thread @Siemian 🙂

@Siemian
Copy link
Contributor

Siemian commented Dec 21, 2021

Hi @mattboran i'm really really sorry for keep you waiting for such a long time. I checked and looks ok now, thanks for your contribution 🙇

@Siemian Siemian merged commit f4c120e into netguru:develop Dec 21, 2021
@Siemian
Copy link
Contributor

Siemian commented Dec 21, 2021

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.

3 participants