Estaba tratando de instalar React Native en mi sistema y descubrí que no pudo instalar las dependencias de CocoaPods que requiere ese error de plantilla.
sudo arch -x86_64 gem install ffi solucionó este problema, pero terminó con event-config.h" file not found el error.
Cambié la versión de flipper en el archivo pod a use_flipper!({'Flipper'=>'0.76.0'}) y luego llegué al error mencionado anteriormente. Cualquier ayuda sobre este tema sería apreciada.
node version : 15.10.0 react-native version: 0.63.4 Xcode version: 12.4Descripción del error a continuación:
Showing Recent Messages Could not find or use auto-linked library 'swiftCoreGraphics' Could not find or use auto-linked library 'swiftUIKit' Could not find or use auto-linked library 'swiftDarwin' Could not find or use auto-linked library 'swiftFoundation' Could not find or use auto-linked library 'swiftMetal' Could not find or use auto-linked library 'swiftObjectiveC' Could not find or use auto-linked library 'swiftCoreFoundation' Could not find or use auto-linked library 'swiftDispatch' Could not find or use auto-linked library 'swiftCoreImage' Could not find or use auto-linked library 'swiftQuartzCore' Could not find or use auto-linked library 'swiftCore' Could not find or use auto-linked library 'swiftSwiftOnoneSupport' Undefined symbol: protocol descriptor for Swift.ExpressibleByFloatLiteral Undefined symbol: associated type descriptor for Swift.ExpressibleByIntegerLiteral.IntegerLiteralType Undefined symbol: associated conformance descriptor for Swift.ExpressibleByIntegerLiteral.Swift.ExpressibleByIntegerLiteral.IntegerLiteralType: Swift._ExpressibleByBuiltinIntegerLiteral Undefined symbol: method descriptor for Swift.ExpressibleByFloatLiteral.init(floatLiteral: A.FloatLiteralType) -> A Undefined symbol: protocol descriptor for Swift.ExpressibleByIntegerLiteral Undefined symbol: value witness table for Builtin.Int32 Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreImage Undefined symbol: associated type descriptor for Swift.ExpressibleByFloatLiteral.FloatLiteralType Undefined symbol: __swift_FORCE_LOAD_$_swiftQuartzCore Undefined symbol: __swift_FORCE_LOAD_$_swiftDispatch Undefined symbol: method descriptor for Swift.ExpressibleByIntegerLiteral.init(integerLiteral: A.IntegerLiteralType) -> A Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreFoundation Undefined symbol: protocol witness table for Swift.Int : Swift._ExpressibleByBuiltinIntegerLiteral in Swift Undefined symbol: __swift_FORCE_LOAD_$_swiftObjectiveC Undefined symbol: __swift_FORCE_LOAD_$_swiftCoreGraphics Undefined symbol: _swift_getForeignTypeMetadata Undefined symbol: __swift_FORCE_LOAD_$_swiftFoundation Undefined symbol: associated conformance descriptor for Swift.ExpressibleByFloatLiteral.Swift.ExpressibleByFloatLiteral.FloatLiteralType: Swift._ExpressibleByBuiltinFloatLiteral Undefined symbol: __swift_FORCE_LOAD_$_swiftUIKit Undefined symbol: __swift_FORCE_LOAD_$_swiftMetal Undefined symbol: Swift.Float.init(Swift.Double) -> Swift.Float Undefined symbol: __swift_FORCE_LOAD_$_swiftDarwin Undefined symbol: protocol witness table for Swift.Float : Swift._ExpressibleByBuiltinFloatLiteral in SwiftLogré resolver este problema agregando un archivo Swift vacío al proyecto en Xcode. Esto tuvo el efecto secundario de crear un archivo de encabezado de puente que (al menos para mí) hizo que mi proyecto se compilara.
Debe excluir la arquitectura arm64 si está utilizando M1 mac. 
También agregue este código al final del archivo pod
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings["ONLY_ACTIVE_ARCH"] = "NO" end end endRealice la instalación del pod, limpie la carpeta de compilación y reinicie la compilación; resolverá el problema.
Esto se debe a que su proyecto contiene marcos/bibliotecas tanto de Swift como de Objective c.
Agregue un archivo rápido (si ve archivos de Objective C que ya están en su proyecto) o un archivo de Objective C (si ya ve archivos de Objective C en su proyecto). Seleccione los objetivos que dan el error anterior.
Este paso le pedirá que cree un encabezado puente. Crear encabezado de puente Decir que sí y compilar y ejecutar.
Lo que realmente funcionó para mí, solo agregue estas arquitecturas excluidas y estará bien, si está usando una Mac con M1, por supuesto
Lo que terminó funcionando para mí es eliminar LIBRARY_SEARCH_PATHS de Xcode...
https://github.com/facebook/react-native/issues/31438#issuecomment-865180401
Cuando usaba la solución Dipan Sharmas, ya no podía crear para dispositivos o "Cualquier dispositivo iOS". Lo que resolvió este problema para mí fue simplemente excluir arm64 para "Cualquier SDK de simulador de iOS" en lugar de excluirlo en el nivel superior. Incluso eliminando arm64 del nivel superior de arquitecturas excluidas, no se volvió a construir el proyecto para Dispositivos y "Cualquier dispositivo iOS". Tuve que extraer un archivo de proyecto anterior de mi git. Configuración de trabajo de "Arquitecturas excluidas" en Apple Silicon M1
Si estás en m1 Mac
arch -x86_64 pod install en la carpeta iOS