In general my workout app is reachable from the iPhone when running a workout, even if in the background. However if the watch app restarts (due to crash or being closed via the dock) via handleActiveWorkoutRecovery then it is only reachable when in the foreground, even though a workout is running.
Is this expected / desired behaviour? Is the app given a tighter sandbox (having it's "background privileges" reduced) because of the earlier crash?
This behaviour occasionally happens without a crash (or being closed via the dock) - all of a sudden it is no longer reachable via the iPhone. It feels like the app is being "sandboxed" like in #1 but there is no crash or any other kind of log indicating any issue. Generally the only remedy is to stop the workout and restart the app. My question is - is this expected? Is there some condition that causes the watchOS to sandbox the app? Or is this a Watch Connectivity bug?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Adding .chartScrollableAxes(.horizontal) to a chart prevents chartYAxisLabel from being positioned top right, over Y axis.
We want the label at top right, over the Y-axis, but with chartScrollableAxes it is always top right relative to the initial chartXVisibleDomain, which puts it in the middle of the chart if chartXVisibleDomain < full x domain.
import SwiftUI
import Charts
struct ContentView: View {
@State private var numbers = (0..<100)
.map { _ in Double.random(in: 0...100) }
@State var visibleDomain : Int = 50
var body: some View {
Chart(Array(zip(numbers.indices, numbers)), id: \.1) { index, number in
LineMark(
x: .value("Index", index),
y: .value("Number", number)
)
}
.chartScrollableAxes(.horizontal)
.chartXVisibleDomain(length: visibleDomain)
.chartScrollPosition(initialX: 70)
.chartYAxisLabel(position: .topTrailing, alignment: .center) {
/*
We want the label at top right, over the Y-axis, but with
chartScrollableAxes it is always top right relative to the initial
chartXVisibleDomain, which puts it in the middle of the chart if
chartXVisibleDomain < full x domain
*/
Text("units")
.foregroundStyle(.red)
.fontWeight(.bold)
}
.padding()
}
}
#Preview {
ContentView()
}
I changed my AppleID password. Now for any app distributed via TestFlight the call to AppTransaction.shared throws "Unable to Complete Request". This only happens for this one ID, and only when distributed via TestFlight. I have tried different apps and devices, all with the same result.