zendesk / react-native-sunshine-conversations

React Native wrapper for Smooch.io
MIT License
36 stars 26 forks source link

0.3.0: iOS build error #36

Closed BigGillyStyle closed 6 years ago

BigGillyStyle commented 6 years ago

As a result of commit https://github.com/smooch/react-native-smooch/commit/ebc802888071479b2262ebca0dc095754c42b7f5 and the corresponding release 0.3.0 of this library, I now see the following problem when I try to run iOS simulator build:

[my_private_path]/node_modules/react-native-smooch/ios/RCTSmooch/RCTSmooch.m:46:19: error: too many arguments provided to function-like macro invocation
                  resolver:(RCTPromiseResolveBlock)resolve
                  ^
In file included from [my_private_path]/node_modules/react-native-smooch/ios/RCTSmooch/RCTSmooch.m:1:
In file included from [my_private_path]/node_modules/react-native-smooch/ios/RCTSmooch/RCTSmooch.h:4:
../../react-native/React/Base/RCTBridgeModule.h:144:9: note: macro 'RCT_EXPORT_METHOD' defined here
#define RCT_EXPORT_METHOD(method) \
        ^
[my_private_path]/node_modules/react-native-smooch/ios/RCTSmooch/RCTSmooch.m:45:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
RCT_EXPORT_METHOD(getUnreadCount,
^
[my_private_path]/node_modules/react-native-smooch/ios/RCTSmooch/RCTSmooch.m:45:18: error: expected ';' after top level declarator
RCT_EXPORT_METHOD(getUnreadCount,
                 ^
                 ;
1 warning and 2 errors generated.

** BUILD FAILED **

Unfortunately, I don't know the first thing about Objective-C and haven't a clue as to how to fix this. @Leeds-eBooks are you seeing this?

benadamstyles commented 6 years ago

I was actually a little surprised that my PR was merged straight away, as I mentioned in my comment on the PR I thought it was likely that it contained errors. I intended it to be a starting point, rather than the finished thing, as I have written about 10 lines of Obj-C ever. I will take a look tomorrow if I can, but I haven't even had a chance to try using 0.3.0. It's likely I will need someone else's expertise on this one. Sorry about this đŸ˜•

It would be really great if someone wrote some unit tests for this lib. And that is certainly way beyond my capabilities currently!

mspensieri commented 6 years ago

Released v0.3.1 with the fix in #37

benadamstyles commented 6 years ago

Thanks! And thanks for running with my initial PR. It was a confidence booster to see it merged, despite the bug!