Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion sdk/RNFingerprint.podspec

Copy link
Copy Markdown
Contributor

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-iOS in Package.swift that mentions which version format should be used so that the sync works here?

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]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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"
Expand All @@ -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.
Expand Down