react-native-grpc-example icon indicating copy to clipboard operation
react-native-grpc-example copied to clipboard

How about iOS?

Open spikeisryu opened this issue 8 years ago • 3 comments

Hi Albert,

I'm trying to use gRPC on React Native, iOS environment and encountered your article and it helps a lot to understand how to do that even on iOS, but still couldn't find the right way.

Did you have a chance to try it on iOS, too? I got stuck on this issue for several days. Especially, exporting a native module at Objective-C with RCT_REMAP_METHOD macro and async/await part. Here are the stackoverflow links about my questions and if you can help me, that will be highly appreciated.

https://stackoverflow.com/questions/45099173/react-nativerct-remap-method-how-to-export-a-method-with-a-parameter-and-ret https://stackoverflow.com/questions/45126086/javascript-never-returns-from-await

Sincerely, Spike

spikeisryu avatar Jul 16 '17 07:07 spikeisryu

Luckily, I was able to find the answer. Used RCT_EXPORT_METHOD and there was something wrong with Objective-C code part.

The problem is resolved and closing the issue.

spikeisryu avatar Jul 16 '17 11:07 spikeisryu

Sorry, even though I was able to export methods from Objective-C, the return values from them are all NULL only and still couldn't figure out the reason.

Here is the stackoverflow link about it. https://stackoverflow.com/questions/45148675/exportingbridging-method-from-objective-c-to-react-native-with-promise-retur

Do you have any clue to resolve this issue?

spikeisryu avatar Jul 18 '17 06:07 spikeisryu

Any update on this @spikeisryu?

JimmyMow avatar Oct 19 '17 05:10 JimmyMow