Post

Replies

Boosts

Views

Activity

preferredTransition not working when using setViewControllers(_:animated:)
I’m using the new preferredTransition = .zoom(...) API introduced in iOS 18. Here’s a simplified version of what I do on app startup: let listVC = CollectionViewController(collectionViewLayout: layout) let detailVC = DetailViewController() detailVC.preferredTransition = .zoom(sourceViewProvider: { context in let indexPath = IndexPath(row: 0, section: 0) let cell = listVC.collectionView.cellForItem(at: indexPath) return cell }) let nav = UINavigationController() nav.setViewControllers([listVC, detailVC], animated: false) window?.rootViewController = nav window?.makeKeyAndVisible() This is meant to restore the UI state from a previous session — the app should launch directly into the DetailViewController. The Problem When I launch the app with setViewControllers([listVC, detailVC], animated: false), the transition from listVC to detailVC appears correctly (i.e., no animation, as intended), but the drag-to-dismiss gesture does not work. The back button appears, and tapping it correctly triggers the zoom-out transition back to the cell, so the preferredTransition = .zoom(...) itself is properly configured. Interestingly, if I delay the push with a DispatchQueue.main.async and instead do: nav.setViewControllers([listVC], animated: false) DispatchQueue.main.async { nav.pushViewController(detailVC, animated: true) } …then everything works perfectly — including the interactive swipe-to-dismiss gesture — but that introduces an unwanted visual artifact: the user briefly sees the listVC, and then it pushes to detailVC, which I’m trying to avoid. My Question Is there a way to enable the swipe-to-dismiss gesture when using setViewControllers([listVC, detailVC], animated: false) It can be very confusing for users if swipe-to-dismiss only works in certain cases inconsistently. Thanks
6
0
291
Sep ’25
How to properly use PermissionKit to ask permission
For testing permission response we can use the sandbox account However, when testing permission requests using the AskCenter API, none of the ask API works for me in xcode 26.2 rc and iOS 26.2 rc. For SignificantAppUpdateTopic, I got errors like "The user is in a region that does not support this type of ask" in the console log, but I've already set my billing address to Texas. For CommunicationTopic, the console shows several XPC-related errors, and I’m not sure which of them are relevant. Both of them show an alert view of "Can't ask, An unknown error occurred" Can someone help to guide us how to test the request flow? Thanks
4
1
196
1d
How to request Safari to automatic Provide Webpage PDFs to Share Extensions on iOS
Use case: When users open any URL in iOS Safari and tap the share button, the share extension can automatically receive the PDF version of the webpage from Safari. We've observed that the system Markup app and the Apple Books app can automatically receive a PDF file from Safari. However, our custom share extension only receives the webpage URL. While iOS Safari provides an "Options" button to manually share a webpage as a PDF, this feature is not intuitive and requires user education. Could someone help to identify the correct NSExtensionActivationRule (or any other solution) that would allow our share extension to directly receive the PDF snapshot from Safari without requiring additional user actions?
2
0
441
Feb ’25