Posts

Upgrading to Google Cast iOS SDK 2.4.0

Image
Recently I've been working on the samples for the Chromecast SDK on iOS. Since we've just updated the sample app for the brand new 2.4.0 SDK, I thought I'd briefly note down the changes I had to make, which should help if you need to update your own app from 2.3.0. As always, the full list of changes can be found in the release notes.Update FrameworksThe first step is to drop the new GoogleCast.framework into the project. You'll immediately notice that some classes have changed, and that there is a new dependency on SystemConfiguration.framework, so add that in your Linked Frameworks and Libraries section in the General Project Settings.GCKDeviceScannerTo simplify the scanning and connection process, filtering has been merged right into GCKDeviceScanner. Start by removing any references to GCKDeviceFilterListener or GCKDeviceFilter as this functionality is now part of the GCKDeviceScanner directly. Remove any of the delegate methods you may have implemented in GCKDevic…

Detect whether users have uploaded a profile picture to Google+

Image
Very short post on a small feature that I know will be a popular one with some people! A regular feature request has been the ability to determine whether the profile picture with a Google+ profile is the default blue head or not. You can do that right now with the people.get API calls - and you can try it yourself from that page using the explorer. The change is that under the "image" key you'll see an "isDefault" value. For my user you can see it's false: "image": { "url": "https://lh6.googleusercontent.com/.../photo.jpg?sz=50", "isDefault": false },But for this blue head user, it's true:"image": { "url": "https://lh3.googleusercontent.com/.../photo.jpg?sz=50", "isDefault": true },Hopefully this should make it easier to determine whether to use the profile picture from Google+ when people sign in to your apps.Client libraries might take some time to be regenerat…

Google Sign In with Server Side Auth on iOS

Image
The release today of version 1.7 of the Google+ iOS SDK added the ability to authorise both a client and server for access to Google APIs. This has been a feature for Android and Web based sign-ins for a while, and now is available across all three platforms. This should simplify server side code for people who have been building cross platform apps - for example if you need to retrieve profile information on the client, but retrieve circles on a server for a friend finding feature.The implementation for iOS is fairly straightforward. When setting up authentication, simply specify the client ID of your server on on the GPPSignIn object. This should be a client ID from the developer console which is used by your server-side code, and should be part of the same console project as your iOS client ID. For those that have done it, this is the same parameter used when retrieving an ID token:You can see that the first part of the client ID (the project number) is the same, but the other par…

Migrating Away From Userinfo

Image
As part of the move to full OpenID connect support recently, the "userinfo" scopes and endpoint were deprecated and scheduled for shutdown in September 2014. If you are using the userinfo API endpoint to retrieve email address or profile information for a Google user, now is the time to change! Luckily, it's just a few minutes of work to move from the userinfo API to the people.get API for most people, and wont affect users at all.What should you do?Check whether you're using userinfoUpdate scopesReplace userinfo API call with a call to plus.people.getAre you using the endpoint?Look for the section in your code where you retrieve the user's profile or email address. If you make the API call directly, you may see a URL like "https://www.googleapis.com/oauth2/v1/userinfo". The "v1" might also be "v2" as there are a couple of different versions of the api, but if it has /oauth2 then you're using the userinfo endpoint. If you're …