Giter Site home page Giter Site logo

googlecloudplatform / ios-docs-samples Goto Github PK

View Code? Open in Web Editor NEW
326.0 41.0 209.0 1.64 MB

iOS samples that demonstrate APIs and services of Google Cloud Platform.

License: Apache License 2.0

Ruby 5.02% Objective-C 29.22% Shell 4.36% Go 5.45% HTML 0.33% Swift 53.09% Starlark 2.54%

ios-docs-samples's Introduction

Google Cloud Platform iOS Samples

These iOS samples demonstrate APIs and services of Google Cloud Platform.

For more information, see the Google Cloud Platform documentation and other repositories.

Contributions

Fixes and improvements are appreciated! Before contributing, please read our guidelines for contributing.

License

All samples are released under the Apache 2.0 license.

Contents

Samples that demonstrate the Cloud Speech API.

Samples that demonstrate the Dialogflow API.

Samples that demonstrate systems built on Google Cloud Platform.

A screensaver that features Google Cloud Platform products.

Samples that demonstrate the Cloud Text to Speech API.

Samples that demonstrate the Cloud Natural language

ios-docs-samples's People

Contributors

adamwulf avatar andrewoverton avatar clemens-tolboom avatar derpoliuk avatar grant avatar muxi avatar nnegrey avatar santhoshvaddi avatar synemitchell avatar thomascassany avatar timburks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-docs-samples's Issues

iOS - sound not working when using GoogleSpeach

Hi,

i have issues with playing sounds after using GoogleSpeech - streaming version.
On the sample app it seems that device volume not working after one streaming. (can't change the volume or play sounds).

How can i fix this?

ios 8.4 iPhone 5

iOS 10 requires NSMicrophoneUsageDescription entry in the plist

FYI for those building for iOS 10 with Xcode 8: the previously-optional custom text for the microphone permission prompt is now mandatory, and the the demo speech app crashes without it when attempting to access the mic for the first time.

Would be nice to include this property in a future commit, for now you can add an NSMicrophoneUsageDescription entry to the plist yourself.

App crashes after Google Cloud Speech libs installation on iOS device

I am trying to use Google Cloud Speech API in one of my iOS application. I also installed "Cloud Speech Nonstreaming gRPC Objective-C Sample" application and it was running fine on device. However, after installing all necessary files, libs my application crashes in "
screen shot 2017-07-02 at 3 57 28 pm
gRPC-Core" folder. I am attaching screenshot below for your review.

Error in installing pod file

Hi All,

I am getting below error when trying to install the pod file for swift speech project. Mac version 10.11.6 , xcode 8 and pod verison 1.2.0 . Please help.

[!] Unable to find a specification for !ProtoCompiler-gRPCPlugin (~> 1.0.0-pre1.1) depended upon by googleapis

No recognized results

I've cloned this Objective-C/Speech-gRPC-Streaming repo, and run it successfully with a valid API key, as described in README. Plus, I also enabled billing with a credit card.
However, there is no any recognized text updates since I tapped 'Start Streaming' and said a few words, on my iPhone 6s (iOS 10.2.1).
Can any one help me?
Thanks in advance :)

ps: Xcode 8.2.1 on OS X 10.11.6

Workspace?

There doesn't appear to be a workspace file included and is throwing errors.

grpc streaming error in sample app

the ios streaming sample app now returns this error after about a second of audio processing:
{
error {
code: 10
message: "Audio data is being streamed too fast. Please stream audio data approximately at real time."
}
}

Example App have Error 403

when i pressed the [Process Recorded Audio] button. I had Error 403

{
  "error": {
    "code": 403,
    "message": "Requests from this ios client application \u003cempty\u003e are blocked.",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.Help",
        "links": [
          {
            "description": "Google developer console API key",
            "url": "https://console.developers.google.com/project/662893261214/apiui/credential"
          }
        ]
      }
    ]
  }
}

Then i found that populate the header with the bundle identitfier. It worked.

