Mobile Development 10 min read

Integrating SiriKit for Messaging in iOS Apps: QQ’s Step‑by‑Step Guide

This article explains how third‑party iOS apps can adopt SiriKit to enable voice‑controlled messaging and calling, using QQ’s implementation as a detailed example, and walks through the required Intents and UI extensions, configuration, and handling logic.

Tencent TDS Service
Tencent TDS Service
Tencent TDS Service
Integrating SiriKit for Messaging in iOS Apps: QQ’s Step‑by‑Step Guide

1. Overview

Apple opened the SiriKit API to third‑party apps in iOS 10. QQ was the first to support Siri’s send‑message and call features, allowing users to ask Siri to send a QQ message or make a QQ call directly.

The article explores the user experience of Siri integration, which apps can adopt SiriKit, and the steps required for integration.

Siri sending QQ message demo
Siri sending QQ message demo

2. SiriKit Introduction

SiriKit is Apple’s development framework that lets third‑party apps expose specific voice‑driven domains such as VoIP calling, messaging, payments, image search, ride‑hailing, CarPlay, and restaurant reservations. If an app implements any of these functions, it can be integrated with SiriKit.

Siri handles speech recognition and delivers an Intent object to the app; developers only need to work with these Intent objects, without dealing with natural language processing themselves.

SiriKit architecture
SiriKit architecture

3. SiriKit Integration

Integration requires adding an Intents Extension target to the Xcode project. This extension runs independently of the containing app and processes Siri’s Intent requests. To provide a custom UI, an additional Intents UI Extension target is needed.

For QQ’s messaging feature, the steps are:

1) Add the INSendMessageIntent to the IntentsSupported array in the extension’s Info.plist. If a feature should be disabled on the lock screen, add it to IntentsRestrictedWhileLocked.

Info.plist configuration
Info.plist configuration

Intents Extension

When a user says “Send a message to Wang Yiran with QQ saying hello”, Siri parses the speech and presents a confirmation UI. The request consists of four parts:

App name : Identifies which app to use.

Send‑Message Intent : Indicates the messaging action.

Recipient : The contact’s nickname.

Message content : The text to be sent.

Message confirmation UI
Message confirmation UI

The app must implement the INSendMessageIntentHandling protocol, handling four key methods:

ResolveRecipientsForSendMessage : Verify the recipient exists in the QQ friend list and return a resolution result.

ResolveContent : Optionally modify the message content (e.g., replace keywords with emojis).

ConfirmSendMessage : Perform any authorization checks before confirming the send action.

HandleSendMessage : Execute the actual sending logic and display a success UI.

Message sent success UI
Message sent success UI

Intents UI Extension

If an Intent supports a custom UI, the Intents UI Extension can present a richer interface using a standard UIViewController subclass. The extension’s Info.plist must specify the initial view controller or storyboard. When the system receives a response from the Intents Extension, it launches the UI Extension and calls configureWithInteraction:context:completion: on the INUIHostedViewSiriProviding protocol to obtain the Intent and present the appropriate child view controller.

Intents UI extension lifecycle
Intents UI extension lifecycle

4. Conclusion

Although SiriKit currently supports a limited set of domains, QQ’s experience shows that Apple is committed to voice integration. As the first third‑party app to use SiriKit, QQ encountered some bugs, many of which were resolved after feedback to Apple. Speech recognition for mixed Chinese‑English remains imperfect, but future improvements are expected, along with broader domain support.

iOSQQVoice AssistantSiriKitIntents Extension
Tencent TDS Service
Written by

Tencent TDS Service

TDS Service offers client and web front‑end developers and operators an intelligent low‑code platform, cross‑platform development framework, universal release platform, runtime container engine, monitoring and analysis platform, and a security‑privacy compliance suite.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.