Skip to main content

Build an iOS App with Google Home APIs: A Codelab Tutorial

Google for DevelopersJune 30, 202516 min4,465 views
25 connections·40 entities in this video→

Project Setup and Authentication

  • πŸ’» Clone the sample app source code from GitHub, utilizing the 'start' branch for development and the 'finished' branch for verification.
  • πŸ”‘ Enable app test capability and create Apple deployment configuration files, noting that this requires a physical iOS device.
  • πŸ” Set up authentication using OAuth 2.0 by signing into Google Cloud, creating OAuth credentials, and configuring the consent screen.
  • πŸ› οΈ Obtain the Home API SDK and integrate its framework files into your Xcode project, ensuring correct embedding settings for SDK and types frameworks.

Core API Functionality

  • 🏠 Initialize the Home object to access all entities and structures within the user's smart home.
  • πŸ”Œ Implement Device and Structure APIs to obtain, control, and manage devices within rooms, with unsupported devices marked accordingly.
  • πŸ’‘ Enable device interaction by implementing primary actions, such as toggling the on-off state for smart plugs.
  • βž• Manage rooms by implementing functions to add new rooms, move devices between rooms, and delete empty rooms.

Matter Device Integration

  • πŸ”— Use Commissioning APIs to add Matter devices to the Google Home ecosystem, requiring a compatible Matter device and Google Hub.
  • πŸ“² Implement the add Matter device function to initiate the Matter device commissioning flow within the app.
  • 🌐 Add devices to the Google fabric by selecting the add icon, choosing 'add device to Google fabric', and naming the device.

Automation Creation and Management

  • πŸ€– Understand automation components: Starters (initial conditions), Conditions (additional constraints), and Actions (commands or state updates).
  • ✍️ Create an automation by implementing functions to define triggers and actions, such as turning off a light after a set delay.
  • πŸ§ͺ Test automations by saving them in the app and observing the device behavior, like a light automatically turning off.
  • πŸ—‘οΈ Delete automations by swiping left on an existing automation and tapping the trash icon.
Knowledge graph40 entities Β· 25 connections

How they connect

An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.

Hover Β· drag to explore
40 entities
Chapters7 moments

Key Moments

Transcript56 segments

Full Transcript

Topics13 themes

What’s Discussed

Google Home APIsiOS App DevelopmentDevice APIStructure APICommissioning APIAutomation APIMatter DevicesSmart HomeXcodeOAuth 2.0Google CloudApple Developer ProgramSDK Frameworks
Smart Objects40 Β· 25 links
ProductsΒ· 19
MediasΒ· 2
ConceptsΒ· 18
CompanyΒ· 1