In some previous post, I shared with you how to fix one of the problems with the speech-to-text library from Google. Recently, I found another error with this library. It looks like that: ‘googleapis/CloudSpeech.pbobjc.h’ file not found.
Notice where it happened, it’s the same place from the previous post. It happened after refreshing CocoaPods dependencies.
If you try to modify anything in this file you won’t be able. Look at the screenshot and the where the path to this file starts from. It’s only CloudSpeech.pbrpc.h and you can’t edit it here. You need to open a source file.
In my case, it’s in the google directory in my project. In previous post you maybe place it in you project directory. The rest of the path you can find on the screenshot.
To fix this error you need to change in the source file to that path where each of the files exists.
There will be:
Because both of them are in the same directory but for others, it’ll be different.
<googleapis/Annotations.pbobjc.h> in CloudSpeech.pbrpc.h
The will be:
Take a look at the screenshot below with changes in my case:
If you’re not sure how to create a path you need to look at how files are located and create relative paths to other files.