react-native-camera-kit: fatal error: 'ReactNativeCameraKit-Swift.h' file not found #import "ReactNativeCameraKit-Swift.h"

Hi, im using the last version “react-native-camera-kit”: “14.0.0-beta11” with react native 0.72.4 and when try build in ios the build crash:

node_modules/react-native-camera-kit/ios/ReactNativeCameraKit/CKTypes+RCTConvert.m:14:9: fatal error: 'ReactNativeCameraKit-Swift.h' file not found #import "ReactNativeCameraKit-Swift.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 2
  • Comments: 15 (4 by maintainers)

Most upvoted comments

I’m developing React Native in an Nx monorepo and I need statically linked Frameworks.

What worked for me was to set ReactNativeCameraKit to also use statically linked Frameworks by adding the following to my Podfile.

use_frameworks! :linkage => :static

target 'MyApp' do
# ...
pre_install do |installer|
    installer.pod_targets.each do |pod|
      if pod.name.eql?('ReactNativeCameraKit')
        def pod.build_type
          Pod::BuildType.static_library
        end
      end
    end
  end
# ...

Hello,

i have the same problem. it comes from the fact that i changed my podFile to useFramework! > static

this is mandatory if you use Firebase modules.

If you work on an older project that has been built multiple times before adding this dependency, it worth trying to delete Xcode derived data. rm -rf ~/Library/Developer/Xcode/DerivedData/<Your_Project>-<Random_Hash>

It forces Xcode to rebuild everything from a clean state the next time you run your app

The above solutions isn’t working anymore

Same problem. I seem to have been able to get a build working by copying ReactNativeCameraKit-Swift.h from:

ios/build/Debug-iphonesimulator/ReactNativeCameraKit/ReactNativeCameraKit.framework/Headers

to

node_modules/react-native-camera-kit/ios/ReactNativeCameraKit/

This “solution” is obviously pretty dubious, so just sharing in case it helps anyone with troubleshooting.

Happening for me also. i upgraded from previous 13.0.0 version to the latest 14.0.0 beta versions (12)

Did you update from an older version or this is a fresh install?

ReactNativeCameraKit-Swift.h is supposed to be generated by Xcode at build time If you open the xcworkspace in Xcode, it should appear in Pods > ReactNativeCameraKit > Build Settings > Swift Compiler - General > Objective-C Generated Interface Header Name

Could you check and give us more context?

This happened to me too! I installed it freshly.

Did you update from an older version or this is a fresh install?

ReactNativeCameraKit-Swift.h is supposed to be generated by Xcode at build time If you open the xcworkspace in Xcode, it should appear in Pods > ReactNativeCameraKit > Build Settings > Swift Compiler - General > Objective-C Generated Interface Header Name

Could you check and give us more context?