Skip to content

feat!: [SDK-5859] drop CocoaPods support, require React Native 0.87+ (2/3) - #2026

Open
fadi-george wants to merge 1 commit into
fadi/sdk-5859from
fadi/sdk-5859-drop-pods
Open

fadi-george wants to merge 1 commit into
fadi/sdk-5859from
fadi/sdk-5859-drop-pods

Conversation

@fadi-george

@fadi-george fadi-george commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Description

One Line Summary

Drop CocoaPods support on iOS and require React Native 0.87+ in Swift Package Manager mode.

Details

Motivation

CocoaPods trunk becomes read-only on Dec 2, 2026. After that, new OneSignalXCFramework versions can't be published there, so CocoaPods apps can't get new native iOS versions. The package already ships a Package.swift (#2018).

Scope

  • react-native-onesignal.podspec is now a stub that stops pod install with migration steps. It can't be deleted: React Native's CLI only autolinks an iOS dependency that has a podspec, even in SPM mode. SPM mode doesn't evaluate it, because the package ships its own Package.swift.
  • Peer dependency react-native >=0.87.0.
  • Delete examples/demo-pods, the demo sync test, and the podspec vs Package.swift version test.
  • Release workflow: read and bump the iOS SDK version in Package.swift only; remove the demo-pods Podfile and lockfile steps.
  • setup-demo action: remove the unused install-pods input and steps.

Breaking change, so this should ship as 6.0.0. Expo apps build with CocoaPods, so they stay on 5.x until Expo supports React Native's SPM mode.

Stack

  1. chore: [SDK-5859] build demo-no-location with Swift Package Manager (1/3) #2025 Build demo-no-location with Swift Package Manager
  2. feat!: [SDK-5859] drop CocoaPods support, require React Native 0.87+ (2/3) #2026 Drop CocoaPods support, require React Native 0.87+ (this PR)
  3. docs: [SDK-5859] document SPM-only iOS setup (3/3) #2027 Document SPM-only iOS setup

Testing

Unit testing

Removed the two tests that only covered demo-pods and the podspec version. vp test, vp check src, vp fmt --check and vp run build pass.

Manual testing

  • With the stub podspec packed into the demo: react-native spm update still autolinks ReactNativeOneSignal (using its own Package.swift), and a Debug simulator build of examples/demo passes.
  • pod ipc spec react-native-onesignal.podspec fails with the migration message.
  • The new Package.swift read/bump sed commands return and update the version on a copy of the file.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@abdulraqeeb33 abdulraqeeb33 left a comment

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.

Approving.

The stub has to stay so autolinking still sees the package, and SPM uses Package.swift instead of evaluating it. pod install stops on the raise. The migration command is npx react-native spm add --deintegrate. The release workflow reads and bumps the version in Package.swift only. examples/demo-pods is gone, and nothing in CI still calls it.

bun.lock still has the peer at >=0.79.0 and installs react-native@0.85.2 (bun.lock:18, bun.lock:670). package.json:59 says >=0.87.0. vp install on this SHA warns incorrect peer dependency "react-native@0.85.2". Update the lockfile. A resolve moves it to 0.88.1, which the demos already use.

Nit: put the swiftpmConfig.name check back. It went out with the podspec version test, and the name check still applies (package.json:78, Package.swift:30).

Nit: the lockfile refresh only runs examples/demo (create-release-pr.yml:223). examples/demo-no-location pins the same tarball.

The stub links to #swift-package-manager-ios. On this commit that section still says CocoaPods apps are unaffected. The docs PR rewrites it and keeps the anchor. Don't publish this commit without that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants