Handoff between iPhone and Mac

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Handoff between iPhone and Mac
Medium
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Implementing Handoff Between iPhone and Mac

Handoff between iPhone and Mac is built on the same NSUserActivity foundation as Handoff between iOS devices. However, there's a significant difference: on Mac, the application must be native (AppKit or Catalyst) or a PWA through Safari. A website version with the same domain through Universal Links can continue activity from iPhone via Safari to Mac — this is a separate scenario.

Mac-Side Specifics

If the application supports Mac through Mac Catalyst, most of the code is shared — the iOS NSUserActivity implementation works there as well. The processing point is AppDelegate.application(_:continue:restorationHandler:), which is present in Catalyst unchanged.

For a native Mac application (AppKit), we receive activity in applicationWillContinueUserActivity(_:) and application(_:continue:restorationHandler:) of the NSApplication delegate:

// NSApplicationDelegate
func application(_ application: NSApplication,
                 continue userActivity: NSUserActivity,
                 restorationHandler: @escaping ([NSUserActivityRestoring]) -> Void) -> Bool {
  guard userActivity.activityType == "com.myapp.editing-document",
        let docId = userActivity.userInfo?["documentId"] as? String else {
    return false
  }

  DocumentManager.shared.openDocument(id: docId)
  return true
}

Handoff Through Browser: Universal Links + Web Credentials

If the Mac version of the application is a website rather than a native application, Handoff works through Safari. The iPhone application creates NSUserActivity with webpageURL:

let activity = NSUserActivity(activityType: NSUserActivityTypeBrowsingWeb)
activity.webpageURL = URL(string: "https://myapp.com/documents/\(documentId)")
activity.isEligibleForHandoff = true
self.userActivity = activity
activity.becomeCurrent()

Mac Safari will open this URL. For the reverse — opening the iPhone application from Mac Safari — you need Universal Links with apple-app-site-association. This is a separate setup process, not directly related to NSUserActivity.

Continuity Camera and AirDrop Are Not the Same

A common misconception during the design phase: clients call any synchronization between iPhone and Mac "Handoff". Technically:

  • Handoff — continuation of current activity (open document, position in list)
  • Continuity Camera — using iPhone as a webcam or scanner for Mac
  • AirDrop — one-time file transfer
  • iCloud sync — background data synchronization

These are different frameworks with different APIs. During the design phase, it's important to clarify what the client actually needs.

Testing

Handoff requires two physical devices with the same Apple ID, Wi-Fi in the same network, and Bluetooth enabled. Simulator — only for testing NSUserActivity handling logic, not for Handoff itself. A characteristic error: activity doesn't appear on Mac because the Bundle ID in Capabilities doesn't match between iOS and Mac targets.

What's Included

  • NSUserActivity on iOS with correct userInfo and needsSave
  • Handling on Mac (Catalyst or AppKit)
  • Optionally: webpageURL for Safari → Safari scenario
  • Capabilities and entitlements configuration on both targets
  • Testing on physical devices

Timeline

3–5 days depending on the complexity of the state that needs to be transferred and the availability of a Mac target in the project. Pricing is calculated individually.