react-native-create-bridge
react-native-create-bridge copied to clipboard
Template issue when using Swift setup
Dev setup:
-
react-native-create-bridge
version: 1.2.0 -
react-native
version: 0.53.0
I am using create-bridge in a:
- [ ] standalone library
- [X] existing React Native project
What you did:
Setup a new Native Module & UI Component in Swift.
What happened:
ModuleName.m
RCT_EXPORT_VIEW_PROPERTY("exampleProp", NSString)
should be RCT_EXPORT_VIEW_PROPERTY(exampleProp, NSString)
There are multiple compiler errors for ModuleName.swift
when importing, too.
Fewer and different errors though, if you just use the Native Module setup for swift (without UI Module).
@ma-pe thanks for reporting this. I will need a little time to investigate this myself. However, feel free to open a PR with your suggested changes and I will gladly review it.
@ma-pe I have the same issue. Like you suggested, I have changed RCT_EXPORT_VIEW_PROPERTY("exampleProp", NSString)
to RCT_EXPORT_VIEW_PROPERTY(exampleProp, NSString)
. Nevertheless, there is still the same error: Value of type 'ModuleName' has no member 'exampleProp'
. Do you have any idea how to solve this?