[request addValue:[[NSBundle mainBundle] bundleIdentifier] forHTTPHeaderField:@"X-Ios-Bundle-Identifier"];

Issue with protoc version

When I follow the readme and compiule the streaming version of the speech recognition demo, I get an error in the CloudSpeech.pbobjc.h

if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000

error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.

endif

When I check the command line protoc --version, I get
libprotoc 3.0.0

Thus I don't understand the error and don't know how to fix it.

Am I the only one to experience this?

Error when regenerating .proto file

Please execute this shell command then replace it with your console output.

ProductName: Mac OS X

ProductVersion: 10.12.5
BuildVersion: 16F73
pod --version 1.2.1
git ls-tree --full-name --name-only HEAD Podfile
/Users/Me/Desktop/ios_apps/Main/Epic/protos

Problem | Feature

I am trying to manually regenerate my protos files but i get the error

-bash: !ProtoCompiler/protoc: event not found

The command i am running is

../Pods/!ProtoCompiler/protoc —plugin=protoc-gen-grpc=../Pods/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin —objc_out=. —grpc_out=. -I . -I ../Pods/!ProtoCompiler *.proto

Thanks for the help

Speech-gRPC-Streaming - GRXBufferedPipe map: unrecognized selector

Hey,

I've build the Speech-gRPC-Streaming sample project without any problems, everything works fine.
After that, I've created a Swift project and integrated the gRPC framework and all dependancies
and added the AudioController, SpeechRecognitionService .h/.m files. I put the code from the ViewController.m in a seperate class GoogleObjc.m

When the (void) processSampleData:(NSData *)data gets invoked by the callback,
an error occurs:
-[GRXBufferedPipe map:]: unrecognized selector sent to instance

The exception breakpoint stops in the ProtoRPC.m class at the - (instancetype)initWithHost: method.

GRXWriter *bytesWriter = [requestsWriter map:^id(GPBMessage *proto) { if (![proto isKindOfClass:GPBMessage.class]) { [NSException raise:NSInvalidArgumentException format:@"Request must be a proto message: %@", proto]; } return [proto data]; }];

bildschirmfoto 2016-09-02 um 17 10 39

I didn't changed anything.
What could be the reason for this?

Thank you!

EXEC_BAD_ACCESS on BoringSSL on iOS

ProductName: Mac OS X
ProductVersion: 10.12.1
BuildVersion: 16B2657
pod-version: 1.2.1
xcode: 8.3.3

Problem | Feature

I had duplicate symbols since I am using openSSL on a different library. So I resolved these errors using preprocessor flags on other-c flags (example. -DX509_VAL_it=LibX509_VAL_it)
It's compiling but now I am getting a runtime error.

BoringSSL is giving me a EXEC_BAD_ACCESS:

screen shot 2017-10-13 at 4 35 59 pm

Not sure if it's because I need to be using a higher version of gRPCPlugin instead of:
s.dependency "!ProtoCompiler-gRPCPlugin", "~> 1.0.0-pre1.1

Update:
After digging a bit deeper, I noticed that when it tries to retrieves the EC_GROUP in ec_key.c, the key value is completely different than what it's been passed in from SSL_CTX_set_temp_ecdh (ssl_lib.c). The reference to group is no longer there when it tries to retrieve the group.

Failed at building using streaming(master)

Hi,

I was building the example for streaming on master branch and it worked successfully.

However, when I tried to integrate the codes into my own application after every standard procedures, it showed the following errors.
screen shot 2016-09-20 at 11 27 25 am

My procedures are:

  1. add pod 'googleapis', :path => '.' in my podfile
  2. copy googleapis.podspec and google folder to the same directory where *.xcodeproj is/
  3. pod install
  4. add AudioController and SpeechRecognitionService to my project
  5. run the application, and it showed the errors.

PS: I also saw
[!] TheMyProject [Debug]target overrides theALWAYS_SEARCH_USER_PATHSbuild setting defined inPods/Target Support Files/Pods-MyProject/Pods-MyProject.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the $(inherited) flag, or
- Remove the build settings from the target.`

Could this be the problem?

Anyone has any idea? Thanks

File not found

/Downloads/ios-docs-samples-master/speech/Swift/Speech-gRPC-Streaming/google/cloud/speech/v1beta1/CloudSpeech.pbrpc.h:1:9: 'google/cloud/speech/v1beta1/CloudSpeech.pbobjc.h' file not found

I am using the Swift version of Speech. I installed all the pods and tried running it. This is the error I got.

googlespeech files not found

redefinition of module 'openssl' error

Hi,

I try to run the project but there is this (redefinition of module 'openssl') error. Please see screenshot
I check the pod file and the pods are installed properly.
How do i fix this issue?
Thanks.

screen shot 2017-06-15 at 5 43 28 pm

Archive fails.

SujeetKumars-MacBook-Pro:CuddleVoiceAssistance sujeetkumar$ echo ''

SujeetKumars-MacBook-Pro:CuddleVoiceAssistance sujeetkumar$ echo "### OS"

OS

SujeetKumars-MacBook-Pro:CuddleVoiceAssistance sujeetkumar$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.4
BuildVersion: 16E195
SujeetKumars-MacBook-Pro:CuddleVoiceAssistance sujeetkumar$ echo '### POD'

POD

SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ pod --version
1.2.0
SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ echo "### Project"

Project

SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ git ls-tree --full-name --name-only HEAD Podfile
Podfile
SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ pwd
/Users/sujeetkumar/Documents/workspace/GoogleAppAi-GoogleSpeech-1/VoiceAssistance
SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ echo ''

While trying to make Archive, I am getting the following error

  1. Include of non-modular header file inside frameWork RxLibrary.
  2. Couldn't Build module RxLibrary.
  3. Couldn't build module GRPCClient.
  4. Couldn't build module ProtoRPC.

Thanks

Can't do "pod install"

I got this error :
[!] Unable to find a specification for !ProtoCompiler-gRPCPlugin (~> 1.0.0-pre1.1) depended upon by googleapis

My pod version is 1.0.1

EXC_BAD_ACCESS

Please execute this shell command then replace it with your console output.

sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G29
pod --version
1.2.0


Problem | Feature

gRPC Core issue when I run the code.
In the file named: pb_decode. I get the following error message. Any idea on how to fix this issue?
Thanks

screen shot 2017-08-05 at 17 48 10
c
if (init_data)
{
if (PB_LTYPE(iter->pos->type) == PB_LTYPE_SUBMESSAGE)
{
/* Initialize submessage to defaults */
pb_message_set_to_defaults((const pb_field_t ) iter->pos->ptr, iter->pData);
}
else if (iter->pos->ptr != NULL)
{
/
Initialize to default value /
memcpy(iter->pData, iter->pos->ptr, iter->pos->data_size);
}
else
{
/
Initialize to zeros */
memset(iter->pData, 0, iter->pos->data_size);
}
}

Can not record for [Cloud Speech Streaming gRPC Objective-C]

ProductName:	Mac OS X
ProductVersion:	10.12.6
BuildVersion:	16G29
pod --version 1.3.1


Problem | Feature

I copied the relevant information to my new project, and the successful use of pod install, and then the project can compile.
But I can not record the sound.

I add NSLog to
- (void) processSampleData: (NSData *) data { NSLog (@ "data:% @", data) ; ..... }
but I Get all 0x00

I inserted
AVAudioSession * audioSession = [AVAudioSession sharedInstance]; [audioSession setCategory: AVAudioSessionCategoryPlayAndRecord withOptions: AVAudioSessionCategoryOptionAllowBluetooth error: nil]; [audioSession setActive: YES error: nil];

until before
audioData = [[NSMutableData alloc] init]; [AudioController.sharedInstance prepareWithSampleRate: SAMPLE_RATE]; [SpeechRecognitionService.sharedInstance setSampleRate: SAMPLE_RATE]; [AudioController.sharedInstance start];

--

How to convert AVAudioPCMBuffer into NSData ?

Hi,

I want to tap into the AVAudioInputNode to capture the audio and perform speech recognition on it, so that other components of my application can still have access to audio stream.

However, AVAudioInputNode returns the data as AVAudioPCMBuffer but the speech recognition API expects NSData. How can I do the required conversion?

Thanks

Installation fails

Please execute this shell command then replace it with your console output.

### OS
ProductName:	Mac OS X
ProductVersion:	10.12.2
BuildVersion:	16C67

### POD
1.2.0

### Project
speech/Objective-C/Speech-gRPC-Streaming/Podfile

I switched to speech-v1beta1 branch and did pod install. Got following error:

$ pod install
Analyzing dependencies
Fetching podspec for `BoringSSL` from `https://github.com/grpc/grpc/raw/2b98c8838d2035296b9cb016fc9af2bb8a987d90/src/objective-c/BoringSSL.podspec`
Pre-downloading: `gRPC` from `https://github.com/grpc/grpc.git`, commit `2b98c8838d2035296b9cb016fc9af2bb8a987d90`
Pre-downloading: `gRPC-Core` from `https://github.com/grpc/grpc.git`, commit `2b98c8838d2035296b9cb016fc9af2bb8a987d90`, submodules `true`

