Same with official iOS 18 release. See existing thread about known issue: https://forums.developer.apple.com/forums/thread/762658
Post
Replies
Boosts
Views
Activity
The comment above doesn't work which is for an icon and doesn't address the issue. Any updates from anyone? This is the biggest complaint on my app. Developers and users are frustrated Apple dropping the ball on this :(
I'm having the same issue, I submitted a ticket but no response yet: FB11737627. Any updates?
This is still an issue with watchOS 9.1 / Xcode 14.1. It gets truncated no matter what I do, I can't put any reasonable text in there not even a time or count down! It looks silly with so much wasted space around it, not sure why Apple is saying they won't support it.
Same issue, seems like TextField + Focus + Keyboard is causing the attribute graph issue for me.
I've been randomly getting this too in iOS 15.4-6 but can't pin point when. Have you figured anything about this?
If you embed the Picker inside of a Menu, it lets you create a custom label. I'm not sure if this was intended by SwiftUI, but it seems to work perfectly as expected.
Menu {
Picker(selection: $selectedFruit, label: Text("Select Favorite Fruit")) {
ForEach(0..<fruits.count, id: \.self) {
Text(fruits[$0])
}
}
} label: {
HStack {
Text("Favorite Fruit")
Divider()
Text(fruits[selectedFruit])
}
}
Source: https://stackoverflow.com/q/70835085
Using the Picker in a Form renders the label as @Merlin52 pointed out. The Form really takes over your design though, which is nice but not when you need to customize it. Here's another sample with a screenshot:
struct ContentView: View {
var fruits = ["Banana","Apple", "Peach", "Watermelon", "Grapes" ]
@State private var selectedFruit = 0
var body: some View {
Form {
// Variation 1
Picker(selection: $selectedFruit, label: Text("Select Favorite Fruit")) {
ForEach(0..<fruits.count, id: \.self) {
Text(self.fruits[$0])
}
}
// Variation 2
Picker(selection: $selectedFruit) {
ForEach(0..<fruits.count, id: \.self) {
Text(self.fruits[$0])
}
} label: {
HStack {
Text("Favorite Fruit")
Divider()
Text(fruits[selectedFruit])
}
}
// Variation 3
Menu {
ForEach(0..<fruits.count, id: \.self) {
Text(self.fruits[$0])
}
} label: {
HStack {
Text("Favorite Fruit")
Divider()
Text(fruits[selectedFruit])
}
}
}
.pickerStyle(.menu)
}
}
Here's how everything looks like when I nest everything in a VStack instead of a Form:
Notice I added a Menu in there, which seems like the behaviour the OP is expecting. Shouldn't the Picker mimic that behaviour when modified with a MenuPickerStyle? This would mean the label parameter could be optional in the Picker initializer (so it can default to displaying the selected row). Repurposing a Menu as a picker is the painful alternative in the meantime.
This is still a bug in watchOS 8. I relied offsetShort but still same problem. It displays fine in the simulator as "28M", but on a real device, it insists in trying to display "28 MIN" which gets truncated to "28..."
You can run it in a simulator and real device to see the issue:
CLKComplicationTemplateGraphicCircularOpenGaugeSimpleText(
gaugeProvider: CLKTimeIntervalGaugeProvider(
style: .ring,
gaugeColors: nil,
gaugeColorLocations: nil,
start: Date() - 2000,
startFillFraction: 1,
end: Date() + 2000,
endFillFraction: 0
),
bottomTextProvider: CLKSimpleTextProvider(text: "AB"),
centerTextProvider: CLKRelativeDateTextProvider(
date: Date() + 1200,
style: .naturalAbbreviated,
units: [.hour, .minute]
)
)
Submitted a feedback and sample project with this code: FB9974072
Unfortunately not at the moment. I'm having to create dummy entries in the timelines series every 15 minutes or so to refresh the progress value which is not ideal.
I submitted a feedback: FB9918102
I'm having the same problem on watchOS 8.4.. silent notifications are not being sent to the watch but works perfectly for iOS.
let zoneID = CKRecordZone.ID(zoneName: "Settings", ownerName: CKCurrentUserDefaultName)
let subscriptionID = "settings-subscription-id
let subscription = CKRecordZoneSubscription(zoneID: zoneID, subscriptionID: subscriptionID)
let notificationInfo = CKSubscription.NotificationInfo()
notificationInfo.shouldSendContentAvailable = true
subscription.notificationInfo
let subscription = try await database.save(subscription)
I call WKExtension.shared().registerForRemoteNotifications() in applicationDidBecomeActive and didRegisterForRemoteNotifications(deviceToken:) does fire. However, didReceiveRemoteNotification does not fire. I also tried some suggestions here like updating the provisioning profile at AppConnect for watch app and extension which makes sense.
Looking at the iCloud console though, the watch is never able to create subscriptions at iCloud at all! I query "Data > Subscriptions" section in console and only see the iOS subscription created. Does each device need to have their own unique subscription? Because I also tried this by putting the vendor device identifier in the subscription ID so each device creates their own, but the watch still never creates a subscription at the server nor does it error on database.save(subscription).
Is there a trick for the watch to create subscriptions at iCloud? I'm using the above code but no errors result from it, but the subscription records never shows up on the iCloud console (but iOS does and receives silent fine). I also have "Supports Running without iOS app" checked if that makes a difference.
This thread is my new hang out spot when I can't get any work done
Thank you for refreshable in SwiftUI 3!
When applied to a ScrollView it does not appear, but works with a List. Is it this something that can be supported in iOS 15?
Seems like SwiftUI is tripping up Xcode 13 a lot. Commenting out a random ScrollView or other view sometimes works. swift-frontend process has gone so high to 145GB at one point and I only have 32GB RAM on this machine (Big Sur 11.6.1 / Xcode 13.1).
Still happening with Xcode 13.1 official release :(
The other thread doesn't seem to be related, but wondering if there's something in the Xcode build settings that can be disabled until Apple fixes this debilitating issue?