Skip to content

fix(ios): find the delegate header with use_frameworks! - #107

Merged
mikemilla merged 1 commit into
mainfrom
mike/fix-delegate-import
Nov 16, 2026
Merged

mikemilla merged 1 commit into
mainfrom
mike/fix-delegate-import

Conversation

@mikemilla

Copy link
Copy Markdown
Collaborator

Regression in 6.1.1 (#104): CourierReactNativeDelegate.m imports its own header as "courier-react-native/CourierReactNativeDelegate.h". With use_frameworks!, which every app using @react-native-firebase has, CocoaPods doesn't create that folder, so the pod fails with 'courier-react-native/CourierReactNativeDelegate.h' file not found. 6.1.0 and earlier imported it by name and didn't have the problem.

Fix: try the folder path first (Swift Package Manager), and fall back to the header's name (CocoaPods resolves it through its header map, with or without frameworks).

CI: the iOS job gets a second entry that runs pod install with USE_FRAMEWORKS=static. It builds Release with SKIP_BUNDLING=1, because React Native's own Debug symbols don't link with static frameworks.

Tested on new apps, with an Objective-C file containing the documented import added to each:

Setup Result
React Native 0.89-rc, USE_FRAMEWORKS=static (Courier_iOS through spm_dependency) 6.1.1 failed; with the fix it builds, signs in, and has no duplicate symbols
React Native 0.88, USE_FRAMEWORKS=static (trunk fallback) Builds
React Native 0.88, SwiftPM mode Builds
React Native 0.88, plain CocoaPods Builds

With frameworks, an app's own Objective-C import has to use the module name, <courier_react_native/CourierReactNativeDelegate.h>. That was already true before 6.1.1, and a docs PR adds it.

Ships as 6.1.2.

🤖 Generated with Claude Code

6.1.1 imported the delegate's own header as
"courier-react-native/CourierReactNativeDelegate.h". CocoaPods doesn't
create that folder when an app uses use_frameworks!, as apps with
@react-native-firebase do, so the pod failed to compile. The import now
tries that path (Swift Package Manager) and falls back to the header's
name (CocoaPods, with or without frameworks).

CI adds a static frameworks build of the example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mikemilla
mikemilla merged commit 3cc0ac6 into main Nov 16, 2026
8 checks passed
@mikemilla mikemilla mentioned this pull request Nov 16, 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