[!] Error installing gRPC-Core
[!] /usr/bin/git -C /var/folders/z0/00bw53yj2jgdw8670qky2bv00000gn/T/d20170531-74631-5pt3pe submodule update --init --recursive

Submodule path 'third_party/boringssl': checked out 'c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9'
Submodule path 'third_party/googletest': checked out 'c99458533a9b4c743ed51537e25989ea55944908'
Submodule path 'third_party/nanopb': checked out 'f8ac463766281625ad710900479130c7fcb4d63b'
Submodule path 'third_party/protobuf': checked out 'bdeb215cab2985195325fcd5e70c3fa751f46e0f'
Submodule path 'third_party/zlib': checked out '50893291621658f355bc5b4d450a8d06a563053d'
Submodule 'third_party/nanopb' (https://github.com/nanopb/nanopb.git) registered for path 'third_party/nanopb'
Cloning into '/private/var/folders/z0/00bw53yj2jgdw8670qky2bv00000gn/T/d20170531-74631-5pt3pe/third_party/nanopb'...
error: The following untracked working tree files would be overwritten by checkout:
	doc/designstyle.css
Please move or remove them before you switch branches.
Aborting
warning: unable to rmdir third_party/benchmark: Directory not empty
Unable to checkout '05b155ff59114735ec8cd089f669c4c3d8f59029' in submodule path 'third_party/gflags'

Any hints on how to fix this? I want .h/.m files generated from the .proto files for Speech.

pod spec failure

When trying to run 'pod install' while in the directory of the streaming example:

Fetching podspec for googleapis from ../../../googleapis
[!] The googleapis pod failed to validate due to 3 errors:
- ERROR | attributes: Missing required attribute authors.
- ERROR | attributes: Missing required attribute homepage.
- ERROR | attributes: Missing required attribute source.
- ERROR | attributes: Missing required attribute summary.

This error is thrown.

Streaming speech recognition stops working on network switch (Wi-Fi to Cellular, Objective-C)

ProductName: Mac OS X
ProductVersion: 10.12
BuildVersion: 16A323
POD Version: 1.2.1
project: speech/Objective-C/Speech-gRPC-Streaming

Issue: When switching network from Wi-Fi to Cellular the speech recognition stops working. Even if we press 'Stop Streaming' and then again 'Start Streaming', the speech recognition does not start.

Tested on Release mode. Tested on multiple devices.

SSL handshake error at unsynchronized time with internet

This happens if device time different by +-5 minutes from internet time.

Full error log:

E1001 14:26:50.944571000 6140112896 ssl_transport_security.c:945] Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED.
E1001 14:26:50.944778000 6140112896 handshake.c:128] Security handshake failed: {"created":"@1475321210.944654000","description":"Handshake failed","file":"/Users/Zest/iOS/Prototypes/ios-docs-samples/speech/Objective-C/Speech-gRPC-Streaming/Pods/gRPC-Core/src/core/lib/security/transport/handshake.c","file_line":264,"tsi_code":10,"tsi_error":"TSI_PROTOCOL_FAILURE"}
E1001 14:26:50.947500000 6140112896 secure_channel_create.c:98] Secure handshake failed with error 1.
I1001 14:26:50.949456000 6140112896 subchannel.c:642] Connect failed: null
I1001 14:26:50.949519000 6140112896 subchannel.c:647] Retry in 0.835039167 seconds

