peggyrayzis / react-native-create-bridge

A CLI tool that bridges React Native modules & UI components with ease 🎉
MIT License
1.02k stars 63 forks source link

Template issue when using Swift setup #48

Open ma-pe opened 6 years ago

ma-pe commented 6 years ago

Dev setup:

I am using create-bridge in a:

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 6 years ago

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

ma-pe commented 6 years ago

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

jarretmoses commented 6 years ago

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

paul019 commented 6 years ago

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