peggyrayzis/react-native-create-bridge

Template issue when using Swift setup

ma-pe opened this issue · 4 comments

ma-pe commented

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
  • 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 commented

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

ma-pe commented

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?