StreamingRPC Swift Sample Code doesnt build - stickynote works fine. seems to be an issue with not finding the right headers...

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...

/Users/dominikpich/Downloads/avr google ios-docs-samples-master/speech/Swift/Speech-gRPC-Streaming/Speech/Speech-Bridging-Header.h:5:9: note: while building module 'googleapis' imported from /Users/dominikpich/Downloads/avr google ios-docs-samples-master/speech/Swift/Speech-gRPC-Streaming/Speech/Speech-Bridging-Header.h:5:
#import <googleapis/CloudSpeech.pbobjc.h>
        ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/googleapis-umbrella.h"
        ^
/Users/dominikpich/Library/Developer/Xcode/DerivedData/Speech-hhdczwvtbinadbeughkiimdsnftm/Build/Products/Debug-iphonesimulator/googleapis/googleapis.framework/Headers/googleapis-umbrella.h:15:9: note: in file included from /Users/dominikpich/Library/Developer/Xcode/DerivedData/Speech-hhdczwvtbinadbeughkiimdsnftm/Build/Products/Debug-iphonesimulator/googleapis/googleapis.framework/Headers/googleapis-umbrella.h:15:
#import "CloudSpeech.pbrpc.h"
        ^
/Users/dominikpich/Library/Developer/Xcode/DerivedData/Speech-hhdczwvtbinadbeughkiimdsnftm/Build/Products/Debug-iphonesimulator/googleapis/googleapis.framework/Headers/CloudSpeech.pbrpc.h:1:9: error: 'google/cloud/speech/v1beta1/CloudSpeech.pbobjc.h' file not found
#import "google/cloud/speech/v1beta1/CloudSpeech.pbobjc.h"
        ^
/Users/dominikpich/Downloads/avr google ios-docs-samples-master/speech/Swift/Speech-gRPC-Streaming/Speech/Speech-Bridging-Header.h:5:9: error: could not build module 'googleapis'
#import <googleapis/CloudSpeech.pbobjc.h>
        ^
<unknown>:0: error: failed to import bridging header '/Users/dominikpich/Downloads/avr google ios-docs-samples-master/speech/Swift/Speech-gRPC-Streaming/Speech/Speech-Bridging-Header.h'

https://www.dropbox.com/s/l4ck0envcb4guym/Screenshot%202017-04-05%2010.57.32.png?dl=0

GRPC Error code 14

ERROR: Error Domain=io.grpc Code=14 "Connectivity lost." UserInfo={NSLocalizedDescription=Connectivity lost.}

I am facing this issue every time using Speech-gRPC-Streaming demo.

I have followed all this steps

  • Create a project (or use an existing one) in the Cloud Console
    
  • Enable billing and the Speech API.
    
  • Create an API key, and save this for later.
    

GRPCProtoCall not found in stickynotes

Trying to build the stickynotes Swift RPC sample, and I've gotten pretty far, after installing Protobuf and gRPC from trunk (version 3.0.0-beta-3.1)

However now I'm getting "Expected a type" error in the auto-general protobuf code, it looks like GRPProtoCall class is not found. There is also an error about multiple methods named 'start'.

See attached screenshot

screen shot 2016-07-18 at 2 49 16 pm

iOS still stop at Installing gRPC-Core (1.3.0) step

ProductName:	Mac OS X
ProductVersion:	10.12.4
BuildVersion:	16E195
pod-version: 1.2.1
path: /Users/xxx/Desktop/grpc/examples/objective-c/helloworld

