facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.47k stars 24.26k forks source link

Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found #43498

Closed solitarysp closed 6 months ago

solitarysp commented 6 months ago

Description

executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Beta-iphoneos/mobile.build/Objects-normal/arm64/mobile_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -final_output -Xlinker /Applications/mobile.app/mobile -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Beta-iphoneos/mobile.build/Objects-normal/arm64/mobile.swiftmodule -ObjC -lAmplitude -lBase64 -lCodePush -lDoubleConversion -lEXAppleAuthentication -lEXApplication -lEXClipboard -lEXConstants -lEXFont -lEXKeepAwake -lEXRandom -lEXWebBrowser -lExpo -lExpoModulesCore -lFBReactNativeSpec -lFirebaseABTesting -lFirebaseCore -lFirebaseCoreInternal -lFirebaseInstallations -lFirebaseRemoteConfig -lGoogleUtilities -lJWT -lMultiplatformBleAdapter -lPermission-Camera -lPermission-FaceID -lPromisesObjC -lRCT-Folly -lRCTTypeSafety -lRNCAsyncStorage -lRNCMaskedView -lRNDeviceInfo -lRNFBApp -lRNFBRemoteConfig -lRNFS -lRNFastImage -lRNGestureHandler -lRNKeychain -lRNLocalize -lRNPermissions -lRNReanimated -lRNSVG -lRNScreens -lReact-Core -lReact-CoreModules -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReact-perflogger -lReactCommon -lSDWebImage -lSDWebImageWebPCoder -lSSZipArchive -lYoga -lamplitude-react-native -lappcenter-analytics -lappcenter-core -lc++ -lglog -liconv -llibwebp -llottie-ios -llottie-react-native -lnanopb -lreact-native-ble-plx -lreact-native-blur -lreact-native-camera -lreact-native-lottie-splash-screen -lreact-native-minimizer -lreact-native-netinfo -lreact-native-safe-area-context -lreact-native-webview -lsqlite3 -lsqlite3.0 -lstdc++ -lz -framework AppCenter -framework AppCenterAnalytics -framework AppCenterReactNativeShared -framework AudioToolbox -framework CoreBluetooth -framework CoreGraphics -framework CoreTelephony -framework EXFileSystem -framework EXSplashScreen -framework FirebaseAnalytics -framework Foundation -framework GoogleAppMeasurement -framework GoogleAppMeasurementIdentitySupport -framework ImageIO -framework JavaScriptCore -framework MobileCoreServices -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -lc++ -lPods-mobile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Beta-iphoneos/mobile.build/Objects-normal/arm64/mobile_dependency_info.dat -o /Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/InstallationBuildProductsLocation/Applications/mobile.app/mobile ld: warning: ignoring duplicate libraries: '-lc++' ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found ld: Undefined symbols: _swift_stdlib_isStackAllocationSafe, referenced from: function signature specialization <Arg[1] = Owned To Guaranteed> of function signature specialization <Arg[0] = [Closure Propagated : reabstraction thunk helper from @callee_guaranteed (@unowned FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error), Argument Types : [@callee_guaranteed (@unowned FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error)]> of generic specialization <FirebaseCoreInternal.TimePeriod, Foundation.Date> of Swift._NativeDictionary.filter(((key: A, value: B)) throws -> Swift.Bool) throws -> Swift._NativeDictionary<A, B> in libFirebaseCoreInternal.a6 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Steps to reproduce

Build release IOS

React Native Version

0.64.4

Affected Platforms

Runtime - iOS, Build - MacOS

Output of npx react-native info

System:
    OS: macOS 13.6
    CPU: (10) arm64 Apple M1 Pro
    Memory: 235.23 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.16.1 - ~/.nvm/versions/node/v18.16.1/bin/node
    Yarn: 1.19.0 - ~/.nvm/versions/node/v18.16.1/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.1/bin/npm
    Watchman: 2023.09.18.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.13.0 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, visionOS 1.0, watchOS 10.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 2022.3 AI-223.8836.35.2231.10671973
    Xcode: 15.2/15C500b - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.19 - /Users/levanthanh/.sdkman/candidates/java/current/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.64.4 => 0.64.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Stacktrace or Logs

executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Beta-iphoneos/mobile.build/Objects-normal/arm64/mobile_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -final_output -Xlinker /Applications/mobile.app/mobile -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Beta-iphoneos/mobile.build/Objects-normal/arm64/mobile.swiftmodule -ObjC -lAmplitude -lBase64 -lCodePush -lDoubleConversion -lEXAppleAuthentication -lEXApplication -lEXClipboard -lEXConstants -lEXFont -lEXKeepAwake -lEXRandom -lEXWebBrowser -lExpo -lExpoModulesCore -lFBReactNativeSpec -lFirebaseABTesting -lFirebaseCore -lFirebaseCoreInternal -lFirebaseInstallations -lFirebaseRemoteConfig -lGoogleUtilities -lJWT -lMultiplatformBleAdapter -lPermission-Camera -lPermission-FaceID -lPromisesObjC -lRCT-Folly -lRCTTypeSafety -lRNCAsyncStorage -lRNCMaskedView -lRNDeviceInfo -lRNFBApp -lRNFBRemoteConfig -lRNFS -lRNFastImage -lRNGestureHandler -lRNKeychain -lRNLocalize -lRNPermissions -lRNReanimated -lRNSVG -lRNScreens -lReact-Core -lReact-CoreModules -lReact-RCTAnimation -lReact-RCTBlob -lReact-RCTImage -lReact-RCTLinking -lReact-RCTNetwork -lReact-RCTSettings -lReact-RCTText -lReact-RCTVibration -lReact-cxxreact -lReact-jsi -lReact-jsiexecutor -lReact-jsinspector -lReact-perflogger -lReactCommon -lSDWebImage -lSDWebImageWebPCoder -lSSZipArchive -lYoga -lamplitude-react-native -lappcenter-analytics -lappcenter-core -lc++ -lglog -liconv -llibwebp -llottie-ios -llottie-react-native -lnanopb -lreact-native-ble-plx -lreact-native-blur -lreact-native-camera -lreact-native-lottie-splash-screen -lreact-native-minimizer -lreact-native-netinfo -lreact-native-safe-area-context -lreact-native-webview -lsqlite3 -lsqlite3.0 -lstdc++ -lz -framework AppCenter -framework AppCenterAnalytics -framework AppCenterReactNativeShared -framework AudioToolbox -framework CoreBluetooth -framework CoreGraphics -framework CoreTelephony -framework EXFileSystem -framework EXSplashScreen -framework FirebaseAnalytics -framework Foundation -framework GoogleAppMeasurement -framework GoogleAppMeasurementIdentitySupport -framework ImageIO -framework JavaScriptCore -framework MobileCoreServices -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -framework UIKit -lc++ -lPods-mobile -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/IntermediateBuildFilesPath/mobile.build/Beta-iphoneos/mobile.build/Objects-normal/arm64/mobile_dependency_info.dat -o /Users/user/Library/Developer/Xcode/DerivedData/mobile-enlqcscemfhhjjfldsucnptaosmk/Build/Intermediates.noindex/ArchiveIntermediates/mobile/InstallationBuildProductsLocation/Applications/mobile.app/mobile
ld: warning: ignoring duplicate libraries: '-lc++'
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
ld: Undefined symbols:
  _swift_stdlib_isStackAllocationSafe, referenced from:
      function signature specialization <Arg[1] = Owned To Guaranteed> of function signature specialization <Arg[0] = [Closure Propagated : reabstraction thunk helper from @callee_guaranteed (@unowned FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error), Argument Types : [@callee_guaranteed (@unowned FirebaseCoreInternal.TimePeriod, @in_guaranteed Foundation.Date) -> (@unowned Swift.Bool, @error @owned Swift.Error)]> of generic specialization <FirebaseCoreInternal.TimePeriod, Foundation.Date> of Swift._NativeDictionary.filter(((key: A, value: B)) throws -> Swift.Bool) throws -> Swift._NativeDictionary<A, B> in libFirebaseCoreInternal.a[6](HeartbeatController.o)
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Screenshots and Videos

image
github-actions[bot] commented 6 months ago
:warning: Too Old Version of React Native
:information_source: It looks like your issue or the example you provided uses a Too Old Version of React Native.

Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please upgrade to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on StackOverflow to get further community support.
github-actions[bot] commented 6 months ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
IseeUDenis commented 5 months ago

I face the similar issue, you can check your Pod config first

image

Pull the follow in Podfile

    installer.pods_project.build_configurations.each do |config|
      if config.name.include?("Debug")
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
        if !config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].include? 'DEBUG=1'
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'DEBUG=1'
        end
      end
    end

Try "pod install" again

lingluanchen commented 3 months ago

I face the similar issue, you can check your Pod config first

image

Pull the follow in Podfile

    installer.pods_project.build_configurations.each do |config|
      if config.name.include?("Debug")
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
        if !config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'].include? 'DEBUG=1'
          config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'DEBUG=1'
        end
      end
    end

Try "pod install" again

It doesn't work

strappberry commented 1 month ago

I'm having the same issue with "react-native": "0.73.1",