Skip to content

Commit 0894462

Browse files
jamesnroktclaude
andauthored
feat: Add SPM hybrid bridge for mParticle-Apple-SDK iOS dependency (#283)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8ee3d77 commit 0894462

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

react-native-mparticle.podspec

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,16 @@ Pod::Spec.new do |s|
2525
s.dependency "React-Core"
2626
end
2727

28+
# Primary: CocoaPods dependency (still works when SPM is not used)
2829
s.dependency 'mParticle-Apple-SDK', '~> 8.0'
30+
31+
# SPM bridge: registers mParticle-Apple-SDK as an SPM dependency alongside CocoaPods (RN 0.75+).
32+
# See: https://github.com/facebook/react-native/pull/44627
33+
if respond_to?(:spm_dependency, true)
34+
spm_dependency(s,
35+
url: 'https://github.com/mParticle/mparticle-apple-sdk.git',
36+
requirement: { kind: 'upToNextMajorVersion', minimumVersion: '8.0.0' },
37+
products: ['mParticle-Apple-SDK']
38+
)
39+
end
2940
end

0 commit comments

Comments
 (0)