Post

Replies

Boosts

Views

Activity

Reply to CloudKit Subscriptions - weird things going on
It looks like it could be related to the patch Apple rolled out last week in relation to using NSPredicate: https://www.trellix.com/en-us/about/newsroom/stories/research/trellix-advanced-research-center-discovers-a-new-privilege-escalation-bug-class-on-macos-and-ios.html The subscriptions I use that do NSPredicate(value: true) do not have an issue being saved to the database.
Feb ’23
Reply to .searchable modifier with a keyboard shortcut
I ended up getting the following to work on macOS using the .searchable() modifier (only tested on macOS 12.3): import SwiftUI @main struct MyApp: App {     @State var searchText = ""     var items = ["Item 1", "Item 2", "Item 3"]     var searchResults: [String] {         if searchText.isEmpty {             return items         } else {             return items.filter { $0.contains(searchText) }         }     }     var body: some Scene {         WindowGroup {             List(self.searchResults, id: \.self) { item in                 Text(item)             }.searchable(text: self.$searchText)         }.commands {             CommandMenu("Find") {                 Button("Find") {                     if let toolbar = NSApp.keyWindow?.toolbar,                         let search = toolbar.items.first(where: { $0.itemIdentifier.rawValue == "com.apple.SwiftUI.search" }) as? NSSearchToolbarItem {                         search.beginSearchInteraction()                     }                 }.keyboardShortcut("f", modifiers: .command)             }         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’22
Reply to SWAttributionView seems to be getting swallowed inside a view with an .onTapGesture modifier
I was able to get around this issue by adding .allowsHitTesting(true) to the UIViewRepresentable view which in your case would be SwiftUIAttributionView. Update: Never mind this did not work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to CloudKit Subscriptions - weird things going on
This issue seems to have cleared up earlier today around 2pm EST.
Replies
Boosts
Views
Activity
Mar ’23
Reply to CloudKit Subscriptions - weird things going on
It looks like it could be related to the patch Apple rolled out last week in relation to using NSPredicate: https://www.trellix.com/en-us/about/newsroom/stories/research/trellix-advanced-research-center-discovers-a-new-privilege-escalation-bug-class-on-macos-and-ios.html The subscriptions I use that do NSPredicate(value: true) do not have an issue being saved to the database.
Replies
Boosts
Views
Activity
Feb ’23
Reply to CloudKit Subscriptions - weird things going on
I've recently been having issues with creating CKQuerySubscriptions as well since Tuesday of last week. They are BAD_REQUEST errors saying that a subscription can not be created in the production container. I have not updated my subscription logic in months and this issue is preventing my users from receiving notifications about records.
Replies
Boosts
Views
Activity
Feb ’23
Reply to iOS 16 - View tap area is wrong after presenting sheet and going to background
Seeing this as well even in iOS 16.1 RC. Filed Feedback, but haven't heard back yet.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’22
Reply to .searchable modifier with a keyboard shortcut
I ended up getting the following to work on macOS using the .searchable() modifier (only tested on macOS 12.3): import SwiftUI @main struct MyApp: App {     @State var searchText = ""     var items = ["Item 1", "Item 2", "Item 3"]     var searchResults: [String] {         if searchText.isEmpty {             return items         } else {             return items.filter { $0.contains(searchText) }         }     }     var body: some Scene {         WindowGroup {             List(self.searchResults, id: \.self) { item in                 Text(item)             }.searchable(text: self.$searchText)         }.commands {             CommandMenu("Find") {                 Button("Find") {                     if let toolbar = NSApp.keyWindow?.toolbar,                         let search = toolbar.items.first(where: { $0.itemIdentifier.rawValue == "com.apple.SwiftUI.search" }) as? NSSearchToolbarItem {                         search.beginSearchInteraction()                     }                 }.keyboardShortcut("f", modifiers: .command)             }         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’22
Reply to CloudKit: Duplicate notifications for CKQuerySubscriptions
I started using the subscriptionID to ensure that I would not be creating duplicate subscriptions and this did not alleviate the issue either.
Replies
Boosts
Views
Activity
Sep ’21