callstack / react-native-builder-bob

👷‍♂️ Simple set of CLIs to scaffold and build React Native libraries for different targets

Home Page:https://callstack.github.io/react-native-builder-bob/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect reference to .m file in library XCode project

obasille opened this issue · comments

Description

In the generated .xcodeprojfile for the library, there is a reference to a .m file but the extension of the generated Objective-C++ file is .mm.

For example after running the following commands on a Mac:

npx create-react-native-library@latest awesome-library
cd awesome-library
yarn

In /ios/AwesomeLibrary.xcodeproj you'll find:

/* Begin PBXBuildFile section */
		5E555C0D2413F4C50049A1A2 /* AwesomeLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* AwesomeLibrary.m */; };
/* End PBXBuildFile section */

but the generated file is AwesomeLibrary.mm.

Note: There are several references to AwesomeLibrary.m in the project file.

Packages

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

Selected options

What is the name of the npm package? … react-native-awesome-library
What is the description for the package? … something
What is the name of package author? … -------
What is the email address for the package author? … ----@----
What is the URL for the package author? … https://github.com/------
What is the URL for the repository? … https://github.com/------/react-native-awesome-library
What type of library do you want to develop? › Native module
Which languages do you want to use? › Kotlin & Objective-C
Project created successfully at awesome-library!

Link to repro

No response

Environment

System:
  OS: macOS 13.2.1
  CPU: (8) arm64 Apple M1
  Memory: 98.36 MB / 16.00 GB
  Shell:
    version: 5.8.1
    path: /bin/zsh
Binaries:
  Node:
    version: 16.19.0
    path: /opt/homebrew/opt/node@16/bin/node
  Yarn:
    version: 1.22.19
    path: /opt/homebrew/bin/yarn
  npm:
    version: 8.19.3
    path: /opt/homebrew/opt/node@16/bin/npm
  Watchman:
    version: 2023.05.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.2
      - iOS 16.2
      - macOS 13.1
      - tvOS 16.1
      - watchOS 9.1
  Android SDK: Not Found
IDEs:
  Android Studio: 2021.1 AI-211.7628.21.2111.8193401
  Xcode:
    version: 14.2/14C18
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.11
    path: /usr/bin/javac
  Ruby:
    version: 3.2.0
    path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.0
    wanted: 0.72.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found