jj.
jj.

Reputation: 333

Set Bundle Id for Google APIs Client Library for iOS

Has the issue of setting the bundle identifier for the GoogleAPIClientForREST/YouTube ever been resolved?

I found these but never a resolution or solution:

https://issuetracker.google.com/issues/35173446 https://github.com/google/google-api-objectivec-client-for-rest/issues/70

Seems to me if there is a pulldown to set the bundle id, there should be a way to set it in iOS, and there should be something more useful then "remove the bundle id."

Upvotes: 0

Views: 654

Answers (1)

jj.
jj.

Reputation: 333

I found how to do it by looking at the test source and another post here:

Test source

Hint from another stackoverflow post

    let query = GTLRYouTubeQuery_SearchList.query(withPart: "id,snippet")
    var bundleIdentifier = Bundle.main.bundleIdentifier
    bundleIdentifier = bundleIdentifier?.trimmingCharacters(in: .whitespacesAndNewlines)
    query.additionalHTTPHeaders = ["X-Ios-Bundle-Identifier" : bundleIdentifier!]

Upvotes: 1

Related Questions