Post

Replies

Boosts

Views

Activity

Reply to Private UIKit code causes a crash when the app moves to the background on iOS 26
Continued from above 46 UIKitCore 0x1a0602558 __102-[UIKeyboardSceneDelegate _reloadInputViewsForKeyWindowSceneResponder:force:fromBecomeFirstResponder:]_block_invoke.587 + 36 (UIKeyboardSceneDelegate.m:2263) 47 UIKitCore 0x1a0a14fe8 __65-[UIPeripheralHost(UIKitInternal) queueDelayedTask:forKey:delay:]_block_invoke + 160 (UIPeripheralHost.m:975) 48 libdispatch.dylib 0x1d19877ec _dispatch_client_callout + 16 (client_callout.mm:85) 49 libdispatch.dylib 0x1d1972664 _dispatch_continuation_pop + 596 (queue.c:349) 50 libdispatch.dylib 0x1d1985528 _dispatch_source_latch_and_call + 396 (source.c:601) 51 libdispatch.dylib 0x1d19841fc _dispatch_source_invoke + 844 (source.c:966) 52 libdispatch.dylib 0x1d19a4a48 _dispatch_main_queue_drain.cold.5 + 592 (queue.c:8181) 53 libdispatch.dylib 0x1d197cec8 _dispatch_main_queue_drain + 180 (queue.c:8162) 54 libdispatch.dylib 0x1d197ce04 _dispatch_main_queue_callback_4CF + 44 (queue.c:8341) 55 CoreFoundation 0x19a000520 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1820) 56 CoreFoundation 0x199fb2d14 __CFRunLoopRun + 1944 (CFRunLoop.c:3177) 57 CoreFoundation 0x199fb1c44 _CFRunLoopRunSpecificWithOptions + 532 (CFRunLoop.c:3462) 58 GraphicsServices 0x2393a6498 GSEventRunModal + 120 (GSEvent.c:2049) 59 UIKitCore 0x19f92cddc -[UIApplication _run] + 792 (UIApplication.m:3899) 60 UIKitCore 0x19f8d1b0c UIApplicationMain + 336 (UIApplication.m:5574) 61 Ohio State 0x1005a0144 main + 324 (main.swift:0) 62 dyld 0x19702ae28 start + 7116 (dyldMain.cpp:1477)
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’25
Reply to Private UIKit code causes a crash when the app moves to the background on iOS 26
Last Exception Backtrace: 0 CoreFoundation 0x19a05e8c8 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x196fd57c4 objc_exception_throw + 88 (objc-exception.mm:356) 2 CoreFoundation 0x19a070e88 -[__NSArrayM objectAtIndex:] + 592 (NSArrayM.m:142) 3 UIKitCore 0x1a0369758 -[_UIFlowLayoutInfo setSizes:forItemsAtIndexPaths:] + 316 (UIFlowLayoutSupport.m:2030) 4 UIKitCore 0x1a0355768 -[UICollectionViewFlowLayout _didPerformUpdateVisibleCellsPassWithLayoutOffset:] + 156 (UICollectionViewFlowLayout.m:2112) 5 UIKitCore 0x1a03136f0 -[UICollectionView _updateVisibleCellsNow:] + 3452 (UICollectionView.m:5683) 6 UIKitCore 0x19fa64604 -[UICollectionView layoutSubviews] + 280 (UICollectionView.m:6895) 7 UIKitCore 0x19f8aa078 UIView._layoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:383) 8 UIKitCore 0x19f8aab38 @objc UIView._layoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0) 9 UIKitCore 0x1a1190f68 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2532 (UIView.m:20962) 10 QuartzCore 0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185) 11 QuartzCore 0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262) 12 UIKitCore 0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195) 13 UIKitCore 0x1a05c23e4 -[_UIAlertControllerPhoneTVMacView _updateTextAlignmentAfterLayout] + 124 (_UIAlertControllerPhoneTVMacView.m:3049) 14 UIKitCore 0x1a0095808 -[UIAlertController viewDidLayoutSubviews] + 156 (UIAlertController.m:928) 15 UIKitCore 0x19f8d4550 UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:436) 16 UIKitCore 0x19f8d4938 @objc UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0) 17 UIKitCore 0x1a119120c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 3208 (UIView.m:20993) 18 QuartzCore 0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185) 19 QuartzCore 0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262) 20 UIKitCore 0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195) 21 UIKitCore 0x1a06f6d2c __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_3 + 60 (_UIKeyboardLayoutAlignmentView.m:181) 22 UIKitCore 0x1a1188b9c +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 516 (UIView.m:17651) 23 UIKitCore 0x1a11891f0 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 48 (UIView.m:17734) 24 UIKitCore 0x1a06f6cd0 __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_2 + 160 (_UIKeyboardLayoutAlignmentView.m:179) 25 UIKitCore 0x1a06f6bd0 -[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:] + 772 (_UIKeyboardLayoutAlignmentView.m:190) 26 CoreFoundation 0x199fe6a04 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 (CFNotificationCenter.c:702) 27 CoreFoundation 0x199fe6ab4 ___CFXRegistrationPost_block_invoke + 92 (CFNotificationCenter.c:195) 28 CoreFoundation 0x199fe6910 _CFXRegistrationPost + 436 (CFNotificationCenter.c:223) 29 CoreFoundation 0x199fe70b0 _CFXNotificationPost + 736 (CFNotificationCenter.c:1249) 30 Foundation 0x197fb8c30 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 (NSNotification.m:598) 31 TextInputUI 0x1a6c71610 -[TUIKeyboardTrackingCoordinator postNotificationWithName:userInfo:] + 236 (TUIKeyboardTrackingCoordinator.m:1123) 32 TextInputUI 0x1a6c7115c -[TUIKeyboardTrackingCoordinator _postNotificationsWithAnimationInfo:type:start:] + 292 (TUIKeyboardTrackingCoordinator.m:0) 33 TextInputUI 0x1a6c71730 -[TUIKeyboardTrackingCoordinator postNotificationType:forStart:] + 140 (TUIKeyboardTrackingCoordinator.m:1113) 34 UIKitCore 0x1a0d3c134 __78-[UITrackingElementWindowController postValidatedStartNotifications:withInfo:]_block_invoke + 856 (UITrackingElementWindowController.m:1874) 35 UIKitCore 0x1a0d3bdb8 -[UITrackingElementWindowController postValidatedStartNotifications:withInfo:] + 228 (UITrackingElementWindowController.m:1905) 36 UIKitCore 0x1a0d3bcb0 -[UITrackingElementWindowController postStartNotifications:withInfo:] + 72 (UITrackingElementWindowController.m:1858) 37 UIKitCore 0x1a0d41528 __87-[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke_4 + 1516 (UITrackingElementWindowController.m:2969) 38 UIKitCore 0x1a070646c -[UIInputViewAnimationStyle launchAnimation:afterStarted:completion:forHost:fromCurrentPosition:] + 396 (UIInputViewAnimationStyle.m:149) 39 UIKitCore 0x1a0d40b10 -[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:] + 3096 (UITrackingElementWindowController.m:3090) 40 UIKitCore 0x1a0d47e2c -[UITrackingElementWindowController setInputViewSet:] + 2412 (UITrackingElementWindowController.m:4203) 41 UIKitCore 0x1a0d3e390 -[UITrackingElementWindowController performOperations:withAnimationStyle:] + 68 (UITrackingElementWindowController.m:2440) 42 UIKitCore 0x1a0604b0c -[UIKeyboardSceneDelegate setKeyWindowSceneInputViews:animationStyle:] + 2780 (UIKeyboardSceneDelegate.m:2938) 43 UIKitCore 0x1a0603ff4 -[UIKeyboardSceneDelegate setInputViews:animationStyle:] + 188 (UIKeyboardSceneDelegate.m:2806) 44 UIKitCore 0x1a06050ac -[UIKeyboardSceneDelegate setInputViews:animated:] + 76 (UIKeyboardSceneDelegate.m:2994) 45 UIKitCore 0x1a0605110 -[UIKeyboardSceneDelegate setInputViews:] + 56 (UIKeyboardSceneDelegate.m:2999) ...
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’25
Reply to NSInvalidArgumentException Crash During Keyboard Language Switch on iOS 26
We have similar crash reports in our app on iOS 26. For us the crash seems to occur while the app is running the background. Last Exception Backtrace: 0 CoreFoundation 0x19a05e8c8 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x196fd57c4 objc_exception_throw + 88 (objc-exception.mm:356) 2 CoreFoundation 0x19a070e88 -[__NSArrayM objectAtIndex:] + 592 (NSArrayM.m:142) 3 UIKitCore 0x1a0369758 -[_UIFlowLayoutInfo setSizes:forItemsAtIndexPaths:] + 316 (UIFlowLayoutSupport.m:2030) 4 UIKitCore 0x1a0355768 -[UICollectionViewFlowLayout _didPerformUpdateVisibleCellsPassWithLayoutOffset:] + 156 (UICollectionViewFlowLayout.m:2112) 5 UIKitCore 0x1a03136f0 -[UICollectionView _updateVisibleCellsNow:] + 3452 (UICollectionView.m:5683) 6 UIKitCore 0x19fa64604 -[UICollectionView layoutSubviews] + 280 (UICollectionView.m:6895) 7 UIKitCore 0x19f8aa078 UIView._layoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:383) 8 UIKitCore 0x19f8aab38 @objc UIView._layoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0) 9 UIKitCore 0x1a1190f68 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2532 (UIView.m:20962) 10 QuartzCore 0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185) 11 QuartzCore 0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262) 12 UIKitCore 0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195) 13 UIKitCore 0x1a05c23e4 -[_UIAlertControllerPhoneTVMacView _updateTextAlignmentAfterLayout] + 124 (_UIAlertControllerPhoneTVMacView.m:3049) 14 UIKitCore 0x1a0095808 -[UIAlertController viewDidLayoutSubviews] + 156 (UIAlertController.m:928) 15 UIKitCore 0x19f8d4550 UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:436) 16 UIKitCore 0x19f8d4938 @objc UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0) 17 UIKitCore 0x1a119120c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 3208 (UIView.m:20993) 18 QuartzCore 0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185) 19 QuartzCore 0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262) 20 UIKitCore 0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195) 21 UIKitCore 0x1a06f6d2c __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_3 + 60 (_UIKeyboardLayoutAlignmentView.m:181) 22 UIKitCore 0x1a1188b9c +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 516 (UIView.m:17651) 23 UIKitCore 0x1a11891f0 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 48 (UIView.m:17734) 24 UIKitCore 0x1a06f6cd0 __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_2 + 160 (_UIKeyboardLayoutAlignmentView.m:179) 25 UIKitCore 0x1a06f6bd0 -[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:] + 772 (_UIKeyboardLayoutAlignmentView.m:190) 26 CoreFoundation 0x199fe6a04 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 (CFNotificationCenter.c:702) 27 CoreFoundation 0x199fe6ab4 ___CFXRegistrationPost_block_invoke + 92 (CFNotificationCenter.c:195) 28 CoreFoundation 0x199fe6910 _CFXRegistrationPost + 436 (CFNotificationCenter.c:223) 29 CoreFoundation 0x199fe70b0 _CFXNotificationPost + 736 (CFNotificationCenter.c:1249) 30 Foundation 0x197fb8c30 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 (NSNotification.m:598) 31 TextInputUI 0x1a6c71610 -[TUIKeyboardTrackingCoordinator postNotificationWithName:userInfo:] + 236 (TUIKeyboardTrackingCoordinator.m:1123) 32 TextInputUI 0x1a6c7115c -[TUIKeyboardTrackingCoordinator _postNotificationsWithAnimationInfo:type:start:] + 292 (TUIKeyboardTrackingCoordinator.m:0) 33 TextInputUI 0x1a6c71730 -[TUIKeyboardTrackingCoordinator postNotificationType:forStart:] + 140 (TUIKeyboardTrackingCoordinator.m:1113) 34 UIKitCore 0x1a0d3c134 __78-[UITrackingElementWindowController postValidatedStartNotifications:withInfo:]_block_invoke + 856 (UITrackingElementWindowController.m:1874) 35 UIKitCore 0x1a0d3bdb8 -[UITrackingElementWindowController postValidatedStartNotifications:withInfo:] + 228 (UITrackingElementWindowController.m:1905) 36 UIKitCore 0x1a0d3bcb0 -[UITrackingElementWindowController postStartNotifications:withInfo:] + 72 (UITrackingElementWindowController.m:1858) 37 UIKitCore 0x1a0d41528 __87-[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke_4 + 1516 (UITrackingElementWindowController.m:2969) 38 UIKitCore 0x1a070646c -[UIInputViewAnimationStyle launchAnimation:afterStarted:completion:forHost:fromCurrentPosition:] + 396 (UIInputViewAnimationStyle.m:149) 39 UIKitCore 0x1a0d40b10 -[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:] + 3096 (UITrackingElementWindowController.m:3090) 40 UIKitCore 0x1a0d47e2c -[UITrackingElementWindowController setInputViewSet:] + 2412 (UITrackingElementWindowController.m:4203) 41 UIKitCore 0x1a0d3e390 -[UITrackingElementWindowController performOperations:withAnimationStyle:] + 68 (UITrackingElementWindowController.m:2440) 42 UIKitCore 0x1a0604b0c -[UIKeyboardSceneDelegate setKeyWindowSceneInputViews:animationStyle:] + 2780 (UIKeyboardSceneDelegate.m:2938) 43 UIKitCore 0x1a0603ff4 -[UIKeyboardSceneDelegate setInputViews:animationStyle:] + 188 (UIKeyboardSceneDelegate.m:2806) 44 UIKitCore 0x1a06050ac -[UIKeyboardSceneDelegate setInputViews:animated:] + 76 (UIKeyboardSceneDelegate.m:2994) 45 UIKitCore 0x1a0605110 -[UIKeyboardSceneDelegate setInputViews:] + 56 (UIKeyboardSceneDelegate.m:2999) ....
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’25
Reply to Concentric corner radius for grouped cells in UICollectionView on iOS 26
It appears that the only way to access any information about a cell's corner radius is obtained only via the cell's layer cornerRadius. List cells never get their corner configuration updated in grouped configurations. Further, I have noted that as of Xcode 16.0 Beta 7, accessing .cornerConfiguration on UICollectionView.appearance() causes a segfault (FB20029166).
Topic: UI Frameworks SubTopic: General Tags:
Sep ’25
Reply to Open specific screen in App Delegate after iOS 18 Control Center widget is tapped (failed to open URL)
I think it's failing because you setup your URL scheme in the editor to a bad format. Follow this closely and try using that first. You just setup the scheme and you can parse the query property in the app delegate method. https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app You have your control setup correctly to open the url, but the answer on this Stack is also helpful for parsing and adding query items. You can add that bit of code in your intent / app delegate for parsing and formulating the URL: https://stackoverflow.com/questions/73418995/open-url-scheme-through-widget-tap-ios-16-widget-kit
Topic: UI Frameworks SubTopic: General Tags:
Sep ’24
Reply to AppIntent - Widget & ControlWidget
Hi Dudi, Based on my own testing, I'm not sure if you can reload all controls from inside an AppIntent that is running outside of the App's execution scope. It seems like you can only get a definite reload if you call that from your running app. It would help to know where you are storing your counter value, as that could also affect this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to Unexpected Transparency in .fullScreenCover(isPresented:) Background in SwiftUI iOS 18 Beta
@marudavid I am not able to reproduce your issue using the following sample code. There is a default background color always on both Xcode 15 and Xcode 16.1 Beta. It is possible you are using some type of ViewModifier that is causing this. The following works fine. import SwiftUI struct Icon: Identifiable { var id: String var color: Color } struct ContentView: View { let icons = [ Icon(id: "figure.badminton", color: .red), Icon(id: "figure.fencing", color: .orange), Icon(id: "figure.gymnastics", color: .green), Icon(id: "figure.indoor.cycle", color: .blue), Icon(id: "figure.outdoor.cycle", color: .purple), Icon(id: "figure.rower", color: .indigo), ] @State private var selected: Icon? var body: some View { LazyVGrid(columns: [.init(.adaptive(minimum: 100, maximum: 300))]) { ForEach(icons) { icon in Button { selected = icon } label: { Image(systemName: icon.id) } .foregroundStyle(icon.color.gradient) .font(.system(size: 100)) } } .fullScreenCover(item: $selected, content: { icon in DestinationView(icon: icon, animation: animation) .onTapGesture { selected = nil } }) } } struct DestinationView: View { var icon: Icon var animation: Namespace.ID var body: some View { Image(systemName: icon.id) .font(.system(size: 300)) .foregroundStyle(icon.color.gradient) } } #Preview { ContentView() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’24
Reply to Disable App Shortcuts without releasing a new build
Sadly I don't believe this is possible, as AppShortcutsProvider requires a static array. It also does some ML magic under the hood at compile time that likely precludes an array of dynamic AppShortcuts from being supported. To handle this, if you need to put the AppShortcut in there before the feature is available / enabled, I would do the feature flag check inside of the AppIntent's perform method instead. If the feature is disabled you can return a dialog to indicate that to the user, or run the intended behavior normally if the feature is enabled. Otherwise, I'd leave the AppShortcut out until you are ready for that feature to be live in prod and exist in future versions of your app. AppShortcuts is certainly the easiest and most straightforward way to integrate AppIntents & Siri into your app simultaneously, but for now SiriKit still seems to be supported as well. AppIntents are definitely the future, as they are the API of choice to work with Apple Intelligence. I'd definitely recommend using AppIntents if this is a new feature in your app.
Topic: Machine Learning & AI SubTopic: General Tags:
Aug ’24
Reply to How can I share code between app and widget that contains uiapplication?
I am not entirely certain of your use case, but based on what you've described it seems like a good case for making a protocol and having two conforming classes / structs, one for the app, and another that lives in the extension. When the protocol's methods are called, they are delegated to the proper one. Another way to do it is to have a protocol and create two extensions: protocol NotificationDelegate { func doNotification() } The first extension lives in a file that has target membership of your main application or framework: extension MyLoggingClass: NotificationDelegate { func doNotification(...) { // will only be called by app, can use UIApplication here } } Then put this one in your extension: extension MyLoggingClass: NotificationDelegate { func doNotification(...) { // will only be called by app extension } }
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’24
Reply to iOS18 Control Widget that opens parent app
This question has been posted previously, and the "solution" is posted here: https://developer.apple.com/forums/thread/758637 Right now, for the parent app to open, you need to check the target membership box of your AppIntent file so that it lives in both the parent app and the control extension / widget bundle. Apple has not clarified the reason why this is, and I'd love to more too, but for now this is the only way that seems to work. I hope this behavior is adjusted / fixed before release. Further reading: https://developer.apple.com/forums/thread/759794
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’24
Reply to AppIntents don't show up in Shortcuts app when in SPM package
[quote='800449022, DTS Engineer, /thread/759160?answerId=800449022#800449022'] However, I want to highlight a subtly here. While an app intent can be in a framework that is dynamically linked (with Mach-O Type set to dynamic in the framework's build settings), those intents which back App Shortcuts cannot be in a framework. That is because the AppShortcutsProvider needs to be in the main app target, and the app intents declared by this provider also need to be in the same target. This is where it's useful to include the intent's source code file into your main app target and into an extension point target (and not a framework target) if you need the intent behind an App Shortcut to also be available from an extension executable. (And enhancement requests are welcome for allowing intents used by App Shortcuts to be placed in a framework.) [/quote] Thank you Ed for the much needed clarification and for your willingness to look into that FB. I would humbly ask that this rather important distinction be reflected in the docs either for AppIntentPackage, AppIntent, AppShortcuts or all of the above. I understand that there's some wizardry that goes on allowing AppShortcutsProvider to work, but given the express support for AppIntentsPackage and AppIntents in frameworks, this seems like a rather large omission. I have filed an enhancement request for this support FB14857658. SiriTipView in SwiftUI and UIKit both require a reference to the singular AppIntent that is already tied to the AppShortcutsProvider. Given the above, it means that the SiriTipView also has to live in the app target or app extension target. This means that any application that hosts its UI-code in a framework cannot support this use case (which is a lot of applications). So I think there's a good case here for usefulness in supporting framework-based AppIntents in Shortcuts.
Aug ’24
Reply to Private UIKit code causes a crash when the app moves to the background on iOS 26
Continued from above 46 UIKitCore 0x1a0602558 __102-[UIKeyboardSceneDelegate _reloadInputViewsForKeyWindowSceneResponder:force:fromBecomeFirstResponder:]_block_invoke.587 + 36 (UIKeyboardSceneDelegate.m:2263) 47 UIKitCore 0x1a0a14fe8 __65-[UIPeripheralHost(UIKitInternal) queueDelayedTask:forKey:delay:]_block_invoke + 160 (UIPeripheralHost.m:975) 48 libdispatch.dylib 0x1d19877ec _dispatch_client_callout + 16 (client_callout.mm:85) 49 libdispatch.dylib 0x1d1972664 _dispatch_continuation_pop + 596 (queue.c:349) 50 libdispatch.dylib 0x1d1985528 _dispatch_source_latch_and_call + 396 (source.c:601) 51 libdispatch.dylib 0x1d19841fc _dispatch_source_invoke + 844 (source.c:966) 52 libdispatch.dylib 0x1d19a4a48 _dispatch_main_queue_drain.cold.5 + 592 (queue.c:8181) 53 libdispatch.dylib 0x1d197cec8 _dispatch_main_queue_drain + 180 (queue.c:8162) 54 libdispatch.dylib 0x1d197ce04 _dispatch_main_queue_callback_4CF + 44 (queue.c:8341) 55 CoreFoundation 0x19a000520 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 (CFRunLoop.c:1820) 56 CoreFoundation 0x199fb2d14 __CFRunLoopRun + 1944 (CFRunLoop.c:3177) 57 CoreFoundation 0x199fb1c44 _CFRunLoopRunSpecificWithOptions + 532 (CFRunLoop.c:3462) 58 GraphicsServices 0x2393a6498 GSEventRunModal + 120 (GSEvent.c:2049) 59 UIKitCore 0x19f92cddc -[UIApplication _run] + 792 (UIApplication.m:3899) 60 UIKitCore 0x19f8d1b0c UIApplicationMain + 336 (UIApplication.m:5574) 61 Ohio State 0x1005a0144 main + 324 (main.swift:0) 62 dyld 0x19702ae28 start + 7116 (dyldMain.cpp:1477)
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Private UIKit code causes a crash when the app moves to the background on iOS 26
Last Exception Backtrace: 0 CoreFoundation 0x19a05e8c8 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x196fd57c4 objc_exception_throw + 88 (objc-exception.mm:356) 2 CoreFoundation 0x19a070e88 -[__NSArrayM objectAtIndex:] + 592 (NSArrayM.m:142) 3 UIKitCore 0x1a0369758 -[_UIFlowLayoutInfo setSizes:forItemsAtIndexPaths:] + 316 (UIFlowLayoutSupport.m:2030) 4 UIKitCore 0x1a0355768 -[UICollectionViewFlowLayout _didPerformUpdateVisibleCellsPassWithLayoutOffset:] + 156 (UICollectionViewFlowLayout.m:2112) 5 UIKitCore 0x1a03136f0 -[UICollectionView _updateVisibleCellsNow:] + 3452 (UICollectionView.m:5683) 6 UIKitCore 0x19fa64604 -[UICollectionView layoutSubviews] + 280 (UICollectionView.m:6895) 7 UIKitCore 0x19f8aa078 UIView._layoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:383) 8 UIKitCore 0x19f8aab38 @objc UIView._layoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0) 9 UIKitCore 0x1a1190f68 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2532 (UIView.m:20962) 10 QuartzCore 0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185) 11 QuartzCore 0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262) 12 UIKitCore 0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195) 13 UIKitCore 0x1a05c23e4 -[_UIAlertControllerPhoneTVMacView _updateTextAlignmentAfterLayout] + 124 (_UIAlertControllerPhoneTVMacView.m:3049) 14 UIKitCore 0x1a0095808 -[UIAlertController viewDidLayoutSubviews] + 156 (UIAlertController.m:928) 15 UIKitCore 0x19f8d4550 UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:436) 16 UIKitCore 0x19f8d4938 @objc UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0) 17 UIKitCore 0x1a119120c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 3208 (UIView.m:20993) 18 QuartzCore 0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185) 19 QuartzCore 0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262) 20 UIKitCore 0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195) 21 UIKitCore 0x1a06f6d2c __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_3 + 60 (_UIKeyboardLayoutAlignmentView.m:181) 22 UIKitCore 0x1a1188b9c +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 516 (UIView.m:17651) 23 UIKitCore 0x1a11891f0 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 48 (UIView.m:17734) 24 UIKitCore 0x1a06f6cd0 __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_2 + 160 (_UIKeyboardLayoutAlignmentView.m:179) 25 UIKitCore 0x1a06f6bd0 -[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:] + 772 (_UIKeyboardLayoutAlignmentView.m:190) 26 CoreFoundation 0x199fe6a04 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 (CFNotificationCenter.c:702) 27 CoreFoundation 0x199fe6ab4 ___CFXRegistrationPost_block_invoke + 92 (CFNotificationCenter.c:195) 28 CoreFoundation 0x199fe6910 _CFXRegistrationPost + 436 (CFNotificationCenter.c:223) 29 CoreFoundation 0x199fe70b0 _CFXNotificationPost + 736 (CFNotificationCenter.c:1249) 30 Foundation 0x197fb8c30 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 (NSNotification.m:598) 31 TextInputUI 0x1a6c71610 -[TUIKeyboardTrackingCoordinator postNotificationWithName:userInfo:] + 236 (TUIKeyboardTrackingCoordinator.m:1123) 32 TextInputUI 0x1a6c7115c -[TUIKeyboardTrackingCoordinator _postNotificationsWithAnimationInfo:type:start:] + 292 (TUIKeyboardTrackingCoordinator.m:0) 33 TextInputUI 0x1a6c71730 -[TUIKeyboardTrackingCoordinator postNotificationType:forStart:] + 140 (TUIKeyboardTrackingCoordinator.m:1113) 34 UIKitCore 0x1a0d3c134 __78-[UITrackingElementWindowController postValidatedStartNotifications:withInfo:]_block_invoke + 856 (UITrackingElementWindowController.m:1874) 35 UIKitCore 0x1a0d3bdb8 -[UITrackingElementWindowController postValidatedStartNotifications:withInfo:] + 228 (UITrackingElementWindowController.m:1905) 36 UIKitCore 0x1a0d3bcb0 -[UITrackingElementWindowController postStartNotifications:withInfo:] + 72 (UITrackingElementWindowController.m:1858) 37 UIKitCore 0x1a0d41528 __87-[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke_4 + 1516 (UITrackingElementWindowController.m:2969) 38 UIKitCore 0x1a070646c -[UIInputViewAnimationStyle launchAnimation:afterStarted:completion:forHost:fromCurrentPosition:] + 396 (UIInputViewAnimationStyle.m:149) 39 UIKitCore 0x1a0d40b10 -[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:] + 3096 (UITrackingElementWindowController.m:3090) 40 UIKitCore 0x1a0d47e2c -[UITrackingElementWindowController setInputViewSet:] + 2412 (UITrackingElementWindowController.m:4203) 41 UIKitCore 0x1a0d3e390 -[UITrackingElementWindowController performOperations:withAnimationStyle:] + 68 (UITrackingElementWindowController.m:2440) 42 UIKitCore 0x1a0604b0c -[UIKeyboardSceneDelegate setKeyWindowSceneInputViews:animationStyle:] + 2780 (UIKeyboardSceneDelegate.m:2938) 43 UIKitCore 0x1a0603ff4 -[UIKeyboardSceneDelegate setInputViews:animationStyle:] + 188 (UIKeyboardSceneDelegate.m:2806) 44 UIKitCore 0x1a06050ac -[UIKeyboardSceneDelegate setInputViews:animated:] + 76 (UIKeyboardSceneDelegate.m:2994) 45 UIKitCore 0x1a0605110 -[UIKeyboardSceneDelegate setInputViews:] + 56 (UIKeyboardSceneDelegate.m:2999) ...
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to NSInvalidArgumentException Crash During Keyboard Language Switch on iOS 26
We have similar crash reports in our app on iOS 26. For us the crash seems to occur while the app is running the background. Last Exception Backtrace: 0 CoreFoundation 0x19a05e8c8 __exceptionPreprocess + 164 (NSException.m:249) 1 libobjc.A.dylib 0x196fd57c4 objc_exception_throw + 88 (objc-exception.mm:356) 2 CoreFoundation 0x19a070e88 -[__NSArrayM objectAtIndex:] + 592 (NSArrayM.m:142) 3 UIKitCore 0x1a0369758 -[_UIFlowLayoutInfo setSizes:forItemsAtIndexPaths:] + 316 (UIFlowLayoutSupport.m:2030) 4 UIKitCore 0x1a0355768 -[UICollectionViewFlowLayout _didPerformUpdateVisibleCellsPassWithLayoutOffset:] + 156 (UICollectionViewFlowLayout.m:2112) 5 UIKitCore 0x1a03136f0 -[UICollectionView _updateVisibleCellsNow:] + 3452 (UICollectionView.m:5683) 6 UIKitCore 0x19fa64604 -[UICollectionView layoutSubviews] + 280 (UICollectionView.m:6895) 7 UIKitCore 0x19f8aa078 UIView._layoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:383) 8 UIKitCore 0x19f8aab38 @objc UIView._layoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0) 9 UIKitCore 0x1a1190f68 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2532 (UIView.m:20962) 10 QuartzCore 0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185) 11 QuartzCore 0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262) 12 UIKitCore 0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195) 13 UIKitCore 0x1a05c23e4 -[_UIAlertControllerPhoneTVMacView _updateTextAlignmentAfterLayout] + 124 (_UIAlertControllerPhoneTVMacView.m:3049) 14 UIKitCore 0x1a0095808 -[UIAlertController viewDidLayoutSubviews] + 156 (UIAlertController.m:928) 15 UIKitCore 0x19f8d4550 UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 828 (_UIObservationTracking.swift:436) 16 UIKitCore 0x19f8d4938 @objc UIViewController._viewDidLayoutSubviewsWithObservationTracking() + 36 (<compiler-generated>:0) 17 UIKitCore 0x1a119120c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 3208 (UIView.m:20993) 18 QuartzCore 0x19aa009a8 CA::Layer::perform_update_(CA::Layer*, CALayer*, unsigned int, CA::Transaction*) + 352 (CALayer.mm:11185) 19 QuartzCore 0x19a9e32fc CA::Layer::update_if_needed(CA::Transaction*, unsigned int, unsigned int) + 600 (CALayer.mm:11262) 20 UIKitCore 0x19f8887b4 -[UIView(Hierarchy) layoutBelowIfNeeded] + 316 (UIView.m:15195) 21 UIKitCore 0x1a06f6d2c __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_3 + 60 (_UIKeyboardLayoutAlignmentView.m:181) 22 UIKitCore 0x1a1188b9c +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 516 (UIView.m:17651) 23 UIKitCore 0x1a11891f0 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 48 (UIView.m:17734) 24 UIKitCore 0x1a06f6cd0 __76-[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:]_block_invoke_2 + 160 (_UIKeyboardLayoutAlignmentView.m:179) 25 UIKitCore 0x1a06f6bd0 -[_UIKeyboardLayoutAlignmentView _updateConstraintsForKeyboardNotification:] + 772 (_UIKeyboardLayoutAlignmentView.m:190) 26 CoreFoundation 0x199fe6a04 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 148 (CFNotificationCenter.c:702) 27 CoreFoundation 0x199fe6ab4 ___CFXRegistrationPost_block_invoke + 92 (CFNotificationCenter.c:195) 28 CoreFoundation 0x199fe6910 _CFXRegistrationPost + 436 (CFNotificationCenter.c:223) 29 CoreFoundation 0x199fe70b0 _CFXNotificationPost + 736 (CFNotificationCenter.c:1249) 30 Foundation 0x197fb8c30 -[NSNotificationCenter postNotificationName:object:userInfo:] + 92 (NSNotification.m:598) 31 TextInputUI 0x1a6c71610 -[TUIKeyboardTrackingCoordinator postNotificationWithName:userInfo:] + 236 (TUIKeyboardTrackingCoordinator.m:1123) 32 TextInputUI 0x1a6c7115c -[TUIKeyboardTrackingCoordinator _postNotificationsWithAnimationInfo:type:start:] + 292 (TUIKeyboardTrackingCoordinator.m:0) 33 TextInputUI 0x1a6c71730 -[TUIKeyboardTrackingCoordinator postNotificationType:forStart:] + 140 (TUIKeyboardTrackingCoordinator.m:1113) 34 UIKitCore 0x1a0d3c134 __78-[UITrackingElementWindowController postValidatedStartNotifications:withInfo:]_block_invoke + 856 (UITrackingElementWindowController.m:1874) 35 UIKitCore 0x1a0d3bdb8 -[UITrackingElementWindowController postValidatedStartNotifications:withInfo:] + 228 (UITrackingElementWindowController.m:1905) 36 UIKitCore 0x1a0d3bcb0 -[UITrackingElementWindowController postStartNotifications:withInfo:] + 72 (UITrackingElementWindowController.m:1858) 37 UIKitCore 0x1a0d41528 __87-[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:]_block_invoke_4 + 1516 (UITrackingElementWindowController.m:2969) 38 UIKitCore 0x1a070646c -[UIInputViewAnimationStyle launchAnimation:afterStarted:completion:forHost:fromCurrentPosition:] + 396 (UIInputViewAnimationStyle.m:149) 39 UIKitCore 0x1a0d40b10 -[UITrackingElementWindowController moveFromPlacement:toPlacement:starting:completion:] + 3096 (UITrackingElementWindowController.m:3090) 40 UIKitCore 0x1a0d47e2c -[UITrackingElementWindowController setInputViewSet:] + 2412 (UITrackingElementWindowController.m:4203) 41 UIKitCore 0x1a0d3e390 -[UITrackingElementWindowController performOperations:withAnimationStyle:] + 68 (UITrackingElementWindowController.m:2440) 42 UIKitCore 0x1a0604b0c -[UIKeyboardSceneDelegate setKeyWindowSceneInputViews:animationStyle:] + 2780 (UIKeyboardSceneDelegate.m:2938) 43 UIKitCore 0x1a0603ff4 -[UIKeyboardSceneDelegate setInputViews:animationStyle:] + 188 (UIKeyboardSceneDelegate.m:2806) 44 UIKitCore 0x1a06050ac -[UIKeyboardSceneDelegate setInputViews:animated:] + 76 (UIKeyboardSceneDelegate.m:2994) 45 UIKitCore 0x1a0605110 -[UIKeyboardSceneDelegate setInputViews:] + 56 (UIKeyboardSceneDelegate.m:2999) ....
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Concentric corner radius for grouped cells in UICollectionView on iOS 26
It appears that the only way to access any information about a cell's corner radius is obtained only via the cell's layer cornerRadius. List cells never get their corner configuration updated in grouped configurations. Further, I have noted that as of Xcode 16.0 Beta 7, accessing .cornerConfiguration on UICollectionView.appearance() causes a segfault (FB20029166).
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’25
Reply to Open specific screen in App Delegate after iOS 18 Control Center widget is tapped (failed to open URL)
I think it's failing because you setup your URL scheme in the editor to a bad format. Follow this closely and try using that first. You just setup the scheme and you can parse the query property in the app delegate method. https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app You have your control setup correctly to open the url, but the answer on this Stack is also helpful for parsing and adding query items. You can add that bit of code in your intent / app delegate for parsing and formulating the URL: https://stackoverflow.com/questions/73418995/open-url-scheme-through-widget-tap-ios-16-widget-kit
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to AppIntent - Widget & ControlWidget
Hi Dudi, Based on my own testing, I'm not sure if you can reload all controls from inside an AppIntent that is running outside of the App's execution scope. It seems like you can only get a definite reload if you call that from your running app. It would help to know where you are storing your counter value, as that could also affect this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Unexpected Transparency in .fullScreenCover(isPresented:) Background in SwiftUI iOS 18 Beta
@marudavid I am not able to reproduce your issue using the following sample code. There is a default background color always on both Xcode 15 and Xcode 16.1 Beta. It is possible you are using some type of ViewModifier that is causing this. The following works fine. import SwiftUI struct Icon: Identifiable { var id: String var color: Color } struct ContentView: View { let icons = [ Icon(id: "figure.badminton", color: .red), Icon(id: "figure.fencing", color: .orange), Icon(id: "figure.gymnastics", color: .green), Icon(id: "figure.indoor.cycle", color: .blue), Icon(id: "figure.outdoor.cycle", color: .purple), Icon(id: "figure.rower", color: .indigo), ] @State private var selected: Icon? var body: some View { LazyVGrid(columns: [.init(.adaptive(minimum: 100, maximum: 300))]) { ForEach(icons) { icon in Button { selected = icon } label: { Image(systemName: icon.id) } .foregroundStyle(icon.color.gradient) .font(.system(size: 100)) } } .fullScreenCover(item: $selected, content: { icon in DestinationView(icon: icon, animation: animation) .onTapGesture { selected = nil } }) } } struct DestinationView: View { var icon: Icon var animation: Namespace.ID var body: some View { Image(systemName: icon.id) .font(.system(size: 300)) .foregroundStyle(icon.color.gradient) } } #Preview { ContentView() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to Disable App Shortcuts without releasing a new build
Sadly I don't believe this is possible, as AppShortcutsProvider requires a static array. It also does some ML magic under the hood at compile time that likely precludes an array of dynamic AppShortcuts from being supported. To handle this, if you need to put the AppShortcut in there before the feature is available / enabled, I would do the feature flag check inside of the AppIntent's perform method instead. If the feature is disabled you can return a dialog to indicate that to the user, or run the intended behavior normally if the feature is enabled. Otherwise, I'd leave the AppShortcut out until you are ready for that feature to be live in prod and exist in future versions of your app. AppShortcuts is certainly the easiest and most straightforward way to integrate AppIntents & Siri into your app simultaneously, but for now SiriKit still seems to be supported as well. AppIntents are definitely the future, as they are the API of choice to work with Apple Intelligence. I'd definitely recommend using AppIntents if this is a new feature in your app.
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to How can I share code between app and widget that contains uiapplication?
I am not entirely certain of your use case, but based on what you've described it seems like a good case for making a protocol and having two conforming classes / structs, one for the app, and another that lives in the extension. When the protocol's methods are called, they are delegated to the proper one. Another way to do it is to have a protocol and create two extensions: protocol NotificationDelegate { func doNotification() } The first extension lives in a file that has target membership of your main application or framework: extension MyLoggingClass: NotificationDelegate { func doNotification(...) { // will only be called by app, can use UIApplication here } } Then put this one in your extension: extension MyLoggingClass: NotificationDelegate { func doNotification(...) { // will only be called by app extension } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to iOS18 Control Widget that opens parent app
This question has been posted previously, and the "solution" is posted here: https://developer.apple.com/forums/thread/758637 Right now, for the parent app to open, you need to check the target membership box of your AppIntent file so that it lives in both the parent app and the control extension / widget bundle. Apple has not clarified the reason why this is, and I'd love to more too, but for now this is the only way that seems to work. I hope this behavior is adjusted / fixed before release. Further reading: https://developer.apple.com/forums/thread/759794
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’24
Reply to AppIntents don't show up in Shortcuts app when in SPM package
[quote='800449022, DTS Engineer, /thread/759160?answerId=800449022#800449022'] However, I want to highlight a subtly here. While an app intent can be in a framework that is dynamically linked (with Mach-O Type set to dynamic in the framework's build settings), those intents which back App Shortcuts cannot be in a framework. That is because the AppShortcutsProvider needs to be in the main app target, and the app intents declared by this provider also need to be in the same target. This is where it's useful to include the intent's source code file into your main app target and into an extension point target (and not a framework target) if you need the intent behind an App Shortcut to also be available from an extension executable. (And enhancement requests are welcome for allowing intents used by App Shortcuts to be placed in a framework.) [/quote] Thank you Ed for the much needed clarification and for your willingness to look into that FB. I would humbly ask that this rather important distinction be reflected in the docs either for AppIntentPackage, AppIntent, AppShortcuts or all of the above. I understand that there's some wizardry that goes on allowing AppShortcutsProvider to work, but given the express support for AppIntentsPackage and AppIntents in frameworks, this seems like a rather large omission. I have filed an enhancement request for this support FB14857658. SiriTipView in SwiftUI and UIKit both require a reference to the singular AppIntent that is already tied to the AppShortcutsProvider. Given the above, it means that the SiriTipView also has to live in the app target or app extension target. This means that any application that hosts its UI-code in a framework cannot support this use case (which is a lot of applications). So I think there's a good case here for usefulness in supporting framework-based AppIntents in Shortcuts.
Replies
Boosts
Views
Activity
Aug ’24