Post not yet marked as solved
Hi, guys
I am writing UI tests for Apple Watch using XCTest and I need to interact with Apple Watch Home Screen and with elements on it. I know that "com.apple.springboard" could be used to interact with iPhone's Home Screen, what about Apple Watch?
Thank you!
Post not yet marked as solved
I have one user that is getting some very odd behavior for one of my complications.
The complication will work fine for a little bit, but then gets into a state where when the watch is asleep it is displaying correctly and then when the watch wakes up it's the default dashed out view with the app name.
This is happening on a Watch Series 5 with cellular that is on the latest WatchOS (8.5). It was also happening on 8.4.2.
All of the other complication types work perfectly fine on their watch. It is just this specific one, which other than the way the view is laid out is no different than the others under the hood. They all share the same data.
The problem complication uses CLKComplicationTemplateGraphicRectangularFullView and the only thing I can think of is that maybe there is an issue with support on the Series 5. Though I have no evidence to support this theory since there isn't any helpful log messages.
Testers on Series 6 and Series 7 report zero problems with this complication.
I have added in a special view for when this complication fails for whatever reason, at least whatever reason I can capture and it is never displayed. It just shows the generic Apple dashed out view. So it seems something else is going wrong under the hood.
Any and all help would be much appreciated.
Post not yet marked as solved
In my iOS app, I check to see if there's an active complication before sending complication data to the watch, given the limit of 50 transfers per day.
It seems isComplicationEnabled() always returns false in the simulator, even though I have a watch app in a watchOS simulator that's active and running, with complications that actively get updated from the watch code as well. Data is successfully being passed from the simulated iPhone to the simulated watch app - both are active, connected and otherwise in sync.
When I run using a physical device, WCSession isComplicationEnabled() on my iPhone does return true, but it seems to always be false in the simulator.
Is this a limitation? Bug? Anyone else seeing this?
Post not yet marked as solved
With the WatchOS 8 upgrade, it appears WKExtension.shared().rootInterfaceController is returning nil in certain situations.
One situation I've identified is when there's a multi-page watch app.
But, if I remove the segue, the WKExtension.shared().rootInterfaceController has a value.
So, it seems that using paged navigation can cause the rootInterfaceController to be nil.
Even if the dietaryDetailsController is made the Main Entry Point, rootInterfaceController has a value. So, it only seems to be a problem when it's the first page.
Long term, SwiftUI can be implemented, but, a short term fix is necessary since the rootInterfaceController is necessary to refresh complication data.
With a push segue, the rootInterfaceController does have a value.
Anyone else experiencing this? Am I missing something in configuring the first page of multi-page navigation?
Post not yet marked as solved
I recently tried to connect my Apple Watch (series 3) to my iPhone (13). Before it connects it says I need to update it and I try to but it says that I need to connect to the internet even though I am and it won’t let me continue.
I'm having an issue where the complications for my app aren't syncing to the watch if you add them from the Watch app on iOS.
However if you add them from the watch itself they work on the watch, but don't show on the iOS Watch app.
I'm using getLocalizableSampleTemplate(for:withHandler:) to generate the complication templates. I'm not including a complication bundle or static images since it appears that this is not needed anymore according to the docs.
The templates show fine on both the watch and iOS Watch app, they just don't show up on the watch if added from the iOS Watch app and vice versa. If I add a new watch face and then add the complications to it and try to set it as the default watch face from the iOS app it will set it on the watch, but doesn't have any of the complications.
If I load up the Console app and look at the iPhone system logs I can see it trying to send the watch face with the correct complication descriptors, but nothing happens on the watch itself. If I use a simulator it doesn't even sync any of the watch faces until I reboot the watch sim.
One final note, the watch portion of the app has not been released in the App store before. This is a new addition to an already released app. Not sure if that could be part of the issue, but just thought I should include it.
I'm at a loss here, any help would be appreciated.
Post not yet marked as solved
We've added a watch app extension in the developed iOS application source code. When we're selecting and running the watch application target, We're getting this application installation error with an alert:
Could not attach to pid : “11996”
attach failed ((os/kern) invalid argument)
This alert is coming only on M1 chip-based Mac systems. But the same code is running well on Intel-based Mac systems.
Any help from anyone is highly appreciable. Thank you.
Post not yet marked as solved
I have an Apple Watch series 2 which is on OS 6.2
and an iPhone on iOS 15.3.1
The Apple Watch doesnt appear to be transferring any data to Apple Health. The phone data is showing and the watch is showing as paired within the My Watch Tab on the Watch App . is this just due to not being compatible?
Post not yet marked as solved
Is there a way to build a complication with a PogressView / Gauge that updates it's progress based on a start and end dates like CLKTimeIntervalGaugeProvider ?
I haven't developed an Apple Watch app yet.
I have an existing app for sale.
Users of that app sometimes send me requests for functions using Apple Watch in the app by email.
Considering future maintenance, I would like to sell the Apple Watch app as a paid app.
However, I know that watch app support cannot be turned on/off by in-app purchases in existing apps.
Is there any way for the standalone Apple Watch app to communicate with my existing paid/free apps?
Post not yet marked as solved
Hi Folks,
I am building a SwiftUI based WatchOS app primarily focused on updating a complication using data from a REST API call.
I am trying to reproduce the approach to updating complications in the background as described in "Keeping your complications up to date".
The trouble I have is that the func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) method on the ExtensionDelegate is never called for the WKURLSessionRefreshBackgroundTask task type. The handle method is invoked for other task types such as WKSnapshotRefreshBackgroundTask.
After some refactoring, I have deviated from the approach in the video and I now reshedule the background task in the func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) method of the URLSessionDownloadDelegate.
This works fine, and the tasks are being resheduled in the background, but my concern is that there maybe a WKURLSessionRefreshBackgroundTask object lurking in the background for which I haven't called setTaskCompletedWithSnapshot.
My session is configured as follows:
private lazy var backgroundURLSession: URLSession = {
let appBundleName = Bundle.main.bundleURL.lastPathComponent.lowercased().replacingOccurrences(of: " ", with: ".")
let sessionIdentifier = "com.gjam.liffeywatch.\(appBundleName)"
let config = URLSessionConfiguration .background(withIdentifier: sessionIdentifier)
config.isDiscretionary = false
config.sessionSendsLaunchEvents = true
config.requestCachePolicy = .reloadIgnoringLocalCacheData
config.urlCache = nil
return URLSession (configuration: config, delegate: self , delegateQueue: nil )
}()
and the scheduling code is a follows:
func schedule(_ first: Bool) {
print("Scheduling background URL session")
let bgTask = backgroundURLSession.downloadTask(with: LiffyDataProvider.url)
#if DEBUG
bgTask.earliestBeginDate = Date().addingTimeInterval(first ? 10 : 60 * 2)
#else
bgTask.earliestBeginDate = Date().addingTimeInterval(first ? 30 : 60 * 60 * 2)
#endif
bgTask.countOfBytesClientExpectsToSend = 200
bgTask.countOfBytesClientExpectsToReceive = 1024
bgTask.resume()
print("Task started")
backgroundTask = bgTask
}
Does anyone have any idea's why the handle method is not invoked with WKURLSessionRefreshBackgroundTask tasks?
Cheers,
Gareth.
Post not yet marked as solved
I was very happy when I saw this:
"You can embed a symbol inside a run of text by using string interpolation."
Text("Thalia… \(Image(systemName: "chevron.forward"))")
Unfortunately this is a feature of SwiftUI and not generally available string interpolation. In places where a string is expected like an Apple Watch Compilcation Text Provider
CLKSimpleTextProvider(text: "\(Image(systemName: "heart"))")
this doesn't return an inline Image but
"Image(provider: SwiftUI.ImageProviderBox<SwiftUI.Image.(unknown context at $18487da20).NamedImageProvider>)"
So…
Is there a way to include an SF Symbol in a regular string to wiggle it into a CLKSimpleTextProvider?
Post not yet marked as solved
I get a notification on my phone approximately 4 times a day asking me to update my Apple Watch. I don’t have an Apple Watch and can’t find any connected my account in my settings profile. Any ideas to stop this as it’s incredibly frustrating!!
Need complication sizes:
Example:
https://developer.apple.com/design/human-interface-guidelines/watchos/overview/complications/
https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccircularimage
FB9632184 filed
Hi there, I am looking for a way to collect application logging for apple watch. So far, I only found this https://download.developer.apple.com/iOS/watchOS_Logs/sysdiagnose_Logging_Instructions.pdf to collect sysdiagnose logging. I looked into the sysdiagnose logging and it doesn't seem to be the application log. I am looking for sth like the log in xcode debug console. Do you know how I can collect this log?
Post not yet marked as solved
Anyone dealt before with Apple Watch complications accessibility?
I'm using CLKComplicationTemplateGraphicCornerGaugeText to display custom data but VoiceOver adds degrees (º) after saying the value. I've tried with accessibilityLabel on CLKTextProvider but doesn't fix it.
Any idea?
Thanks in advance!
Post not yet marked as solved
Hello everyone! Who knows? Who tried it? In the technical documentation for the new mac 2021 on m1, it is written that only 1 additional monitor can be connected. How about two? I have 2 additional monitors working perfectly on mac 2017 in addition to the main one. I'm used to working in xcode on 3 monitors. What should I do? Is it possible to connect 2 additional ones?
Post not yet marked as solved
I’m trying to get background URL sessions working to keep my complications up to date. The docs and session videos from this year state that I should get ~4 background network updates per hour if I have my complication active, but it is taking up to 1.5 hours to get just one background URL session to return on watchOS 7 beta 4.
I’m using the sample code from this year’s WWDC session on keeping complications up to date.
I am scheduling the URL session to begin after 15 minutes. I have a complication active on the watch. The watch has plenty of battery and is connected to wifi. I’m completing all URL background refresh tasks within 15 secs.
Important Note*
I do get a URLSessionRefreshBackgroundTask around the time of the earliest begin date, but it just calls willBeginDelayedRequest then urlSessionDidFinishEvents - the download itself doesn’t happen for another hour. (I call setTaskCompleted once urlSessionDidFinishEvents is called, as the session video recommends.)
Is anyone else experiencing long delays between when a scheduled download is supposed to begin and when the app is actually woken up?
I've filed this as FB8386427 in case any engineers happen to see this.
Post not yet marked as solved
I have an iPhone with Watch Project, I was getting good results on my Complications but lately they don't want to update…
When I build and run on my iPhone the new Watch build gets transferred to the paired watch and is running there fine. Almost: it refuses to update the Complications. After Watch restart I only get -----
My server correctly tells me that I have two active complications on the current watchFace and I am calling server.reloadTimeline(for:) on both of them but the getCurrentTimelineEntry function never gets executed by the server. Neither does the getLocalizableSampleTemplate
When I remove the App from the Watch, restart the Watch and then put the App back on the Watch using the iPhone's Watch App -- then it works, but only about 3 minutes after starting the Watch App on the Watch. During these 3 minutes my app's complications are only --. I can't ship it like this…
My hunch is that somewhere the complication controller crashes, but it doesn't take my app down with it and thus my complications don't work any more. All other apps' complications do update alright though.
Now my question is: is that a bug in Xcode, in WatchOS, or in my code? Will this happen when I first deploy my app on the App Store or will it be an issue with updates via App Store? Is this only relevant for my "local" build?
Any hints where to hunt this bug?
Post not yet marked as solved
Hi evetyone! I from to Vietnam.
I have an Apple Watch SE. My watch was working fine before but a week now the sharing feature works, the competition with everyone on Apple Watch has not worked (playing with everyone wins or loses still does not receive a badge) completed the challenge, can't see the scores everyone has competed,...), but the three fitness circles on my watch are still working properly. I have disconnected the watch from my iPhone and then reconnecting it still does not fix the error, I also sent feedback on August 16, but as of today August 22 I still have not received a response from Apple, I do not know if my feedback reaches Apple?
I really hope Apple reads this and responds to me. Thanks very much!