Post

Replies

Boosts

Views

Activity

Reply to Request authorization for the notification center crash iOS app on Swift 6
FWIW, I was experiencing the same phenomenon (crashes related to multi threading issues) in a few other places: LAContext.evaluatePolicy(_:localizedReason:reply:) UNUserNotificationCenter.getNotificationSettings(completionHandler:) UNUserNotificationCenter.add(_:withCompletionHandler:) In all of these cases, the workaround suggested by Quinn did the trick of avoiding the crash. Best Regards, Viktor
Oct ’24
Reply to ScrollViewReader's scrollTo may be broken on iOS 15
I think I encountered the same issue today using Xcode 13.3 and iOS 15.4, and from what I can see the issue still persists. The following code reproduces the problem I'm having: struct ContentView: View { var body: some View { ScrollViewReader { proxy in ScrollView { Spacer(minLength: 300) Button("Scroll to #50") { proxy.scrollTo(50, anchor: .center) } VStack(spacing: 0) { ForEach(0..<100) { i in Text("\(i)") .frame(height: 100) .id(i) .frame(maxWidth: .infinity) } } } } } } I submitted a feedback to Apple using the above code sample: FB9959257.
Mar ’22
Reply to 'Edit Widget' not working for widget with dynamic options
Okay, after some more digging I found out what the error was. Since I'm integrating this into an app that already has intent support, I had forgotten to deal with my new intent handler in the INExtension subclass. So, the solution was this: class IntentHandler: INExtension { &#9;&#9;override func handler(for intent: INIntent) -> Any? { &#9;&#9;&#9;&#9;if intent is SomeIntent { &#9;&#9;&#9;&#9;&#9;&#9;return SomeHandler() &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;if intent is SomeOtherIntent { &#9;&#9;&#9;&#9;&#9;&#9;return SomeOtherIntentHandler() &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;// NOTE: this is what I had forgotten to add &#9;&#9;&#9;&#9;if #available(iOS 14, *), intent is WidgetIntent { &#9;&#9;&#9;&#9;&#9;&#9;return WidgetIntentHandler() &#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;return nil &#9;&#9;} }
Jul ’20