Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 25, 2025

CocoaPods was attempting to import Bridge.h in the generated umbrella header, but this file contains only #pragma once with no Objective-C declarations, causing build failures.

Changes

  • Modified ReactNativeHealthkit.podspec to explicitly declare only ExceptionCatcher.h as a public header
  • Changed from s.public_header_files = "ios/**/*.h" to s.public_header_files = "ios/ExceptionCatcher.h"

Bridge.h remains in source files but is no longer exposed in the module's public API, preventing CocoaPods from including it in the umbrella header.

Original prompt

This section details on the original issue you should resolve

<issue_title>Build error</issue_title>
<issue_description>Hi guys, I'm trying to switch over here from react-native-health, but my builds keep failing because of this, couldn't find anything similar in other issues. Does anyone know how to resolve this?

❌  (ios/Pods/Target Support Files/ReactNativeHealthkit/ReactNativeHealthkit-umbrella.h:13:9)

  11 | #endif
  12 | 
> 13 | #import "Bridge.h"
     |         ^ 'Bridge.h' file not found
  14 | #import "ExceptionCatcher.h"
  15 | #import "AggregationStyle.hpp"
  16 | #import "AuthDataTypes.hpp"

› Compiling react-native-nitro-modules Pods/NitroModules » Promise.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » ObjectUtils.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » NitroTypeInfo.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » NitroLogger.mm
› Compiling react-native-nitro-modules Pods/NitroModules » NativeNitroModules+OldArch.mm
› Compiling react-native-nitro-modules Pods/NitroModules » NativeNitroModules+NewArch.mm
› Compiling react-native-nitro-modules Pods/NitroModules » JSICache.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » InstallNitro.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » HybridObjectRegistry.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » HybridObjectPrototype.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » HybridObject.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » HybridNitroModulesProxy.cpp
› Compiling react-native-nitro-modules Pods/NitroModules » Dispatcher.cpp
    Run script build phase '[CP-User] [RNFB] Core Configuration' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'Kalqulate' from project 'Kalqulate')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNWorklets' from project 'Pods')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'ReactCodegen' from project 'Pods')
    Run script build phase 'Create Symlinks to Header Folders' will be run during every build because it does not specify any outputs. To address this issue, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RNReanimated' from project 'Pods')

› 1 error(s), and 5 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.
# package.json
"dependencies": {
    "@kingstinct/react-native-healthkit": "^13.0.1",
    "react": "19.1.0",
    "react-native": "0.81.5",
    "react-native-nitro-modules": "^0.31.10",
  }
```</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Dec 25, 2025

⚠️ No Changeset found

Latest commit: a760b87

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI changed the title [WIP] Fix build error related to missing Bridge.h file Fix iOS build error: exclude empty Bridge.h from public headers Dec 25, 2025
Copilot AI requested a review from robertherber December 25, 2025 08:43
@robertherber robertherber mentioned this pull request Dec 28, 2025
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.

Build error

2 participants