Repository navigation
fix(ios): find the delegate header with use_frameworks! - #107
Merged
Merged
Conversation
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>
Merged
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.
Regression in 6.1.1 (#104):
CourierReactNativeDelegate.mimports its own header as"courier-react-native/CourierReactNativeDelegate.h". Withuse_frameworks!, which every app using@react-native-firebasehas, 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 installwithUSE_FRAMEWORKS=static. It builds Release withSKIP_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:
USE_FRAMEWORKS=static(Courier_iOS throughspm_dependency)USE_FRAMEWORKS=static(trunk fallback)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