Post

Replies

Boosts

Views

Activity

Reply to @Observable and didSet?
So didSet is allowed but you're not able to do much with it as you cannot make any reference to self or any of it's members: Cannot find 'self' in scope; did you mean to use it in a type or extension context? Instance member 'scalingMode' cannot be used on type 'MySettings'; did you mean to use a value of this type instead?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23
Reply to UIPointerStyle.hidden() with SwiftUI?
With UIKit, it is possible to set the pointer style or just hide it through the UIPointerInteractionDelegate: func pointerInteraction(_ interaction: UIPointerInteraction, styleFor region: UIPointerRegion) -> UIPointerStyle? { // Hide the pointer in the screen view return UIPointerStyle.hidden() } I’m unable to find anything that would do the same on SwiftUI. Apple folks: FB12418053
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23
Reply to Swift compiler crash in Xcode 15 beta 3 (15A5195k)
Here's a project to demonstrate the issue: import SwiftUI import Observation struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() } } typealias ResolveServiceCompletionBlock = (Bool, Error?) -> Void @Observable class ServiceBrowser: NSObject { fileprivate var resolveServiceCompletionHandler: ResolveServiceCompletionBlock? = nil } It seems like the issue is with the Observation protocol as removing @Observable works. Apple folks: FB12567650
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’23
Reply to Can't set focus with tab key when text fields are in a form (iPadOS)
Apple folks: FB11983812
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to TableColumn with text and image
Someone suggested this solution: Text(Image(systemName: "desktopcomputer")) + Text(verbatim: " ") + Text(computer.name) Not great but at least it works. I think this should be addressed by the SwiftUI team. Apple folks: FB12004569
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to @Observable and didSet?
So didSet is allowed but you're not able to do much with it as you cannot make any reference to self or any of it's members: Cannot find 'self' in scope; did you mean to use it in a type or extension context? Instance member 'scalingMode' cannot be used on type 'MySettings'; did you mean to use a value of this type instead?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to @Observable and didSet?
How is ScalingMode defined ? Just an enum ? Yes: enum ScalingMode: Int { case scaled case actualSize }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to @Observable and didSet?
Thanks Chad! Please post your feedback reference so I can file a bug on my end as well!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to What is causing this BadDeviceToken response from APNs?
Anyone?
Replies
Boosts
Views
Activity
Jun ’23
Reply to UIPointerStyle.hidden() with SwiftUI?
With UIKit, it is possible to set the pointer style or just hide it through the UIPointerInteractionDelegate: func pointerInteraction(_ interaction: UIPointerInteraction, styleFor region: UIPointerRegion) -> UIPointerStyle? { // Hide the pointer in the screen view return UIPointerStyle.hidden() } I’m unable to find anything that would do the same on SwiftUI. Apple folks: FB12418053
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Symbol not found when running iPad app in Vision Pro Simulator
I tried adding a new target to my project just in case the issue was with the current target I was trying to run but I get the same error even if the new target doesn't include any of the components of the other target and is just a plain "Hello, world" SwiftUI app.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to Swift compiler crash in Xcode 15 beta 3 (15A5195k)
Here's a project to demonstrate the issue: import SwiftUI import Observation struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() } } typealias ResolveServiceCompletionBlock = (Bool, Error?) -> Void @Observable class ServiceBrowser: NSObject { fileprivate var resolveServiceCompletionHandler: ResolveServiceCompletionBlock? = nil } It seems like the issue is with the Observation protocol as removing @Observable works. Apple folks: FB12567650
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to Swift compiler crash in Xcode 15 beta 3 (15A5195k)
So adding @ObservationIgnored seems to work around the issue.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to DNSServiceNATPortMappingCreate broken (again) in macOS 13 beta 3 23A5286i
Right. 14, not 13. Sorry!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to DNSServiceNATPortMappingCreate broken (again) in macOS 13 beta 3 23A5286i
So it seems this may be a router failure on my end and was just a coincidence that it stopped working when I updated to the latest beta. It suddenly started working again this morning. I would still recommend to check the issue in case there is something indeed causing some instability.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to SwiftUI toolbar item keyboard shortcut not showing when holding command key on iPad?
Apple folks: FB12700187
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to SwiftUI toolbar item keyboard shortcut not showing when holding command key on iPad?
So this is the solution: Button { } label: { Label("Connect", systemImage: "bolt") .labelStyle(.titleAndIcon) } .keyboardShortcut("k", modifiers: .command) The label obviously needs a title (my mistake) but you have to specify .labelStyle(.titleAndIcon) to make the shortcut appear, which is not obvious at all.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to Missing recommended icon for iPad when using new xCode 14 single size app icon
I have the same issue. Were you able to pass review still?
Replies
Boosts
Views
Activity
Aug ’23