when I run pod install. It stop at Installing gRPC-Core (1.3.0) step;

➜  helloworld git:(master) pod install
Analyzing dependencies
Fetching podspec for `HelloWorld` from `.`
Downloading dependencies
Installing !ProtoCompiler (3.2.0)
Installing !ProtoCompiler-gRPCPlugin (1.3.0)
Installing BoringSSL (8.2)
Installing HelloWorld (0.0.1)
Installing Protobuf (3.3.0)
Installing gRPC (1.3.0)
Installing gRPC-Core (1.3.0)

Help me !

adding pod 'googleapis' to my project not working

SujeetKumars-MacBook-Pro:CuddleVoiceAssistance sujeetkumar$ echo "### OS"

OS

SujeetKumars-MacBook-Pro:CuddleVoiceAssistance sujeetkumar$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.4
BuildVersion: 16E195
SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ echo '### POD'

POD

SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ pod --version
1.2.0
SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ echo "### Project"

Project

SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ git ls-tree --full-name --name-only HEAD Podfile
SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ pwd
/Users/sujeetkumar/Documents/workspace/GoogleAppAi-GoogleSpeech/VoiceAssistance
SujeetKumars-MacBook-Pro:VoiceAssistance sujeetkumar$ echo ''

//Problem
<--adding pod 'googleapis' to my project podfile not working-->

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'CuddleVoiceAssistance' do

Comment the next line if you're not using Swift and don't want to use dynamic frameworks

use_frameworks!

Pods for VoiceAssistance

pod 'MBProgressHUD'
pod 'AlamofireObjectMapper', '~> 4.0'
pod 'PromiseKit', '~> 4.0'
pod 'googleapis'	

end

[!] Unable to find a specification for googleapis

swift examples dont compile due to error with boringSSL pod

hi,
the swift example doesnt compile due to error with boringSSL pod

./Pods/BoringSSL/include/openssl/module.modulemap:1:20: Redefinition of module 'openssl'

the installation:

Installing !ProtoCompiler (3.0.2)
Installing !ProtoCompiler-gRPCPlugin (1.0.2)
Installing BoringSSL (7.0)
Installing Protobuf (3.2.0)
Installing gRPC (1.0.2)
Installing gRPC-Core (1.0.2)
Installing gRPC-ProtoRPC (1.0.2)
Installing gRPC-RxLibrary (1.0.2)
Installing googleapis (0.0.1)
Generating Pods project

Got error when running SETUP for stickynotesapi's Go

OS

ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G29

POD

1.1.1

Project

[Redacted]/ios-docs-samples/solutions/stickynoteapi/gRPC/Go/go


Problem

Hey everyone,

I tried to run the sample to get a better grasp for gRPC, but the SETUP script fails. I got this error when running the go get server command:

# golang.org/x/net/http2
go/src/golang.org/x/net/http2/transport.go:227: req.Cancel undefined (type *http.Request has no field or method Cancel)
go/src/golang.org/x/net/http2/transport.go:231: req.Cancel undefined (type *http.Request has no field or method Cancel)
go/src/golang.org/x/net/http2/transport.go:902: req.Cancel undefined (type *http.Request has no field or method Cancel)

There are other errors after this step, but I think it's somewhat related. I have zero experience in Golang, apologies if I'm pretty clueless on this.

Any help would be appreciated!

Stay awesome,

Error when archiving app

Hey,

I integrated the speech api framework and the recognition within my app works fine. On device and simulator.
But when I try to get an archive of the application, the following errors appear:

Any ideas to solve this?
Include of non-modular header inside framework module 'RxLibrary'
Could not build module 'RxLibrary'
Could not build module 'GRPCClient'
Could not build module 'ProtoRPC'

bildschirmfoto 2016-11-07 um 15 11 21

Cocoapods dependencies are all up to date:
!ProtoCompiler 3.0.2
!ProtoCompiler-gRPCPlugin 1.0.1-pre1
BoringSSL 7.0
Protobuf 3.1.0
gRPC 1.0.1-pre1
gRPC-Core 1.0.1-pre1
gRPC-ProtoRPC 1.0.1-pre1
gRPC-RxLibrary 1.0.1-pre1

Podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'

# Uncomment this line if you're using Swift
use_frameworks!

target 'speech-control-siri' do

  pod 'googleapis', :path => '.'
  pod 'SpeechKit'
  pod 'CZPicker'

end

Podspec

Pod::Spec.new do |s|
  s.name     = 'googleapis'
  s.version  = '0.0.1'
  s.license  = 'Apache 2.0'
  s.authors  = { 'Google Inc.' => '[email protected]'}
  s.homepage = 'http://github.com/GoogleCloudPlatform/ios-docs-samples'
  s.source   = { :git => 'https://github.com/GoogleCloudPlatform/ios-docs-samples.git',
                 :tag => '0.0.1' }
  s.summary  = 'Service definitions for Google Cloud Platform APIs'

  s.ios.deployment_target = '10.0'
  s.osx.deployment_target = '10.9'

 # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
  s.dependency "!ProtoCompiler-gRPCPlugin", "~> 1.0.0-pre1.1"

  # Pods directory corresponding to this app's Podfile, relative to the location of this podspec.
  pods_root = 'Pods'

  # Path where Cocoapods downloads protoc and the gRPC plugin.
  protoc_dir = "#{pods_root}/!ProtoCompiler"
  protoc = "#{protoc_dir}/protoc"
  plugin = "#{pods_root}/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin"

  # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
  # You can run this command manually if you later change your protos and need to regenerate.  
  s.prepare_command = <<-CMD
    #{protoc} \
        --objc_opt=named_framework_to_proto_path_mappings_path=./protomap \
        --plugin=protoc-gen-grpc=#{plugin} \
        --objc_out=. \
        --grpc_out=. \
        -I . \
        -I #{protoc_dir} \
        google/*/*.proto google/*/*/*/*.proto
  CMD

  # The --objc_out plugin generates a pair of .pbobjc.h/.pbobjc.m files for each .proto file.
  s.subspec "Messages" do |ms|
    ms.source_files = "google/**/*.pbobjc.{h,m}"
    ms.header_mappings_dir = "."
    ms.requires_arc = false
    ms.dependency "Protobuf"
  end

  # The --objcgrpc_out plugin generates a pair of .pbrpc.h/.pbrpc.m files for each .proto file with
  # a service defined.
  s.subspec "Services" do |ss|
    ss.source_files = "google/**/*.pbrpc.{h,m}"
    ss.header_mappings_dir = "."
    ss.requires_arc = true
    ss.dependency "gRPC-ProtoRPC"
    ss.dependency "#{s.name}/Messages"
  end

  s.pod_target_xcconfig = {
    'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
	  'USER_HEADER_SEARCH_PATHS' => '$SRCROOT/..'
  }

end

Folder structure
bildschirmfoto 2016-11-11 um 15 52 58

Best regards,
Markus

Speech-REST-Nonstreaming Error 404 (Not Found) (version September 2, 2016)

2 months ago, I created trial account and test, SpeechAPI worked.
But this morning, I created API key (by upgraded account) and then pulled the lastest commit (Sep1, 2016 2:26AM). when I ran app. Error 404!
I also checked in Dashboard, and I didn't see any request.

This is the result:

<title>Error 404 (Not Found)!!1</title> <style> _{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}_ > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style>

404. That’s an error.

The requested URL /v1beta1/speech:recognize?key=***_my_key**_* was not found on this server. That’s all we know.

protobuf directory missing

On build, I'm getting a file not found error for google/protobuf/Descriptor.pbobjc.h

Within the file google/api/Annotations.pbobjc.m

The whole protobuf folder seems to be missing from the google directory.

Pod install fails - No such file or directory

Please execute this shell command then replace it with your console output.

ProductName:	Mac OS X
ProductVersion:	10.12.3
BuildVersion:	16D32
Cocoapods 1.1.1

Problem | Feature

The usual pod install fails for some reason.

