Repository navigation
Add experimental Swift Package Manager support; CocoaPods :git note - #91
Merged
Merged
Conversation
- Package.swift (RN 0.88+ SwiftPM integration): two targets because SwiftPM cannot mix Swift and Objective-C — RNRefinerObjC (RCT_EXTERN_MODULE bridge) and RNRefiner (Swift implementation + RefinerSDK dependency) — exposed as one RNRefiner product. swiftpmConfig.name = "RNRefiner" in package.json; manifest shipped in the npm package. - update-native-sdk.yml also bumps the RefinerSDK range in Package.swift. - README: SwiftPM section (experimental) and the CocoaPods :git source for RefinerSDK, which is no longer pushed to the CocoaPods trunk. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
….lock The lock pinned RefinerSDK 1.7.1 and no longer resolves against the ~> 2.0.0 podspec. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Package.swiftfor React Native's experimental SwiftPM integration (React Native 0.88+, opt-in vianpx react-native spm). SwiftPM does not allow Swift and Objective-C in one target, so the manifest has two targets —RNRefinerObjC(theRCT_EXTERN_MODULEbridge inRNRefiner.m) andRNRefiner(RNRefiner.swift,MapUtil.swift, depends onRefinerSDKfromhttps://github.com/refiner-io/mobile-sdk-ios) — exposed as a singleRNRefinerproduct. Modelled on the manifest RevenueCat merged forreact-native-purchases.package.json:swiftpmConfig.name = "RNRefiner"(matches the existing module/header prefix) andPackage.swiftinfiles.update-native-sdk.ymlbumps theRefinerSDKrange inPackage.swiftalongside the podspec.pod 'RefinerSDK', :git => 'https://github.com/refiner-io/mobile-sdk-ios.git', :tag => '<version>'(RefinerSDK is no longer pushed to the CocoaPods trunk); new experimental SwiftPM section.CocoaPods remains the default, fully supported path; nothing changes for existing integrations beyond the Podfile line once 2.x ships.
Verified (2026-11-02) in a fresh React Native 0.88.1 app:
npx react-native spm add --deintegrateautolinked the package (libs/RNRefiner), the graph resolvedRefinerSDK 2.0.0from GitHub, both targets compiled, the app built for the simulator and launched. CocoaPods path verified withpod installinexample/(RN 0.79.7) using the Podfile:git/:tagline; the stalePodfile.lock(pinned 1.7.1) is removed in this PR.How to test it
swift package describefrom a copy of this repo placed at<app>/ios/build/generated/autolinking/libs/RNRefiner(with the autolinker'sxcframeworkspackage present) lists both targets.npm install <this repo>,cd ios && npx react-native spm, build in Xcode;initialize+showFormwork.cd example/ios && pod installstill succeeds (CocoaPods path unchanged).Acceptance criteria
Package.swiftresolves under RN's SwiftPM autolinking; CocoaPods integration unchanged.:gitsource.Link to ticket
https://trello.com/c/ywKiYIhs