react-native-create-bridge icon indicating copy to clipboard operation
react-native-create-bridge copied to clipboard

Template issue when using Swift setup

Open ma-pe opened this issue 7 years ago • 4 comments

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)

ma-pe avatar Feb 18 '18 17:02 ma-pe

There are multiple compiler errors for ModuleName.swift when importing, too.

ma-pe avatar Feb 18 '18 17:02 ma-pe

Fewer and different errors though, if you just use the Native Module setup for swift (without UI Module).

ma-pe avatar Feb 18 '18 17:02 ma-pe

@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.

jarretmoses avatar Mar 01 '18 13:03 jarretmoses

@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?

paul019 avatar Oct 19 '18 17:10 paul019