As TN3135 clearly explains the limitations apple puts on the low level networking, it doesn’t really give a reason. Presumably the power consumption problem. But as the battery technology continues evolving, it could be exciting that apple might loose the restrictions someday. The watch itself is powerful enough to do a lot of sophisticated works, sure it works best with companion apps on iPhone, but even as a standalone device, we can still provide many advanced user experience with low level networking supports.
wish apple guys can read it and give a consideration.
Watch Connectivity
RSS for tagImplement two-way communication between an iOS app and its paired watchOS app using Watch Connectivity.
Posts under Watch Connectivity tag
61 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Criticism of the use of the Minimed Mobile App, problem with the update interval of the Apple Watch iOS
Subject: Error event - Minimed Mobile App . Triggered by insufficient update interval of the Watch iOS system of only 50 updates/day
Dear Sir or Madam,
I use the Minimed Mobile App in conjunction with my Medtronic 780 G insulin pump and am generally very satisfied with the app. However, I have noticed a point here that is caused by the Apple Watch iOS operating system. I would like to pass this on and ask that you please fix this problem with an update.
Updating the sensor values on watch faces on the Apple Watch
I use the Modular widget on my Apple Watch in conjunction with the Minimed mobile app to quickly and easily keep an eye on the current sensor value. Unfortunately, the sensor value in this widget is not updated automatically according to someone in the know, Apple only updates widget information 50 times a day. After a short time, a rotating arrow appears instead of the current value, which I have to press to get a sensor value displayed again in order to see the current value.
This is very inconvenient as I have to perform several actions each time to see the current value:
1.Open widget
2.Press the rotary arrow
3.Read the value
Close widget by pressing the spin button at the top right to return to the main screen
I would very much welcome it if the sensor value in Apple Watch watch faces were updated automatically, the problem is obvious - the watch faces only update 50 times a day. This would prevent me from seeing the current sensor value quickly and easily at any time without having to perform additional and cumbersome actions.
The Minimed Mobile App has been tested and approved by Medtronic through Apple. However, it must have been overlooked that this sensor value app updates the sensor value every 5 minutes, but it does not do this on the dial because, according to my friend, it only updates 50 times a day. Now it is the case that the sensor value can change every 5 minutes, but this is not shown on the watch face, which means that the Apple Watch iOS would need 288 updates for this Minimed Mobile App per day instead of only 50 updates per day.
Can you please advocate for a new update that allows an update interval of up to 288 updates per day? So that thousands of diabetics worldwide can see current values on their Apple Watch dials at any time? Without having to take several steps each time? I switched to I Phone and Apple Watch because I thought this would be possible for me. I would be very happy to hear back if this is technically possible for all diabetics worldwide who will benefit from it.
With kind regards
Hi,
I would like to stream live audio (hls) from watch itself, our app can start stream on paired device, but when phone is not near by i want to start streaming on watchos (just like spotify or Apple music app) I watched the 2019 wwdc video about streaming and also looked to the documentation
Documentation : https://developer.apple.com/documentation/watchkit/storyboard_support/playing_background_audio
I can present the route controller to select output, but for example after selecting Air Podcas, stream did not start..
Here is the code: (I have enabled background mode audio)
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, policy: .longFormAudio, options: [])
}
catch {
print("no audiosession!")
}
AVAudioSession.sharedInstance().activate(options: []) { success, error in
dump(success)
dump(error)
DispatchQueue.main.async {
if let streamURL = moduleItem.media?[0] as? String {
dump(streamURL)
let asset = AVURLAsset(url: URL(string: streamURL)!, options: nil)
let item = AVPlayerItem(asset: asset)
let player = AVQueuePlayer(playerItem: item)
player.play()
}
}
}
I am trying to develop a watch app and got all the plumbing in place. I successfully send messages from the phone to the watch and see updates reflected in the UI. However when I connect to a device that streams data over bluetooth, using the same messaging interface the data fails to transfer. It appears WCSession.default.isReachable becomes false as soon as this BLE stream starts. I suspect the app is prioritizing the BLE radio for this instead of connectivity to the watch? Is my assumption valid? Are there any workaround to this?
Despite the iPhone 11 running iOS version 17.4.1 and the Apple Watch Series 3 operating on version 8.8.1, and both devices being connected, the Apple Watch remains undetected within Xcode version 15.3.
I am a watchOS 10.0 device, try to open the developer mode, according to the official website to enter the Settings > Privacy > Developer Mode. But I don't see the developer mode option, how do I turn on the developer mode for watchOS 10.0 device?
I'm building complications using WidgetKit and SwiftUI. The complications work, but the previews don't appear right away when applying the .watchface.
How can I ensure the complication previews show up immediately when a user adds the watch face?
Any guidance is appreciated.
Good morning,
I come to you for a question:
When I install my application on my iPhone for the first time, and I install the watch application from the native "Watch" application, the Watch Connectivity function does not work, I have to do the installation from Xcode to the watch for this function to work.
Is this normal? if yes, the problem will not arise during a publication?
I have the same problem when using watch and iPhone simulators, WatchConnectivity does not work.
I am this error code in Xcode:
-[WCSession handleIncomingUserInfoWithPairingID:]_block_invoke delegate (null) does not implement session:didReceiveUserInfo:, discarding incoming content
Here is the code for the iPhone and the watch:
In my iPhone app:
import WatchConnectivity
let userDefaultsDataVenantWatch = UserDefaults.standard
class PhoneDataModel : NSObject, WCSessionDelegate, ObservableObject {
static let shared = PhoneDataModel()
let session = WCSession.default
@Published var TableauSynchroIphoneVersWatch : [String:String] = ["0":"0"]
@Published var dataWatchVersIphone: [String:String] = ["":""]
override init() {
super.init()
if WCSession.isSupported() {
session.delegate = self
session.activate()
} else {
print("ERROR: Watch session not supported")
}
}
func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) {
if let error = error {
print("session activation failed with error: \(error.localizedDescription)")
return
}
}
func sessionDidBecomeInactive(_ session: WCSession) {
session.activate()
}
func sessionDidDeactivate(_ session: WCSession) {
session.activate()
}
func session(_ session: WCSession, didReceiveUserInfo userInfo: [String : Any]) {
guard let newCount = userInfo["TableauSynchroIphoneWatch"] as? [String:String] else {
print("ERROR: unknown data received from Watch TableauSynchroIphoneWatch")
return
}
DispatchQueue.main.async {
print(newCount)
}
}
}
In my Watch app:
import WatchConnectivity
let userDefaultsDataVenantIphone = UserDefaults.standard
var TableauVenantIphone:[String:String] = ["":""]
class WatchDataModel : NSObject, WCSessionDelegate, ObservableObject {
static let shared = WatchDataModel()
let session = WCSession.default
@Published var TableauSynchroIphoneWatch : [String:String] = ["0":"0"]
override init() {
super.init()
if WCSession.isSupported() {
session.delegate = self
session.activate()
} else {
print("ERROR: Watch session not supported")
}
}
func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) {
if let error = error {
print("session activation failed with error: \(error.localizedDescription)")
return
}
}
func session(_ session: WCSession, didReceiveUserInfo userInfo: [String : Any]) {
guard let newCount = userInfo["TableauSynchroIphoneVersWatch"] as? [String:String] else {
print("ERROR: unknown data received from Watch TableauSynchroIphoneWatch")
return
}
DispatchQueue.main.async {
print(newCount)
}
}
}
Thank for your answers !
AFAIK, background execution with Background Tasks framework is all budgeted. E.g., if we try to use it too much, the system would simply stop letting us do it, at least for some time.
Is it the same when we do sendMessage from Watch app to iOS app? Is there a chance we may overuse it so that system stops waking up the iOS app? Or I can rely and use sendMessage as often and heavy as I need?
It's not just me that the watch doesn't show up in Xcode 15.3, Watch 10.4, iOS 17.4.1, right?
In Xcode, the Mac and iPhone are connected and displayed, but only the watch is not working. And when I run the complication app, oddly enough, it prompts to install the app on the iPhone device's watch app? It's really strange, isn't it? But the installation doesn't actually happen. It seems like a funny thing with Apple. Does anyone know when this will be fixed?
I currently have an app that is a companion app alongside the iOS app. I wonder if it is possible for me to make this app both a standalone and a companion app. Essentially if someone does not have an iphone they can still use the app. Is this possible?
Since I installed iOS 17.4.1, my Apple Watch Series 1 no longer shows the media that is playing on my iPhone or Apple TV. Does anyone know anything about it?
How can I implement a feature in my iOS and watchOS app to prompt users to download it when they try to apply a custom watch face shared from my app, as shown in the example image? We're using WidgetKit for Complications.
I am trying to get iPhone and watch simulator to send message to each other. I am getting this error(s) all the time:
Error Domain=WCErrorDomain Code=7012 "Message reply took too long." UserInfo={NSLocalizedDescription=Message reply took too long., NSLocalizedFailureReason=Reply timeout occurred.}
-[WCSession _onqueue_notifyOfMessageError:messageID:withErrorHandler:] 0F2558A6-6E42-4EF1-9223-FBC5336EE490 errorHandler: YES with WCErrorCodeMessageReplyTimedOut
Is there are some guideline on how to connect them together? Maybe I a missing some step. For clarification, sometimes they do connect but it feels like pure luck. Please help.
Enable Developer Mode - Missing
Trust this computer - Missing, if the prompt happens and you accidentally tap the verbiage or the crown before scrolling to the buttons, you never ever see the trust this computer again.
Double tapping the side button or crown to kill apps is a game of roulette. If you don’t swipe the app in mere seconds the list disappears or one of the background apps becomes active.
After upgrading all watches to 10.4 and pairing to a phone guess what? Enable developer mode - missing. Now I have a few watches that cannot be used for development. When is Apple going to address this glaring bug people have been reporting and talking about in the forums for almost a year with versions of watchos from as early as 9.x and iOS 16?
I am working on an application design where I would like to have the Iphone running an app such as Apple Map, and while I might be driving in the car I would like to have my apple Watch invoke a screen shot of the current view of I map showing my location without having to use the iphone.
So the Iphone would be active and in a car holder displaying my location on the map.
Once I made my route point, such as a waypoint. I would like to press a button on my watch app to do a screen print.
Second though is, could I press a button on my Apple Watch app to fire an request to my own IOS Application using WatchConnectivity to capture my Location to a data file.
Third thought is could a press a button on my Apple Watch app to interact with an active app, which is an app like a reminder app and create a new Reminder Note in the active app in focus on my Iphone, but is not a component of my IPhone App.
Thanks for any insight how I could make a Apple Watch app send Button Presses reliably to my Iphone Application active, so that I. could avoid having to touch my iPhone?
Thanks in advance for any guidance.
I am experiencing difficulties in fully integrating my Apple Watch with a supervised iPhone under MDM control. While I have successfully paired the watch with the iPhone, I am facing issues with some apps not syncing or appearing on the Apple Watch. This issue persists despite having allowed their bundle IDs in the MDM’s whitelist. Could anyone provide guidance on which specific Apple bundle ID is crucial for maintaining the connectivity and functionality between the iPhone and the Apple Watch? Understanding this would help in ensuring that the necessary bundle ID is whitelisted in the MDM settings, thus resolving the app visibility and functionality issues on the Apple Watch.
Hey there,
I'm implementing Watch Complications in an existing project, and I'm having the problem that transferCurrentComplicationUserInfo(_:) works exactly as transferUserInfo(_:) is described in the documentation, but not as it should.
That is, when the WatchApp is opened, func session(_ session: WCSession, didReceiveUserInfo userInfo: [String: Any] = [:]) receives the data sent by transferCurrentComplicationUserInfo(_:). If not, the data is queued until the Watch App is opened again.
In other words, transferCurrentComplicationUserInfo(_:) never wakes up the ExtensionDelegate when the Watch App is not running.
Has anyone experienced the same thing and know how to fix it?
More details:
Testing on iPhone 11 (iOS 17.1.2) and Apple Watch SE (WatchOS 10.2)
I made sure that the quota of 50 is not exhausted when I test.
The WatchApp is still dual-target (I want to avoid having to migrate to single-target and SwiftUI lifecycle)
Watch App code:
class ExtensionDelegate: NSObject, WKExtensionDelegate, WCSessionDelegate {
let session = WCSession.default
override init() {
super.init()
if WCSession.isSupported() {
session.delegate = self
session.activate()
}
}
func session(_ session: WCSession, didReceiveUserInfo userInfo: [String: Any] = [:]) {
WatchWidgetSessionHandler.shared.processComplicationUserInfo(userInfo)
}
}
IOS App code:
class WatchAppDataManager: NSObject, WCSessionDelegate {
override init() {
super.init()
let session = WCSession.default
session.delegate = self
session.activate()
}
func sendDataToWidget(for kinds: [WatchWidgetKind]) async {
guard
WCSession.default.activationState == .activated,
WCSession.default.isComplicationEnabled
else {
return
}
let widgetsData = dataProvider.getData(for: kinds)
if !widgetsData.isEmpty {
WCSession.default.transferCurrentComplicationUserInfo(widgetsData)
}
}
}
The iPhone Target Build Phase for my Apple Watch companion app specifies the source of the Product to embed as: build/Debug-watchos, however,
the Watch build is located at build/Debug-watchsimulator.
I am receiving an error from Xcode when trying to install the Apple Watch app in the watch simulator, as follows: An application bundle was not found at the provided path. Provide a valid path to the desired application bundle.
Failed to install the requested application
Domain: NSPOSIXErrorDomain
Code: 2
Failure Reason: An application bundle was not found at the provided path.
Recovery Suggestion: Provide a valid path to the desired application bundle.
I have tried deleting the Watch target and re-adding the target but the misconfiguration remains. I have also tried adding my own Copy Build Phase but when selecting the Product for the Apple Watch companion app the same incorrect folder is used. Any ideas?
We are migrating ClockKit complications to WidgetKit in our watch app (watchOS 9+). The migration went smoothly, UI part works just fine. However, we've hit the wall with widgets not updating when requested by the watch app. I believe we are missing something very simple and fundamental, but couldn't find what exactly so far. Advice and tips would be very welcome! 🙇♂️
Our implementation details:
Whenever data is changed in the main app, the updated data is submitted to the watch app via WatchConnectivity framework using WCSession.default.transferCurrentComplicationUserInfo(_:). According to documentation, this method should be used to transfer complication-related data, since it will wake the watch app even if it is in the background or not opened at all.
Watch app receives updated data and stores it in UserDefaults shared with Watch Widget Extension hosting WidgetKit complications via App Group.
Watch app then request widget timeline reload via WidgetCenter.shared.reloadAllTimelines(). According to documentation, it reloads the timelines for all configured widgets belonging to the containing app, so it seems the appropriate way to reload WidgetKit complications.
Widget Timeline Provider class in Watch Widget Extension reads updated data from shared UserDefaults and uses it to provide the updated snapshot for widget views to render.
We believe our implementation logic is correct, but it doesn't work, for some reason. Widgets sometimes update when the watch app is opened, but not always. The most definitive way to force widgets to update is to switch to a different watch face, which confirms that the Widget Timeline Provider has access to properly updated data.
P.S. We are aware of the daily reload budget imposed on widgets, so we use widgets reload trigger sparingly. Anyway, according to documentation, reload budget is not effective when in DEBUG mode, but widgets won't reload even in DEBUG mode.
Thank you!