Repository navigation
chore: [SDK-5818] build the demo with Swift Package Manager (4/4) - #2021
Merged
Merged
Conversation
This was referenced Nov 20, 2026
fadi-george
force-pushed
the
fadi-sdk-5818-demo-spm
branch
from
November 20, 2026 21:53
e4e2a45 to
4d2f016
Compare
sherwinski
approved these changes
Nov 20, 2026
sherwinski
left a comment
Contributor
There was a problem hiding this comment.
nit: after this PR it appears that no CI job builds the CocoaPods integration. Just flagging that in case it's unintentional, or I missed something.
Move examples/demo's iOS app to React Native's SwiftPM mode so the SDK's Package.swift has a reference app; demo-pods keeps the CocoaPods build. The extension targets link OneSignal-XCFramework products directly. react-native-screens, async-storage, and vector-icons ship no manifest yet, so patches add scaffolded ones with fixes for SwiftPM's header and resource rules. A path-filtered workflow builds the demo on PRs that touch the SDK's iOS code or the demo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@react-native-community/cli 21 detects SPM projects by the .spm-injected.json marker, so the demo no longer needs a Podfile for the CLI to find its iOS project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fadi-george
force-pushed
the
fadi-sdk-5818-demo-spm
branch
from
November 21, 2026 02:07
4d2f016 to
b6adad4
Compare
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.
Description
One Line Summary
Move
examples/demo's iOS app to React Native's Swift Package Manager mode and build it in CI and E2E.Details
Motivation
The SDK's
Package.swift(PR 1) needs a reference app and a CI build; nothing else compiles it.demo-pods(PR 3) keeps the CocoaPods build.Scope
react-native spm add --deintegrate: SPM packages injected intodemo.xcodeproj, CocoaPods removed (Podfile,Podfile.lock, workspace, Gemfile). RN's generatedReactNativeSPM/folder and.spm-injected.jsonare committed since the project references them.@react-native-community/cli21.0.0 indemoanddemo-pods(kept in sync by the demo sync test). CLI 20 only finds the iOS project through a Podfile; 21 detects SPM projects by.spm-injected.json(feat: detect Swift Package Manager projects react-native-community/cli#2858), so the demo has no Podfile.OneSignal-XCFrameworkdirectly: NSE →OneSignalExtension, widget →OneSignalFramework(forOneSignalLiveActivities). Range>= 5.0.0 < 6, so the SDK's exact pin decides the version.spm updatekeeps these.react-native-screens,@react-native-async-storage/async-storage, andreact-native-vector-iconsship noPackage.swift, sopatches/adds scaffolded ones (react-native spm scaffold, applied by Bun). Hand fixes on top of the scaffold output:resources: [.copy("Fonts/*.ttf")]; the two fonts the app uses are added to the app target soUIAppFontskeeps working.ios/RNCAsyncStorage.has an umbrella header and reject the.xcodeprojbeside it.common/cpp/react/renderer/componentsheader search path forrnscreens/...imports.update:spmreplacesupdate:pods;preiosruns it.ios-spm.ymlworkflow: Debug simulator build of the demo on PRs touchingPackage.swift,ios/,package.json, orexamples/demo/.update:spminstead ofpod update, archive fromdemo.xcodeproj, DerivedData cache keyed onbun.lockand the pbxproj and restored before generation (it sharesios/build).demo-pods' Podfile and lockfile..prettierignoreskips RN's generated.spm-injected.json.Most of the diff is generated (pbxproj, scheme pre-action, RN's SPM scripts, patches).
Stack
demo-podsappTesting
Manual testing
On an iOS 27 simulator, fresh install of the Release build: SDK created a user and push subscription, permission prompt, login with an external ID round-tripped, and MaterialIcons glyphs render. Both extensions resolve OneSignal frameworks through
@executable_path/../../Frameworks. Debug build also passes from a cleanios/buildaftervp run preios. After the CLI 21 bump:react-native configreportsbuildSystem: "spm"with no Podfile,spm updateand a Debug simulator build pass, anddemo-podsstill resolves the same pods. E2E's Releaseiphoneosarchive fromdemo.xcodeprojsucceeds locally unsigned, with both extensions, the OneSignal frameworks, andmain.jsbundle; the signed E2E run happens on the nextrel/**push or a manual dispatch.Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code