Post

Replies

Boosts

Views

Activity

Reply to Custom AppSchema domains
There have been no hints about future schema support. Note that the current schema’s have been around for 2 years, and we did not see any major additions to them. Apple will tell you to file an enhancement feedback and likely not provide any comments on it. They’ll still take 15-30% of all digital commerce in your app though!
Aug ’26
Reply to Guidance Needed on App Entities, Intents, and the New Siri
What’s crazy is that these schema’s were available for two years(!!!), never shipped, and somehow barely changed between then and now. They have known that the domains are insufficient for a majority of apps. It seems to be something that does not matter to the current release pipeline. I wish they would be more transparent about the limitations of what we can actually build with this stuff, cause I can’t barely get anything useful in real-world scenarios to work. Also, note the radio silence from Apple on these boards despite there being no technical 1-on-1 opportunities this year at WWDC. Don’t worry, though, profits are going great!
Aug ’26
Reply to Is `.appEntityIdentifier` + `Transferable` the intended way to let Siri send an on-screen image to another app? (iOS 27)
So, this actually works for me... If I right click on a gallery item on iPad and type "send this to " it will grab all items on screen and put them into a message. Here is what I have in my UICollectionView: public func collectionView( _ collectionView: UICollectionView, appEntityIdentifierForItemAt indexPath: IndexPath ) -> EntityIdentifier? { guard let item = dataSource?.itemIdentifier(for: indexPath) else { return nil } guard let fileIdentifier = try? FileEntityIdentifier.file(url: <URL>) else { return nil } return EntityIdentifier(for: <ENTITY>.self, identifier: fileIdentifier) } Note using the "FileEntityIdentifier" with the file's URL. Also, the that gets provided happens to conform to @AppEntity(schema: .files.file) My Transfer representations are just the following: public static var transferRepresentation: some TransferRepresentation { FileRepresentation( contentType: .image, exporting: { entity in print(" INT Exporting File Entity as File Representation") guard let url = try await entity.id.fileURL else { throw Errors.unableToRetrieveURL } return SentTransferredFile(url) }, importing: { received in let attributes = try? FileManager.default.attributesOfItem(atPath: received.file.path()) let creationDate = attributes?[.creationDate] as? Date let modificationDate = attributes?[.modificationDate] as? Date print("INT Attempting import of Image Entity from File Representation") return <ENTITY>( id: try FileEntityIdentifier.file(url: received.file), creationDate: creationDate, fileModificationDate: modificationDate, name: received.file.lastPathComponent ) }) }
Jul ’26
Reply to Recommended App Store distribution strategy for apps that require Foundation Models
@Frameworks Engineer Nearly every outside developer will tell you it’s not acceptable to coerce developers to deliver subpar experiences to users. What, the user then has to go through the refund process? No one wants that. The App Store should support mechanisms so users don’t accidentally download apps they can’t get the most out of. Don’t worry. I know you’ll take your 30% anyway.
Jul ’26
Reply to How to send a message from menu item in SwiftUI App to ContentView
Menu Bars are one of the three most confusing aspects of SwiftUI app development imo. Imagine you had a multi-window app and each of those windows have an instance of your content view. Maybe you want a specific window to show the file import view. Maybe you only want one window to use the result of said import. It’s probably the active window, since that’s what the user is interacting with. There’s a way to achieve this and it is the technique that I would recommend. In an extension on the FocusedValues enum, I declare a Binding. You can probably do this with an @Entry too. var fousedWindowSheet: Binding<FocusedWindowSheet?>? { get { self[FousedWindowSheetKey.self] } set { self[FousedWindowSheetKey.self] = newValue } } This allows focused windows to provide a hook that the menu bar can then leverage to present things. You content view can do this with the following: .focusedSceneValue(\.fousedWindowSheet, $showingFocusedWindowSheet) (it provides it's own @State to the focus system and can use that state in its own .sheet modifiers. Okay, sure, but how does the CommandGroup get access to the focused value that's set by the actively focused scene? Boom @FocusedBinding(\.fousedWindowSheet) private var focusedWindowSheet I declare one of those in a struct that conforms to Commands and I pass an instance of that into .commands struct MyCommands: Commands { @FocusedBinding(\.fousedWindowSheet) private var focusedWindowSheet var body: some Commands { CommandGroup(after: .newItem) { <blah blah blah> } } } .commands { MyCommands() } Honestly, this was a poorly structured dump of information more than a "guide" on how to do this. I hope, though, that the keywords and technique of using FocusedSceneValue in conjunction with FocusedBinding get you on the right track! It also sounds like you may need a refresher on how State propagates through swiftUI applications. View's are initiated on demand, and body methods are called at will by the system. If you want state to last beyond those moments of re-invocation it has to be stored in an @State somewhere.
Topic: UI Frameworks SubTopic: SwiftUI
Jul ’26
Reply to Changing a State var in a Timer block doesn't update the UI
So... bit of a mind-bender, but you're losing your "self" reference, and possibly leaking timers into the runloop. SwiftUI views are not actually views, but more like view-blueprints, that can be asked for a view. This means they can be inited as needed by the system and body can be called as needed. This means your setupTimer method is at risk of getting called multiple times and timers could keep getting put into the run loop. It also means that the "self" reference inside the timer closure is super dubious. Throwing it into an observable controller that's stored as a state object property will keep the state more constant and it will work. (I'm leery of the .task method in this example and it's just to get the timer started. You probably want debounce protection if you're gonna store em in the runLoop. You should probably seek an alternative async/await solution for that) @Observable class Controller { var referenceDate: Date = Date() init() { } func setupTimer() { let calendar = Calendar.current guard let triggerDate = calendar.nextDate( after: Date(), matching: DateComponents(hour: 20, minute: 16, second: 0), matchingPolicy: .nextTime ) else { return } let timer = Timer(fire: triggerDate, interval: 0.2, repeats: false) { _ in DispatchQueue.main.async { self.referenceDate = Date() } print("runLoop!") } RunLoop.main.add(timer, forMode: .common) } } struct ContentView: View { @State var controller = Controller() var body: some View { VStack { Text("Ref time: \(controller.referenceDate.formatted(date: .abbreviated, time: .standard))") Button("Huh") { controller.referenceDate = Date() } } .task { controller.setupTimer() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’26
Reply to Custom AppSchema domains
There have been no hints about future schema support. Note that the current schema’s have been around for 2 years, and we did not see any major additions to them. Apple will tell you to file an enhancement feedback and likely not provide any comments on it. They’ll still take 15-30% of all digital commerce in your app though!
Replies
Boosts
Views
Activity
Aug ’26
Reply to Guidance Needed on App Entities, Intents, and the New Siri
What’s crazy is that these schema’s were available for two years(!!!), never shipped, and somehow barely changed between then and now. They have known that the domains are insufficient for a majority of apps. It seems to be something that does not matter to the current release pipeline. I wish they would be more transparent about the limitations of what we can actually build with this stuff, cause I can’t barely get anything useful in real-world scenarios to work. Also, note the radio silence from Apple on these boards despite there being no technical 1-on-1 opportunities this year at WWDC. Don’t worry, though, profits are going great!
Replies
Boosts
Views
Activity
Aug ’26
Reply to Is `.appEntityIdentifier` + `Transferable` the intended way to let Siri send an on-screen image to another app? (iOS 27)
So, this actually works for me... If I right click on a gallery item on iPad and type "send this to " it will grab all items on screen and put them into a message. Here is what I have in my UICollectionView: public func collectionView( _ collectionView: UICollectionView, appEntityIdentifierForItemAt indexPath: IndexPath ) -> EntityIdentifier? { guard let item = dataSource?.itemIdentifier(for: indexPath) else { return nil } guard let fileIdentifier = try? FileEntityIdentifier.file(url: <URL>) else { return nil } return EntityIdentifier(for: <ENTITY>.self, identifier: fileIdentifier) } Note using the "FileEntityIdentifier" with the file's URL. Also, the that gets provided happens to conform to @AppEntity(schema: .files.file) My Transfer representations are just the following: public static var transferRepresentation: some TransferRepresentation { FileRepresentation( contentType: .image, exporting: { entity in print(" INT Exporting File Entity as File Representation") guard let url = try await entity.id.fileURL else { throw Errors.unableToRetrieveURL } return SentTransferredFile(url) }, importing: { received in let attributes = try? FileManager.default.attributesOfItem(atPath: received.file.path()) let creationDate = attributes?[.creationDate] as? Date let modificationDate = attributes?[.modificationDate] as? Date print("INT Attempting import of Image Entity from File Representation") return <ENTITY>( id: try FileEntityIdentifier.file(url: received.file), creationDate: creationDate, fileModificationDate: modificationDate, name: received.file.lastPathComponent ) }) }
Replies
Boosts
Views
Activity
Jul ’26
Reply to Recommended App Store distribution strategy for apps that require Foundation Models
@Frameworks Engineer Nearly every outside developer will tell you it’s not acceptable to coerce developers to deliver subpar experiences to users. What, the user then has to go through the refund process? No one wants that. The App Store should support mechanisms so users don’t accidentally download apps they can’t get the most out of. Don’t worry. I know you’ll take your 30% anyway.
Replies
Boosts
Views
Activity
Jul ’26
Reply to How to send a message from menu item in SwiftUI App to ContentView
Menu Bars are one of the three most confusing aspects of SwiftUI app development imo. Imagine you had a multi-window app and each of those windows have an instance of your content view. Maybe you want a specific window to show the file import view. Maybe you only want one window to use the result of said import. It’s probably the active window, since that’s what the user is interacting with. There’s a way to achieve this and it is the technique that I would recommend. In an extension on the FocusedValues enum, I declare a Binding. You can probably do this with an @Entry too. var fousedWindowSheet: Binding<FocusedWindowSheet?>? { get { self[FousedWindowSheetKey.self] } set { self[FousedWindowSheetKey.self] = newValue } } This allows focused windows to provide a hook that the menu bar can then leverage to present things. You content view can do this with the following: .focusedSceneValue(\.fousedWindowSheet, $showingFocusedWindowSheet) (it provides it's own @State to the focus system and can use that state in its own .sheet modifiers. Okay, sure, but how does the CommandGroup get access to the focused value that's set by the actively focused scene? Boom @FocusedBinding(\.fousedWindowSheet) private var focusedWindowSheet I declare one of those in a struct that conforms to Commands and I pass an instance of that into .commands struct MyCommands: Commands { @FocusedBinding(\.fousedWindowSheet) private var focusedWindowSheet var body: some Commands { CommandGroup(after: .newItem) { <blah blah blah> } } } .commands { MyCommands() } Honestly, this was a poorly structured dump of information more than a "guide" on how to do this. I hope, though, that the keywords and technique of using FocusedSceneValue in conjunction with FocusedBinding get you on the right track! It also sounds like you may need a refresher on how State propagates through swiftUI applications. View's are initiated on demand, and body methods are called at will by the system. If you want state to last beyond those moments of re-invocation it has to be stored in an @State somewhere.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jul ’26
Reply to Changing a State var in a Timer block doesn't update the UI
So... bit of a mind-bender, but you're losing your "self" reference, and possibly leaking timers into the runloop. SwiftUI views are not actually views, but more like view-blueprints, that can be asked for a view. This means they can be inited as needed by the system and body can be called as needed. This means your setupTimer method is at risk of getting called multiple times and timers could keep getting put into the run loop. It also means that the "self" reference inside the timer closure is super dubious. Throwing it into an observable controller that's stored as a state object property will keep the state more constant and it will work. (I'm leery of the .task method in this example and it's just to get the timer started. You probably want debounce protection if you're gonna store em in the runLoop. You should probably seek an alternative async/await solution for that) @Observable class Controller { var referenceDate: Date = Date() init() { } func setupTimer() { let calendar = Calendar.current guard let triggerDate = calendar.nextDate( after: Date(), matching: DateComponents(hour: 20, minute: 16, second: 0), matchingPolicy: .nextTime ) else { return } let timer = Timer(fire: triggerDate, interval: 0.2, repeats: false) { _ in DispatchQueue.main.async { self.referenceDate = Date() } print("runLoop!") } RunLoop.main.add(timer, forMode: .common) } } struct ContentView: View { @State var controller = Controller() var body: some View { VStack { Text("Ref time: \(controller.referenceDate.formatted(date: .abbreviated, time: .standard))") Button("Huh") { controller.referenceDate = Date() } } .task { controller.setupTimer() } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’26