Skip to content

Migrate speech to text example app to swift package manager & fix compile errors #1402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 11, 2022

Conversation

Jake-Prickett
Copy link
Contributor

Motivation:

After reading that SwiftNIO was dropping support for CocoaPods I thought it'd be fun to revisit the example App and refresh it.

I also believe this PR resolves #1393

Modifications:

  • Removed Cocoapods from the Speech to Text Example App
  • Added missing resource.proto to generation step (Must have been added recently)
  • Added the required Swift Packages to the project

@@ -16,6 +16,7 @@

import GRPC
import Logging
import Foundation
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatter doesn't like the order of these imports, I don't think we need Foundation here so let's just remove it.

Suggested change
import Foundation

Copy link
Contributor Author

@Jake-Prickett Jake-Prickett May 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I remove the import, the compiler has trouble finding Data for the stream(_ data: Data, ..) method below. Not 100% certain why, my hunch would be that when removing Cocoapods a project setting changed that allowed it to not be required.

I've corrected the order of the imports 👍

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, great, thanks!

Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Jake-Prickett, just one suggestion left inline.

@glbrntt glbrntt added the semver/none No version bump required. label May 10, 2022
@glbrntt glbrntt merged commit 0981d4d into grpc:main May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google_Cloud_Speech_V1_SpeechAdaptation is not found
2 participants