iMessage 应用程序检测接收者是否安装了相同的应用程序
iMessage App to detect if receiver has the same app installed
我正在尝试在 iOS 10 台设备上开发 iMessage 应用程序。
想知道我是否可以检测接收器是否安装了我的应用程序?
因为我想在安装后执行某些操作,反之亦然。
看看这个 link:
https://developer.apple.com/reference/messages/msmessage
你可以阅读这个:
iOS device with the iMessage app installed.
If the extension is not running, the system launches it using the
init(session:) presentation style. The conversation’s selectedMessage
property is set to the tapped message, and the view controller’s
willBecomeActive(with:) and didBecomeActive(with:) methods are called.
If the extension is running, the system calls the view controller’s
willSelect(:conversation:) method. It then updates the conversation’s
selectedMessage property and calls the view controller’s
didSelect(:conversation:) method.
Override willSelect(:conversation:) or didSelect(:conversation:) to
respond to the user selecting a new message.
You can also save messages to the file system and process them later.
iOS device without the iMessage app installed.
The system opens the
App Store for iMessage and prompts the user to install the iMessage
app.
总而言之,iMessage 会为您检测用户是否已经安装了该应用程序。但是您将无法为用户没有应用程序的部分自定义操作。如果用户确实有应用程序,当他点击你的 iMessage 时,你可以做任何你想做的事情。
我正在尝试在 iOS 10 台设备上开发 iMessage 应用程序。
想知道我是否可以检测接收器是否安装了我的应用程序?
因为我想在安装后执行某些操作,反之亦然。
看看这个 link: https://developer.apple.com/reference/messages/msmessage
你可以阅读这个:
iOS device with the iMessage app installed.
If the extension is not running, the system launches it using the init(session:) presentation style. The conversation’s selectedMessage property is set to the tapped message, and the view controller’s willBecomeActive(with:) and didBecomeActive(with:) methods are called.
If the extension is running, the system calls the view controller’s willSelect(:conversation:) method. It then updates the conversation’s selectedMessage property and calls the view controller’s didSelect(:conversation:) method.
Override willSelect(:conversation:) or didSelect(:conversation:) to respond to the user selecting a new message.
You can also save messages to the file system and process them later.
iOS device without the iMessage app installed.
The system opens the App Store for iMessage and prompts the user to install the iMessage app.
总而言之,iMessage 会为您检测用户是否已经安装了该应用程序。但是您将无法为用户没有应用程序的部分自定义操作。如果用户确实有应用程序,当他点击你的 iMessage 时,你可以做任何你想做的事情。