From my analysis this is an issue in watchOS 9.1 Beta.
I now have two "debug" Apple Watches paired to my "debug" iPhone. One iCloud account all across of course.
Sync from iPhone to Apple Watch with public watchOS 9.0 works flawlessly, with watchOS 9.1 beta: no dice.
Post
Replies
Boosts
Views
Activity
Honestly have to say I don’t know how exactly I fixed this. My hunch: don’t overstress the background app refresh budget or watchOS gives your app the cold shoulder. :-/
From what I learned the past year there is no way.
This must be a bug on apple's part. I have my developer devices (iPhone 16.0 (20A362), Watch 9.1 (20S5055e)) totally out of sync and my personal devices (iPhone 16.0 (20A362), Watch 9.0 (20R364)) working perfectly. Both are running the exact same version of my app (thru TestFlight). Dunno if it's the developer iCloud account or the beta software on the watch.
Did you - on you watch - go to settings and enable Developer Mode?
https://developer.apple.com/documentation/xcode/enabling-developer-mode-on-a-device
It has to be done on the watch as well as on the iPhone.
(Luckily it seems) I haven't made the switch yet. I have problem syncing HealthKit on Simulator with paired iPhone and Watch. Two different Stores, units, permissions, everything.
Same problem here. Your solution didn't work for me though. :-(
The fix worked for me. Have to keep doing it for new installations and updates.
I must say I am disappointed Apple has not fixed this when shipping Xcode 13.1
Fix was confirmed three months ago and Xcode 13.1 was shipped when?
I thought I found a workable solution but it's no good. It only works in the fallback case and it breaks the feature for watchOS8:
struct IsLuminanceReduced: EnvironmentKey {
static var defaultValue: Bool = false
}
@available(watchOS, obsoleted: 8.0)
extension EnvironmentValues {
var isLuminanceReduced: Bool {
get { self[IsLuminanceReduced.self] }
set { self[IsLuminanceReduced.self] = newValue }
}
}
If I could figure out how to tell Swift "with watchOS8, * IGNORE this…"
Maybe you can pick up this fumble and carry it across the line?
This line
@StateObject var graph = graphData()
initializes a new graph instance in either of your views. They don't communicate with each other.
Better use
@ObservedObject var graph = GraphData.shared
in the views and
class GraphData: ObservableObject {
static let shared = GraphData()
...
}
in your model class.
Apparently this has been fixed by iOS 15 Beta 4: on my test device I had the error prior to the Beta 4 update, using a test app compiled with Xcode 13 Beta 3. After the update to iOS 15 Beta 4 the error is gone. (Xcode Beta 4 is still downloading currently.)
So I think it’s reasonable to say that the update to iOS 15 Beta 4 did fix the error.
Apple Feedback ID FB9063694
If any1 would like to confirm…?
You need to get the uuid of the sample in the health database and delete that sample by its uuid.
See delete(_:withCompletion:)
Thank you edford. That’s what I was looking for.
I have just done it: downloaded 13 Beta, unpacked it and ran it right there. It didn't really "install" anything as far as I can tell, Xcode 12 seems to run unchanged. So I guess it just works as easy as this.
Could someone else please confirm that's the way it's supposed to be done? Am I missing something?
My thought, exactly.