-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Creating a module with New Architecture and including a .swift file introduces compiler errors #46212
Comments
|
|
|
|
This comment was marked as resolved.
This comment was marked as resolved.
@gtokman Seen you add labels, do you have permission to delete the comment above? Almost certainly malware |
This comment was marked as resolved.
This comment was marked as resolved.
@gtokman thanks for the issue... A few points:
|
@cipolleschi, thanks for the context.
I mentioned that I found a workaround. My thought was that a Build Setting was not being set correctly, which led to the pod failing to compile if I included Swift |
when you add the swift file manually, Xcode usually creates some bridging headers and extra configuration files. I can see if I can find some time to look into it, but it will likely happen in a couple of weeks as next week we have React Universe and I'll be in Poland for the Conference. |
Appreciate it @cipolleschi! I do see the alert in Xcode for the bridging header, but I don't create it. Bridging headers are for Obj-C -> Swift. To use Swift -> Obj-C you just need to import the generated Swift headers i.e |
Description
I'm upgrading one of our open-source libraries, which uses Swift for the logic. However, when I include
swift
in the podspecsource_files
, I get compiler errors.Steps to reproduce
I'm running into compiler errors after updating the podspec for the module to include
.swift
files in theios/
directory.After building the development pod, I get this error:
I found a workaround by omitting the following:
1.
run bundle exec pod install
Add the
.swift
file manuallyAfter building the project, there is no compiler error. This is fine for testing, but I need to update the podspec to include the file in the
Compile Sources
, otherwise, other errors will occur.React Native Version
0.74.0
Affected Platforms
Runtime - iOS
Areas
TurboModule - The New Native Module System
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/candlefinance/oss/tree/feat-convert-send-na
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: