Skip to content

#107: Swift Package Manager support #109

Draft
JakubMazur wants to merge 6 commits into
fjcaetano:masterfrom
JakubMazur:master
Draft

#107: Swift Package Manager support #109
JakubMazur wants to merge 6 commits into
fjcaetano:masterfrom
JakubMazur:master

Conversation

@JakubMazur

@JakubMazur JakubMazur commented Jul 17, 2021

Copy link
Copy Markdown

Swift Package Manager Support #107

Swift Package Manager added to both Rx and main target.

  • check pod spec lint
  • check carhage build --archive
  • swift build for iOS target
  • update installation README

Known issues:

  1. AppSwizzle that frameworks is using as test target does not support SPM yet. I open PR with support to SPM there, but project looks abandoned. SPM test target has then dependency to my fork of this project with SPM Support
  2. Currently SPM has a limitation that will resolve all dependencies that Package incudes for any target (not test target) described here as partialy implemented. There is no negative impact on a project exept the fact that the user that is not using Rx version will see resolved package in Xcode that will not be linked to a binary later or usable in a project. Here is my StackOverflow question on this topic that leads me to open ticket SR-8658. AFAIK there is no walkaround for it.

TODO:

#108: after merge and tag a new version update a package to Swift Package Index

* add Package.swift

* Update Package.swift

* scheme build

* add Rx support

* rename from "+"

* set empty dependencies for main target

* update readme
@codecov

codecov Bot commented Jul 17, 2021

Copy link
Copy Markdown

Codecov Report

Merging #109 (2c539e6) into master (0479b14) will decrease coverage by 1.83%.
The diff coverage is n/a.

❗ Current head 2c539e6 differs from pull request most recent head 6de3b67. Consider uploading reports for the commit 6de3b67 to get more accurate results

@@            Coverage Diff             @@
##           master     #109      +/-   ##
==========================================
- Coverage   97.80%   95.97%   -1.84%     
==========================================
  Files           8        8              
  Lines         273      273              
==========================================
- Hits          267      262       -5     
- Misses          6       11       +5     
Impacted Files Coverage Δ
ReCaptcha/Classes/ReCaptchaError.swift 73.91% <0.00%> (-21.74%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0479b14...6de3b67. Read the comment docs.

@JakubMazur

Copy link
Copy Markdown
Author

@fjcaetano you have any idea why codecov showing this? there was no change in this file that could impact coverage in this configuration

@fjcaetano

Copy link
Copy Markdown
Owner

@JakubMazur I apologize for the delay. I tried taking a quick look at this a few days back, but I was having issues when I tried refactoring the Examples project to leverage SPM instead of Cocoapods. I wasn't able to install the package locally, like Cocoapods does with pod 'ReCaptcha/RxSwift', :path => '../'

I'll try to get back to this soon when I'm a bit more free. In the mean time, don't worry about Codecov. It's complaining because this PR reduces code coverage, but that's expected since you're adding config files that aren't testable.

@JakubMazur

Copy link
Copy Markdown
Author

If you want to switch example project to use SPM instead of Cocoapods I can have a look and submit code changes to this PR

* process recaptcha.html

* use module
@JakubMazur JakubMazur marked this pull request as draft September 27, 2021 18:54
@andrewtheis

andrewtheis commented Oct 19, 2021

Copy link
Copy Markdown

@fjcaetano You can drag the folder containing Package.swift directly into the Xcode Project to locally reference the package.

@haemi

haemi commented Mar 12, 2022

Copy link
Copy Markdown

what's the latest state regarding SPM support? Is there a way/branch/... to use ReCaptcha with SPM?

* process recaptcha.html

* use module
@JakubMazur

Copy link
Copy Markdown
Author

@haemi you can use my fork: master branch on https://github.com/JakubMazur/ReCaptcha

but unsure if this will work with Cocoapods as in discussion above. Although it is working with SPM

@mccarron

mccarron commented May 6, 2022

Copy link
Copy Markdown

@fjcaetano Anything we can do to help push this through? One of the last packages not moved over to SwiftPM yet for us.

@emrcftci

Copy link
Copy Markdown

any updates on this? @fjcaetano

@o15a3d4l11s2

Copy link
Copy Markdown

Any updates on the SPM implementation?

@anivaros

anivaros commented Feb 9, 2024

Copy link
Copy Markdown

@fjcaetano Anything we can do to help push this through?

kubbing added a commit to hornet-network/ReCaptcha that referenced this pull request Apr 14, 2026
Cherry-picked from JakubMazur/ReCaptcha PR fjcaetano#109
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.

8 participants