Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions sdk/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ let package = Package(
// repoint them. (This mirrors what `react-native spm scaffold` emits.)
.package(name: "ReactNative", path: "../../../../xcframeworks"),
.package(name: "React-GeneratedCode", path: "../../../ios"),
// RNFingerprint.podspec reads this version, so keep the `.upToNextMinor(from: "X.Y.Z")` format.
.package(
url: "https://github.com/fingerprintjs/fingerprint-ios",
.upToNextMinor(from: "4.1.0")
Expand Down
8 changes: 7 additions & 1 deletion sdk/RNFingerprint.podspec
Comment thread
kevinmia marked this conversation as resolved.
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]
Comment thread
kevinmia marked this conversation as resolved.
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
Loading