Skip to content

feat(ios): pull Courier_iOS 6.0.8 through Swift Package Manager (6.1.0) - #74

Closed
mikemilla wants to merge 4 commits into
mainfrom
mike/c-22201-spm
Closed

mikemilla wants to merge 4 commits into
mainfrom
mike/c-22201-spm

Conversation

@mikemilla

@mikemilla mikemilla commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Pulls Courier_iOS through Swift Package Manager on React Native 0.75+, and releases as 6.1.0. CocoaPods trunk stopped taking Courier_iOS releases after 6.0.7 (it goes read-only on December 2, 2026), so a podspec dependency on Courier_iOS can't reach anything newer.

Changes

  • Podspec: when spm_dependency is available (React Native 0.75+), the podspec adds courier-ios as a Swift package to the Pods project, pinned exactly. Older React Native falls back to s.dependency "Courier_iOS" and stays on the last version published to trunk.
  • Two pins: courier_ios_version (6.0.8) feeds spm_dependency and moves with every Courier_iOS release. courier_ios_trunk_version (6.0.7) is the CocoaPods fallback and stays on the last version trunk has, so older React Native never asks trunk for a version it doesn't have.
  • Version: 6.1.0 in package.json and both native agent strings.
  • Example: Podfile.lock no longer lists Courier_iOS. The Swift Package Manager lockfile Xcode writes is gitignored, since the podspec pins the version exactly.
  • CI: build-ios runs pod install, because pod update Courier_iOS fails now that it isn't a pod. It fails if Podfile.lock still lists Courier_iOS, and checks that the resolved package matches the podspec pin.

Testing

Rebuilt 2026-11-06 on main + 6.0.8: pod install adds Courier_iOS as a Swift package and Podfile.lock no longer lists it; the workspace resolves courier-ios 6.0.8; the Release build succeeds on Xcode 27.2. The end-to-end run on 6.0.8 (sign in, inbox, push, preferences) is next, once the example's key is updated.

Earlier testing (Nov 3, on 5.9.0):

example-085 (React Native 0.85.3), iPhone 16 Pro simulator, Xcode 27.

  • Default static libraries:
    • Debug and Release build.
    • One copy of Courier_iOS is linked, and its resource bundle is embedded.
    • Signed in, the native inbox loads messages and the native preferences screen loads topics.
  • USE_FRAMEWORKS=static: Release builds and the inbox loads. Debug fails to link on React Native's own debug-only symbols (facebook::react::Sealable, getDebugProps). main fails the same way with Courier_iOS from CocoaPods.

spm_dependency prints a warning that SPM packages with static linking "might cause linker errors". Neither static setup above showed any for Courier_iOS.

Notes

  • Apps that add a notification service extension should link Courier_iOS to it through SPM too.
  • The Expo example wasn't rebuilt. Its Podfile.lock still lists the Courier_iOS pod until its next pod install.
  • Seen while testing, also on main: after the app relaunches, the inbox reports "Courier Inbox is not initialized" until the user signs in again.

🤖 Generated with Claude Code

CocoaPods trunk stops accepting new podspecs on December 2, 2026, so a
podspec dependency on Courier_iOS can't reach versions released after that.
On React Native 0.75+, declare it with spm_dependency instead: CocoaPods adds
courier-ios as a Swift package to the Pods project and resolves it from the
GitHub tag. React Native versions without spm_dependency fall back to
s.dependency and stay on the last Courier_iOS published to trunk.

The pin moves into a courier_ios_version variable that both paths share.

Tested on the example app (React Native 0.85, iOS Simulator): Debug and
Release with the default static libraries, and Release with
USE_FRAMEWORKS=static. Courier_iOS's resource bundle is embedded, and the
native inbox and preferences views load messages.

CI installs pods with `pod install` (Courier_iOS is no longer a pod), checks
Podfile.lock doesn't list it, and checks the Swift package resolved to the
podspec's pin.

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

linear Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

C-22201

C-22272

mikemilla and others added 3 commits November 3, 2026 11:49
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mikemilla mikemilla changed the title feat(ios): pull Courier_iOS through Swift Package Manager feat(ios): pull Courier_iOS 6.0.8 through Swift Package Manager (6.1.0) Nov 6, 2026
@mikemilla

Copy link
Copy Markdown
Collaborator Author

Closing for now. We're shipping the CocoaPods releases first and will pick up Swift Package Manager later. The branch stays so this can be reopened.

@mikemilla mikemilla closed this Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant