-
Hey, Currently migrating my apps to RN 0.76.x with the New Architecture, I'm encountering build issues on iOS with I opted for a Discussion instead of an Issue because the problem seems to be on our side and not in the lib, since the example seems to compile fine. But given the multiple issues reported with the library, I think we all have something in common that is probably misconfigured, but after spending a day or so investigating, I've found nothing. So maybe together we can figure it out by narrowing the issue. The issues I've found while doing some research :
On my side : ScanDependencies /Users/me/Library/Developer/Xcode/DerivedData/MyApp-ckjhndyflurfvfgyxfozkhvaawms/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/AppDelegate.o /MyApp/ios/MyApp/AppDelegate.mm normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'MyApp' from project 'MyApp')
cd /MyApp/ios
Using response file: /Users/me/Library/Developer/Xcode/DerivedData/MyApp-ckjhndyflurfvfgyxfozkhvaawms/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/e6072d4f65d7061329687fe24e3d63a7-common-args.resp
builtin-ScanDependencies -o /Users/me/Library/Developer/Xcode/DerivedData/MyApp-ckjhndyflurfvfgyxfozkhvaawms/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/AppDelegate.o.scan -- /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -ivfsstatcache /Users/me/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.1-22B74-3d93aac3a03ebac1dd8474c5def773dc.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/me/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-implicit-fallthrough -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -index-store-path /Users/me/Library/Developer/Xcode/DerivedData/MyApp-ckjhndyflurfvfgyxfozkhvaawms/Index.noindex/DataStore -Wno-comma -Wno-shorten-64-to-32 @/Users/me/Library/Developer/Xcode/DerivedData/MyApp-ckjhndyflurfvfgyxfozkhvaawms/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/e6072d4f65d7061329687fe24e3d63a7-common-args.resp -MMD -MT dependencies -MF /Users/me/Library/Developer/Xcode/DerivedData/MyApp-ckjhndyflurfvfgyxfozkhvaawms/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/AppDelegate.d --serialize-diagnostics /Users/me/Library/Developer/Xcode/DerivedData/MyApp-ckjhndyflurfvfgyxfozkhvaawms/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/AppDelegate.dia -c /MyApp/ios/MyApp/AppDelegate.mm -o /Users/me/Library/Developer/Xcode/DerivedData/MyApp-ckjhndyflurfvfgyxfozkhvaawms/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/AppDelegate.o -index-unit-output-path /MyApp.build/Debug-iphonesimulator/MyApp.build/Objects-normal/x86_64/AppDelegate.o
/MyApp/ios/Pods/Headers/Public/RCTRequired/RCTRequired/RCTRequired.h:8:10: error: 'utility' file not found (in target 'MyApp' from project 'MyApp')
/MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:9: note: while building module 'ReactCodegen' imported from /MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:
/MyApp/ios/<module-includes>:1:9: note: in file included from <module-includes>:1:
/MyApp/ios/Pods/Headers/Public/ReactCodegen/ReactCodegen-umbrella.h:13:9: note: in file included from /MyApp/ios/Pods/Headers/Public/ReactCodegen/ReactCodegen-umbrella.h:13:
/MyApp/ios/Pods/Headers/Public/ReactCodegen/FBReactNativeSpec/FBReactNativeSpec.h:23:9: note: in file included from /MyApp/ios/Pods/Headers/Public/ReactCodegen/FBReactNativeSpec/FBReactNativeSpec.h:23:
/MyApp/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:9: error: 'optional' file not found (in target 'MyApp' from project 'MyApp')
/MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:9: note: while building module 'ReactCodegen' imported from /MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:
/MyApp/ios/Pods/Headers/Public/ReactCodegen/FBReactNativeSpec/FBReactNativeSpec.h:24:9: note: while building module 'RCTTypeSafety' imported from /MyApp/ios/Pods/Headers/Public/ReactCodegen/FBReactNativeSpec/FBReactNativeSpec.h:24:
/MyApp/ios/<module-includes>:1:9: note: in file included from <module-includes>:1:
/MyApp/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety-umbrella.h:13:9: note: in file included from /MyApp/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety-umbrella.h:13:
/MyApp/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:10:10: error: 'cassert' file not found (in target 'MyApp' from project 'MyApp')
/MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:9: note: while building module 'ReactCodegen' imported from /MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:
/MyApp/ios/Pods/Headers/Public/React-NativeModulesApple/ReactCommon/RCTTurboModule.h:16:9: note: while building module 'ReactCommon' imported from /MyApp/ios/Pods/Headers/Public/React-NativeModulesApple/ReactCommon/RCTTurboModule.h:16:
/MyApp/ios/<module-includes>:1:9: note: in file included from <module-includes>:1:
/MyApp/ios/Pods/Headers/Public/ReactCommon/ReactCommon-umbrella.h:13:9: note: in file included from /MyApp/ios/Pods/Headers/Public/ReactCommon/ReactCommon-umbrella.h:13:
/MyApp/ios/Pods/Headers/Public/ReactCommon/react/bridging/Array.h:10:10: note: in file included from /MyApp/ios/Pods/Headers/Public/ReactCommon/react/bridging/Array.h:10:
/MyApp/ios/Pods/Headers/Public/ReactCommon/react/bridging/Base.h:10:10: note: in file included from /MyApp/ios/Pods/Headers/Public/ReactCommon/react/bridging/Base.h:10:
/MyApp/ios/Pods/Headers/Public/glog/glog/logging.h:42:10: error: 'iosfwd' file not found (in target 'MyApp' from project 'MyApp')
/MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:9: note: while building module 'ReactCodegen' imported from /MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:
/MyApp/ios/Pods/Headers/Public/React-debug/react/debug/react_native_assert.h:54:10: note: while building module 'glog' imported from /MyApp/ios/Pods/Headers/Public/React-debug/react/debug/react_native_assert.h:54:
/MyApp/ios/<module-includes>:1:9: note: in file included from <module-includes>:1:
/MyApp/ios/Pods/Headers/Public/glog/glog-umbrella.h:13:9: note: in file included from /MyApp/ios/Pods/Headers/Public/glog/glog-umbrella.h:13:
/MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:9: error: Could not build module 'ReactCodegen' (in target 'MyApp' from project 'MyApp')
/MyApp/ios/MyApp/AppDelegate.mm:6:9: note: in file included from /MyApp/ios/MyApp/AppDelegate.mm:6:
/MyApp/ios/Pods/Headers/Public/RCTRequired/RCTRequired/RCTRequired.h:8:10: 'utility' file not found
/MyApp/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety/RCTConvertHelpers.h:8:9: 'optional' file not found
/MyApp/ios/Pods/Headers/Public/React-jsi/jsi/jsi.h:10:10: 'cassert' file not found
/MyApp/ios/Pods/Headers/Public/glog/glog/logging.h:42:10: 'iosfwd' file not found
/MyApp/ios/Pods/Headers/Public/RNBootSplash/RNBootSplash.h:3:9: Could not build module 'ReactCodegen' Multiple times, I've seen that the problem was because of an Also, cleaning the build folder like recommended in #651 didn't help neither in my case. Let's try to find out :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
@c100k If you can reduce the application to the strict minimum and ship a reproduction, I will probably be able to understand what goes wrong here. Meanwhile, there's not much we can do. |
Beta Was this translation helpful? Give feedback.
@c100k Found it. It's an issue in your project.
It seems that your project is quite old, because you made the update from RN 0.67 to 0.68, which migrate
AppDelegate.m
toAppDelegate.mm
.BUT. You were supposed to update your project to change
AppDelegate
type to Objective C++:And you didn't. Switching from
lastKnownFileType = sourcecode.c.objc
tolastKnownFileType = sourcecode.cpp.objcpp
fix the issue.To do this directly in Xcode, switch
AppDelegate.mm
to any type exceptedDefault - Objective C++ Source
, then setDefault - Objective C++ Source
back. You will see that it updates your project file.Screen.Recording.2024-11-29.at.17.16.54.mp4
It was not a
react-native-bootsplash
i…