Data synchronization between iPhone and Apple Watch

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
Data synchronization between iPhone and Apple Watch
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 Data Synchronization Between iPhone and Apple Watch

Synchronization between iPhone and Apple Watch is a separate discipline with a set of constraints that differ significantly from regular network operations. Watch runs on watchOS and communicates with iPhone through WatchConnectivity. Without understanding transmission modes and Watch application lifecycle, we either lose data or drain the battery.

WatchConnectivity: Three Transmission Channels

WCSession provides several mechanisms, each for its own task:

updateApplicationContext — a dictionary that the system delivers when the Watch application is next activated. A new call overwrites the previous one. Suitable for "the last actual state": app settings, user profile. Not suitable for event queues — intermediate values are lost.

sendMessage — synchronous real-time transmission, works only when both applications are active. If the Watch application is in the background — the message is dropped. Response via replyHandler. Used for commands: user pressed a button on Watch, iPhone should respond immediately.

transferUserInfo — a queue that guarantees delivery even if Watch application is closed. Each call is queued separately, nothing is overwritten. Suitable for workouts, steps, events — everything important not to lose.

transferFile — file transmission (images, audio, databases). Also queued, delivered in the background.

import WatchConnectivity

class WatchSessionManager: NSObject, WCSessionDelegate {
  private let session = WCSession.default

  func setup() {
    guard WCSession.isSupported() else { return }
    session.delegate = self
    session.activate()
  }

  // Sending current data (settings):
  func syncSettings(_ settings: [String: Any]) {
    guard session.isReachable else {
      // Watch is not available now — use applicationContext for deferred delivery
      try? session.updateApplicationContext(settings)
      return
    }
    session.sendMessage(settings, replyHandler: nil)
  }

  // Sending event from queue (workout, transaction):
  func enqueueWorkout(_ workout: WorkoutData) {
    session.transferUserInfo(workout.dictionary)
  }
}

Lifecycle and Typical Errors

A Watch application doesn't live permanently in the background. It has a strict budget: if the application hasn't been activated for a long time, watchOS will unload it. On next opening — applicationContext will arrive, sendMessage messages — no.

The most common error: developer uses sendMessage to deliver data from the last 8 hours (e.g., steps from HealthKit) and wonders why data is lost. sendMessage is only for real-time when both devices are active. For data "deliver on next opening" — use transferUserInfo.

WCSession.delegate must be set before activate(). Setting it after — doesn't cause a crash, but guarantees skipping the first events. In a SwiftUI project, create WatchSessionManager in @main App before the first View appears.

Handling on Watch Side

// WKExtensionDelegate or watchOS App lifecycle
func session(_ session: WCSession,
             didReceiveApplicationContext applicationContext: [String: Any]) {
  DispatchQueue.main.async {
    // update UI only on main queue
    self.viewModel.updateFromContext(applicationContext)
  }
}

func session(_ session: WCSession,
             didReceiveUserInfo userInfo: [String: Any]) {
  // save data to Watch local storage
  WorkoutStore.shared.save(userInfo)
}

WCSession handlers are called on background queue. Any UI update must be via DispatchQueue.main.async — this is not optional.

When WatchConnectivity Is Not Enough

If you need data synchronization without active connection to iPhone — CloudKit or Core Data with cloud sync. Watch has its own CloudKit container and can sync directly to the server, bypassing iPhone. This is important for scenarios when Watch works without iPhone (swimming workout, running without phone).

HealthKit is a separate story: workout, heart rate, and step data is stored in a shared HealthKit repository and is accessible on both iPhone and Watch through the same HKHealthStore API. No need to use WatchConnectivity for HealthKit data.

What's Included

  • Setting up WCSession on both sides with correct lifecycle
  • Choosing transmission mechanism for each data type
  • Queue transferUserInfo for guaranteed delivery
  • Error handling and state checks: isReachable, isPaired, isWatchAppInstalled
  • Testing on physical iPhone + Apple Watch (simulator WatchConnectivity is limited)
  • Synchronization via CloudKit for Watch offline operation if needed

Timeline

3–5 days depending on the complexity of synchronized data and requirements for offline mode. Pricing is calculated individually after analyzing the project architecture.