Repository navigation
INTER-2622: Derive podspec Fingerprint-iOS version from Package.swift #285
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,9 @@ | ||
| # Keep CocoaPods and Swift Package Manager on the same patch range (Package.swift is the source of truth). | ||
| fingerprint_lower = File.read(File.join(__dir__, 'Package.swift'))[/\.upToNextMinor\(\s*from:\s*"([\d.]+)"\s*\)/m, 1] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we'll ever use any other dependency in the native module. We can still address it just to be extra safe; your call @kevinmia. One note: if we decide to address it, we should do the same in Flutter.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is your call. I like the suggested change because it is, even though crowded, a lot easier to make sense of because it explicitly mentions the repo URL. It is up to you guys, either way is fine |
||
| raise 'Could not read the Fingerprint-iOS version range from Package.swift' if fingerprint_lower.nil? | ||
| fingerprint_major, fingerprint_minor = fingerprint_lower.split('.').map(&:to_i) | ||
| fingerprint_upper = "#{fingerprint_major}.#{fingerprint_minor + 1}.0" | ||
|
|
||
| Pod::Spec.new do |s| | ||
| s.name = "RNFingerprint" | ||
| s.version = "4.0.0" | ||
|
|
@@ -20,7 +26,7 @@ Pod::Spec.new do |s| | |
| # s.requires_arc = true | ||
|
|
||
| s.dependency "React-Core" | ||
| s.dependency "Fingerprint-iOS", "~> 4.1.0" | ||
| s.dependency "Fingerprint-iOS", ">= #{fingerprint_lower}", "< #{fingerprint_upper}" | ||
|
|
||
| # Wires up the TurboModule/Codegen dependencies (ReactCommon, generated specs, ...) and defines | ||
| # `RCT_NEW_ARCH_ENABLED` for the pod when the app is built with the New Architecture. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: perhaps it would be useful to add a comment next to the
Fingerprint-iOSinPackage.swiftthat mentions which version format should be used so that the sync works here?