How is user activity info transferred in Handoff? The doc suggests that larger-scale data synchronization is handled via iCloud but doesn't say what mechanism is used for small data.
How is user activity info transferred in Handoff?
377 Views Asked by Boon At
3
There are 3 best solutions below
0

For larger amounts of data, you can use continuation streams between the two devices. For example:
[userActivity getContinuationStreamsWithCompletionHandler:^(
NSInputStream *inputStream,
NSOutputStream *outputStream, NSError *error) {
// your code
}
0

From what I understand all of Handoff's communication is done via Bluetooth LE. The only interaction with iCloud that I've read about is the requirement that both devices are logged in with the same iCloud account.
If you're interested in learning more about it definitely check out Adopting Handoff on iOS and OS X from this year's WWDC session videos.
For small data you can just pass an NSDictionary "userInfo" from device to device. There are a limited amount of object classes you are allowed to store in userInfo. For more information about this NSDictionary check the dev docs out