Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference to swift-5 #245

Closed
jmkolbe opened this issue May 23, 2022 · 1 comment
Closed

Reference to swift-5 #245

jmkolbe opened this issue May 23, 2022 · 1 comment

Comments

@jmkolbe
Copy link

jmkolbe commented May 23, 2022

Environment

version 0.20.1
MacOS 12.3.1
NPM 8.9.0
yarn 1.22.19

Description

A new project produces an Xcode project with swift-5 LIBRARY_SEARCH_PATHS

Reproducible Demo

Create a new project as described on https://reactnative.dev/docs/native-modules-setup:

npx create-react-native-library react-native-awesome-module
✔ What is the name of the npm package? … react-native-awesome-module
✔ What is the description for the package? … foo
✔ What is the name of package author? … f
✔ What is the email address for the package author? … [email protected]
✔ What is the URL for the package author? … http://www.bar.org
✔ What is the URL for the repository? … http://www.foo.com
✔ Which languages do you want to use? › Java & Swift
✔ What type of library do you want to develop? › Native module (to expose native APIs)

produces an Xcode project with swift-5 references:

grep -r swift-5 example/ios/ 
example/ios//AwesomeModuleExample.xcodeproj/project.pbxproj:			"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
example/ios//AwesomeModuleExample.xcodeproj/project.pbxproj:			"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",

Including a Pod with a os.Logger dependency leads to a linker error:

Undefined symbols for architecture arm64:
  "nominal type descriptor for os.Logger"

Removing the swift-5 paths fixes the build.

@satya164
Copy link
Member

The example project is generated by React Native CLI. So it seems like related to React Native itself. So please open an issue in React Native repo if this is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants