Open Daij-Djan opened 7 years ago
I got it to build by using an ugly workaround.. I dont 'import googleapis' but instead I copy all the individual includes of its umbrella header to my bridging header and make them truly project relative :) that works but is ugly as hell!
I got it working with a post_install script directly in the Podfile :
post_install do |installer|
find_and_replace("google")
#Show BUILDFIXES
puts "\n--------BUILDFIXES--------\n"
puts "Fixing Protocol Buffer toolchain issues"
find_and_replace("google")
puts "----------------------------\n\n"
end
def find_and_replace(dir)
Dir[dir + '*.*'].each do |name|
text = File.read(name)
replace = text.gsub("\"google/cloud/speech/v1beta1/CloudSpeech.pbobjc.h\"", "<googleapis/CloudSpeech.pbobjc.h>")
replace = replace.gsub("\"google/api/Annotations.pbobjc.h\"", "<googleapis/Annotations.pbobjc.h>")
replace = replace.gsub("\"google/longrunning/Operations.pbobjc.h\"", "<googleapis/Operations.pbobjc.h>")
replace = replace.gsub("\"google/rpc/Status.pbobjc.h\"", "<googleapis/Status.pbobjc.h>")
if text != replace
puts "Fixing " + name
File.open(name, "w") { |file| file.puts replace }
STDOUT.flush
end
end
Dir[dir + '*/'].each(&method(:find_and_replace))
end```
Just did a pod update and then gave your code @kirualex then only it worked. Thanks :)
After following guidelines listed in build fix file, all these build error gets fixed but can we know by when Google will come up with working sample without need of this build fix -
Hi the StreamingRPC Swift Sample Code doesnt build - stickynote works fine.
It seems to be an issue with not finding the finding the right headers...
https://www.dropbox.com/s/l4ck0envcb4guym/Screenshot%202017-04-05%2010.57.32.png?dl=0