Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,65 @@ jobs:
- name: Build package
run: yarn prepack


# Compiles the library's Swift (ios/) against the Courier_iOS version pinned in
# courier-react-native.podspec. Nothing else in CI builds iOS, so a Courier_iOS bump that breaks
# the Swift bridge would otherwise pass. Build-only: no secrets, no signing.
build-ios:
runs-on: macos-15
timeout-minutes: 60
concurrency:
group: build-ios-${{ github.ref }}
cancel-in-progress: true
env:
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
LANG: en_US.UTF-8
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: example-085

- name: Cache CocoaPods
uses: actions/cache@v4
with:
path: |
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('example-085/ios/Podfile.lock', 'courier-react-native.podspec') }}
restore-keys: |
${{ runner.os }}-pods-

# `pod update Courier_iOS` rather than `pod install`: bump PRs change the podspec pin without
# touching example-085/ios/Podfile.lock, and install would refuse the stale lock.
- name: Install pods
working-directory: example-085/ios
run: bundle exec pod update Courier_iOS

- name: Check resolved Courier_iOS matches the podspec pin
run: |
PINNED=$(sed -nE 's/.*s\.dependency "Courier_iOS", "([^"]+)".*/\1/p' courier-react-native.podspec)
RESOLVED=$(sed -nE 's/^ - Courier_iOS \(([^)]+)\)$/\1/p' example-085/ios/Podfile.lock)
echo "Pinned: $PINNED Resolved: $RESOLVED"
[ -n "$PINNED" ] && [ "$PINNED" = "$RESOLVED" ]

# ARCHS=arm64 keeps the generic simulator destination from also building x86_64.
- name: Build example app for iOS Simulator
working-directory: example-085/ios
run: |
xcodebuild build \
-workspace CourierReactNativeExample.xcworkspace \
-scheme CourierReactNativeExample \
-configuration Debug \
-destination 'generic/platform=iOS Simulator' \
ARCHS=arm64 \
CODE_SIGNING_ALLOWED=NO \
-quiet
2 changes: 0 additions & 2 deletions example-085/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ if linkage != nil
use_frameworks! :linkage => linkage.to_sym
end

pod 'Courier_iOS', :git => 'https://github.com/trycourier/courier-ios.git', :tag => '5.8.3'

target 'CourierReactNativeExample' do
config = use_native_modules!

Expand Down
22 changes: 7 additions & 15 deletions example-085/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ PODS:
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- courier-react-native (6.0.0):
- Courier_iOS (= 5.8.3)
- courier-react-native (6.0.5):
- Courier_iOS (= 5.8.6)
- hermes-engine
- RCTRequired
- RCTTypeSafety
Expand All @@ -44,7 +44,7 @@ PODS:
- ReactCommon/turbomodule/core
- ReactNativeDependencies
- Yoga
- Courier_iOS (5.8.3)
- Courier_iOS (5.8.6)
- FBLazyVector (0.85.3)
- hermes-engine (250829098.0.10):
- hermes-engine/Pre-built (= 250829098.0.10)
Expand Down Expand Up @@ -2046,7 +2046,6 @@ PODS:
DEPENDENCIES:
- "AsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
- courier-react-native (from `../..`)
- Courier_iOS (from `https://github.com/trycourier/courier-ios.git`, tag `5.8.3`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- RCTDeprecation (from `../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`)
Expand Down Expand Up @@ -2132,16 +2131,14 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- Courier_iOS
- SwiftUIIntrospect

EXTERNAL SOURCES:
AsyncStorage:
:path: "../node_modules/@react-native-async-storage/async-storage"
courier-react-native:
:path: "../.."
Courier_iOS:
:git: https://github.com/trycourier/courier-ios.git
:tag: 5.8.3
FBLazyVector:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
hermes-engine:
Expand Down Expand Up @@ -2306,15 +2303,10 @@ EXTERNAL SOURCES:
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

CHECKOUT OPTIONS:
Courier_iOS:
:git: https://github.com/trycourier/courier-ios.git
:tag: 5.8.3

SPEC CHECKSUMS:
AsyncStorage: 3159283852d8bfabb4653cf17f1a1fef2a8a0eb6
courier-react-native: 5b84aa07199ce2eead79853c01b02c26f9f19115
Courier_iOS: f254b899c73d591b68dc39ff82cbe1f300c2b6f7
courier-react-native: 002b85d85bf12d5106c0661dbe2bab9d2f2aaf45
Courier_iOS: dbbf8a240064a7e5cfa5f9b1400de1ff44dfde7f
FBLazyVector: 24e62c765683b8d89006a88a2c8f5cf019f0074d
hermes-engine: 14b3c4d35cacb173ac74f56426c9062c4e9dbcb4
RCTDeprecation: a4c521821fab57cbb125b36effe84d897d0dfa12
Expand Down Expand Up @@ -2398,6 +2390,6 @@ SPEC CHECKSUMS:
SwiftUIIntrospect: fee9aa07293ee280373a591e1824e8ddc869ba5d
Yoga: 77dfa8673de2874e1855002ae59c68b8be9b007b

PODFILE CHECKSUM: 7ceeb28a915fdc1b064aed5f632a7beaf9fb07b7
PODFILE CHECKSUM: 4861888da3f9f2329f8c6cfcebd2ef724bf0ab29

COCOAPODS: 1.16.2
2 changes: 1 addition & 1 deletion ios/CourierClientModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ internal class CourierClientModule: CourierReactNativeEventEmitter {
try await client.tokens.putUserToken(
token: token,
provider: provider,
device: courierDevice
device: courierDevice ?? CourierDevice()
)
resolve(nil)
} catch {
Expand Down
Loading