Skip to content

iOS codegen clear header/swift files #845

@maitrungduc1410

Description

@maitrungduc1410

Description

I just generate a fresh new project using Turbo module (not Nitro).

The default template works, with multiply function, I can create a swift file + header, then call from objc -> swift, it works OK

Then I update Typescript Spec: add a third param to multiply function. Run:

bundle install
bundle exec pod install

all successful. But now when I open ios project, Swift file + Bridging header are not showing in Xcode, eventhough they actually still exist, if I compile -> fail because can't find header file, and I have to add Bridging header again, everytime. But the weird is the default MyModule.h and MyModule.mm (the default files on project creation) are not cleared, they're preserved.

I guess everytime I run pod install it re clears file reference or something

How can I preserve the files, do you have some idea? Thanks

Packages

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

Selected options

Turbo Modules

Link to repro

NA

Environment

all latest version

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