/Users/alex/.gem/ruby/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/project.rb:186:in `realpath'
/Users/alex/.gem/ruby/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/project.rb:186:in `realpath'
/Users/alex/.gem/ruby/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/project.rb:186:in `add_file_reference'
/Users/alex/.gem/ruby/2.0.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/xcode/pods_project_generator/file_references_installer.rb:187:in `block (2 levels) in add_file_accessors_paths_to_pods_group'```

FacingMemoryLeak in Slice.c

Please execute this shell command then replace it with your console output.

### OS
ProductName:	Mac OS X
ProductVersion:	10.12
BuildVersion:	16A323
### POD
1.1.1
### Project
fatal: Not a git repository (or any of the parent directories): .git

Problem | Feature

FacingMemoryLeak in Slice.c

malloc_refcount *rc = gpr_malloc(sizeof(malloc_refcount) + length);

While installing through pods, its not installing and getting error "[!] No podspec found for `googleapis` in `.`"

I am trying to installing pod 'googleapis', :path => '.'
but, its getting following error
Analyzing dependencies
Fetching podspec for googleapis from .
[!] No podspec found for googleapis in .

And my pod file is

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

    target 'appName' do
      # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
       # use_frameworks!

      # Pods for AppSpeak
       pod 'MBProgressHUD'
       pod 'Fabric'
       pod 'Crashlytics'
       pod 'googleapis', :path => '.'
       end

Can anyone help to fix this?

protoc: No such file or directory error

While i install my pod , i am getting below error.

Can you help me to resolve this ?

[!] /bin/bash -c
set -e
Pods/!ProtoCompiler/protoc --plugin=protoc-gen-grpc=Pods/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin --objc_out=. --grpc_out=. -I . -I Pods/!ProtoCompiler google//.proto google////.proto

/bin/bash: line 2: Pods/!ProtoCompiler/protoc: No such file or directory

Unable to integrate streaming voice recognition service (header file not found)

ProductName:	Mac OS X
ProductVersion:	10.12.3
BuildVersion:	16D32
POD version: 1.2.0

---

### Problem | Feature
I was trying to integrate the streaming option for Objective-C into my project to see how it works
I copied folder "google" and googleapis.podspec into my folder
Then I added an entry to podfile(pod 'googleapis', :path => '.') and pod install
Everything was going great.
However, I couldn't compile and it showed:

> Lexical or Preprocessor Issue, 'openssl/base.h' file not found.

Any idea how to solve this?

Is there a better way to integrate streaming voice recognition service for Objective-C into my project?

I'm a little confused after check the sample code.

Thanks.

Cannot find .h files in Pods

When I try to run the Streaming gRPC Objective-C Sample (after Pod install and replacing API key), I get the following build error:

openssl/asn1.h file not found

However, in the Pods project, under BoringSSL, I can see the file asn1.h defined. Clicking on 'Open in Finder' takes me to the location of the file (meaning that XCode is able to find the file).

Please advise.

Archive swift ios project with speech lib take errors

I integrated speech api to my swift ios project with build and run demo on device successfully. But when i make archive to prepare to submit app, it takes 4 errors as following:

  1. Could not build module 'RxLibrary'.
    #import <RxLibrary/GRXWriter.h>
  2. Could not build module 'GRPCClient'.
    #import <GRPCClient/GRPCCall.h>
  3. Could not build module 'ProtoRPC'.
    #import <ProtoRPC/ProtoService.h>

Could anyone please help me to fix thems?
thanks,

Installation fails

Following the installation instructions:

[mercury:Speech-gRPC-Streaming] > pod install
Analyzing dependencies
Fetching podspec for `googleapis` from `.`
[!] Unable to find a specification for `!ProtoCompiler-gRPCPlugin (~> 1.0.0-pre1.1)` depended upon by `googleapis`

As far as can tell !ProtoCompiler-gRPCPlugin (~> 1.0.0-pre1.1) does not exist (the latest is pre1), but if I replace pre1.1 with pre1, it still gives me the same error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.