GoogleCloudPlatform / ios-docs-samples

iOS samples that demonstrate APIs and services of Google Cloud Platform.
Apache License 2.0
326 stars 209 forks source link

Can I use this library for react native iOS app, I tried but not able to do it. #123

Open hanumant-shegade-aera opened 4 years ago

hanumant-shegade-aera commented 4 years ago

I have tried with following steps:

  1. npm install --save @google-cloud/speech

  2. react-native link @google-cloud/speech

  3. I manually added "google" folder and "googleapis.podspec" bellow the project file

  4. Then added pod 'googleapis', :path => '.' in Podfile of react native iOS project

  5. Changed file names as per https://github.com/GoogleCloudPlatform/ios-docs-samples/blob/master/speech/Swift/Speech-gRPC-Streaming/BUILDFIXES

  6. imported files in AppDelegate.h

    import <googleapis/CloudSpeech.pbobjc.h>

    import <googleapis/CloudSpeech.pbrpc.h>

But "'googleapis/CloudSpeech.pbobjc.h' file not found" error occurs.

googleapis error
He1nr1chK commented 4 years ago

This is not a React Native project. I am also working on a React Native project and wanted to use this project. Had to build a native module. More info can be found here: https://reactnative.dev/docs/native-modules-ios https://reactnative.dev/docs/native-modules-android

Hope this helps.