Skip to content

Build iOS - Turbo Module with Backward Compatibility - FailsΒ #557

@gladiuscode

Description

@gladiuscode

Description

Hi all,

I think this is related to how turbo is setup to handle cocoapods cache, therefore it may be a bug.
Basically I've got a library that supports both the old architecture and the new one.
My github action that runs: build:ios, fails saying the following:

The following build commands failed:
2024-05-23T23:19:55.9038470Z 	CompileC /Users/runner/Library/Developer/Xcode/DerivedData/OrientationDirectorExample-cmbpwsqgntorrdetrsbzengqrrls/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/x86_64/RNOrientationDirectorSpecJSI-generated.o /Users/runner/work/react-native-orientation-director/react-native-orientation-director/example/ios/build/generated/ios/RNOrientationDirectorSpecJSI-generated.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-Codegen' from project 'Pods')
2024-05-23T23:19:55.9043380Z 	CompileC /Users/runner/Library/Developer/Xcode/DerivedData/OrientationDirectorExample-cmbpwsqgntorrdetrsbzengqrrls/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/x86_64/FBReactNativeSpecJSI-generated.o /Users/runner/work/react-native-orientation-director/react-native-orientation-director/example/ios/build/generated/ios/FBReactNativeSpecJSI-generated.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-Codegen' from project 'Pods')

It expects the output of Codegen (If i'm not mistaken) but my example app is not setup to build with the new architecture, so I don't understand how to properly fix this behaviour.
Locally i can't reproduce this issue, it runs smoothly.

Is it related to the pushed Podfile.lock?
If i delete the Podfile.lock, turbo resets the cocoapods cache and everything runs successfully, but I can't reset it everytime, I don't think that is the solution.

Has anyone got any idea?
My experience with Turbo is non-existent, so every help is really appreciated.

Thanks!

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

βœ” What is the name of the npm package? react-native-orientation-director
βœ” What is the description for the package?
βœ” What is the name of package author? gladiuscode
βœ” What is the email address for the package author?
βœ” What is the URL for the package author?
βœ” What is the URL for the repository? https://github.com/gladiuscode/react-native-orientation-director
βœ” What type of library do you want to develop? β€Ί Turbo module with backward compat
βœ” Which languages do you want to use? β€Ί Kotlin & Objective-C

Link to repro

gladiuscode/react-native-orientation-director#1

Environment

React Native v74
Node 18
Yarn 3.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions