Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Explore the various UI frameworks available for building app interfaces. Discuss the use cases for different frameworks, share best practices, and get help with specific framework-related questions.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

The URL authorization read and write obtained by UIDocumentPickerViewController
The URL directory obtained by UIDocumentPickerVieweController can be read and written in the directory after calling startAccessingDecurityScopeResource. However, after restarting the app, if the URL saved in the package is called startAccessingDecurityScopeResource again and returns NO, UIDocumentPickerVieweController must be called again to retrieve the URL, and then startAccessingDecurityScopeResource must be called again before continuing the operation. This is too troublesome. Is there a way to continue reading and writing operations in the URL directory after restarting the app?
1
0
35
3w
Crash when minimizing on external display and unplugging it (iOS App on Mac)
Our iOS app, when running as an iOS App on Mac, crashes consistently under the following scenario: 1. Launch the app on an external display. 2. Minimize the app window. 3. Disconnect the external display. The app crashes every time under these conditions. The crash log shows the following call stack: *** Assertion failure in -[UINSWorkspace _maximumContentSizeForWindowOnScreen:], UINSWorkspace.m:401 -[UINSWorkspace _maximumContentSizeForWindowOnScreen:]: screen parameter should not be nil ( 0 CoreFoundation 0x000000018e841df0 __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000018e306b60 objc_exception_throw + 88 2 Foundation 0x000000018fb6aa78 -[NSCalendarDate initWithCoder:] + 0 3 UIKitMacHelper 0x00000001a9a59110 -[UINSWorkspace _maximumContentSizeForWindowOnScreen:] + 184 4 UIKitMacHelper 0x00000001a9a3e748 -[UINSSceneViewController _usableScreenSizeWithSceneSize:shouldOverride:] + 412 5 UIKitMacHelper 0x00000001a9a3d55c -[UINSSceneViewController _effectiveScaleFactorForLayoutWithOverride:] + 88 6 UIKitMacHelper 0x00000001a9a3f3a8 -[UINSSceneViewController _updateZoomFactors] + 28 7 UIKitMacHelper 0x00000001a9a3f248 -[UINSSceneViewController _updateZoomFactorsAndDoLayout] + 24 8 UIKitMacHelper 0x00000001a9a3df80 -[UINSSceneViewController _doUpdates:] + 104 9 UIKitMacHelper 0x00000001a99ad460 -[UINSSceneViewController observeValueForKeyPath:ofObject:change:context:] + 176 10 Foundation 0x000000018facb0d8 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 388 11 Foundation 0x000000018facb0d8 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 388 12 Foundation 0x000000018fa8f7b4 NSKeyValueNotifyObserver + 252 13 Foundation 0x000000018fb3c560 NSKeyValueDidChange + 388 14 Foundation 0x00000001903149a0 NSKeyValueDidChangeWithPerThreadPendingNotifications + 160 15 AppKit 0x00000001924673d4 -[NSThemeFrame _didChangeContentLayoutRect] + 76 16 AppKit 0x000000019246521c -[NSWindow _oldPlaceWindow:fromServer:] + 744 ) It seems like the system attempts to access a screen object that is already nil after the external monitor is removed. This leads to an assertion failure in UINSWorkspace. Is there any known workaround or update planned to address this issue? Thank you.
2
0
40
3w
ARKit Camera Feed Zoom & Macro Support for Close-Range Objects
I am currently developing an AR experience using ARKit with SceneKit and am looking to implement functionality that enables: Zooming into the AR camera feed, ideally leveraging the ultra-wide or telephoto lenses available on supported devices. Macro-style focus capabilities, allowing users to view and interact with virtual content closely aligned with small or nearby real-world objects (within a few centimeters). My objective is to ensure that ARKit continues to render the scene accurately while enabling a zoomed-in view or macro-level focus for better detail visibility and alignment. Could you please advise on: Whether ARKit currently supports camera zoom or allows access to macro or ultra-wide cameras within an ARSession. Limitations or considerations when using multi-camera setups in conjunction with ARKit. Any guidance or references to documentation or sample code would be greatly appreciated.
0
0
45
3w
Regarding ARKit camera feed zoom and macro support for closer object
I am currently developing an AR experience using ARKit with SceneKit and am looking to implement functionality that enables: Zooming into the AR camera feed, ideally leveraging the ultra-wide or telephoto lenses available on supported devices. Macro-style focus capabilities, allowing users to view and interact with virtual content closely aligned with small or nearby real-world objects (within a few centimeters). My objective is to ensure that ARKit continues to render the scene accurately while enabling a zoomed-in view or macro-level focus for better detail visibility and alignment. Could you please advise on: Whether ARKit currently supports camera zoom or allows access to macro or ultra-wide cameras within an ARSession. Limitations or considerations when using multi-camera setups in conjunction with ARKit. Any guidance or references to documentation or sample code would be greatly appreciated. Best regards, Ayush
0
0
32
3w
Dock tile plugin and app groups
In one of my apps I use an app group to share data between the app and a command line tool. This works as expected. The app also contains a Dock Tile plugin and I wonder if there's a way to access the group container from this plugin? Thanks in advance for your help. Best regards, Marc
5
0
346
3w
ssue with Session Sharing Between Safari and ASWebAuthenticationSession
We are experiencing an issue with session sharing on iOS and would appreciate your guidance. We operate and control our own OpenID Connect (OIDC) server. Our iOS application uses ASWebAuthenticationSession to authenticate users. We're unable to get the authentication session to be shared between the Safari app and the app's ASWebAuthenticationSession. This results in users having to re-authenticate despite being logged in via Safari. We've attempted various configurations related to cookie SameSite settings. These adjustments resolved the session sharing issue on Android using Chrome Custom Tabs. However, no changes we've tried have enabled session sharing to work as expected on iOS. According to documentation from Apple, Microsoft, Okta, and Auth0, session sharing between Safari and ASWebAuthenticationSession should work. Question: Are there any additional settings, configurations, or platform limitations we should be aware of that could impact session sharing on iOS? Where else can we look to resolve this issue?
Topic: UI Frameworks SubTopic: General
0
0
40
3w
Opening FileDocument with URL → should only be called in the main thread
Its document says openDocument can open a document at a specific URL. So I've saved a model as a JSON object with its URL and a bookmark as Data. With its security-scoped bookmark data resolved, I am able to open a document except that the app will crash right after opening a document. Console says should only be called in the main thread struct ContentView: View { @EnvironmentObject var bookmarkViewModel: BookmarkViewModel var body: some View { VStack { } .onAppear { loadBookmarks() } } extension ContentView { func loadBookmarks() { print("1 \(Thread.current)") // NSMainThread Task { for bookmarkItem in bookmarkViewModel.bookmarkItems { // resolving a security-scoped bookmark print("2 \(Thread.current)") // NSMainThread if let _ = resolveBookmark(bookmarkData: bookmarkItem.bookmarkData) { print("3 \(Thread.current)") // NSMainThread do { print("4 \(Thread.current)") // NSMainThread try await openDocument(at: bookmarkItem.bookmarkURL) print("5 \(Thread.current)") // NSMainThread } catch { print("\(error.localizedDescription)") } } } } } } Well, the application is on the main thread. I've checked every line before and after opening a document with its URL. Call what on the main thread? This is confusing. Thanks. class BookmarkViewModel: ObservableObject { @Published var bookmarkItems: [BookmarkItem] = [] var defaultFileManager: FileManager { return FileManager.default } var documentURL: URL? { ... } init() { fetchBookmarkItems() } func fetchBookmarkItems() { bookmarkItems.removeAll() if let documentURL { let bookmarkFolderURL = documentURL.appending(path: "MyApp").appending(path: "Bookmarks") do { let contents = try defaultFileManager.contentsOfDirectory(atPath: bookmarkFolderURL.path) for content in contents { ... let fileURL = bookmarkFolderURL.appending(path: content) let data = try Data(contentsOf: fileURL) let bookmarkItem = try JSONDecoder().decode(BookmarkItem.self, from: data) bookmarkItems.append(bookmarkItem) } } catch { print("Error fetching folder content: \(error.localizedDescription)") } } } } struct BookmarkItem: Codable, Hashable { let bookmarkURL: URL let date: Date let bookmarkData: Data let open: Bool }
4
0
68
3w
Best Way to Help Users Diagnose iOS App Crashes with No UI Feedback
Hi all, We're working on an iOS application and would like to improve our ability to diagnose failures - especially in scenarios where the app crashes before it can present any UI to the user. A few specific questions: In case of an exception or crash, is there a way to log the issue so the user (or our support team) can understand the cause of the failure? If the app crashes abruptly (e.g., due to a runtime exception or crash during launch), is there a recommended way to persist error information before the process terminates? Are there Apple-supported mechanisms (like crash reporting tools or APIs) we can integrate that would help us capture such issues? What’s the best practice for enabling support teams to assist users based on crash reports - especially for crashes that happen before any user interaction? Our goal is to make sure users aren't left in the dark if the app fails to start, and to allow us to deliver timely updates or support based on the cause of the crash. Thanks in advance for your guidance!
Topic: UI Frameworks SubTopic: General Tags:
0
0
41
4w
AppIntent complie issue & manual remove AppIntent dialog
1.When I attempted to open the subsequent AppIntent within the perform method of the AppIntent instance, I always received the following error: How to solve the problems of inconsistency of this type? I couldn't find any sample code. 2.When I used method 'Button(intent: OpenAppIntent())' to open my app through the dialog custom view of AppIntent, but I couldn't find a way to close this AppIntent dialog. How can i remove this dialog?
Topic: UI Frameworks SubTopic: General
2
0
39
4w
CPGridTemplate in CPTabBarTemplate: Second Item Not Selecting in CarPlay Simulator
I am experiencing an issue while using CPGridTemplate within CPTabBarTemplate in my CarPlay app running in the simulator. On app launch, when I select the second item in the grid, it does not visually reflect as selected in the UI. This behavior is unexpected, as the grid item selection should update accordingly. Has anyone encountered this issue or found a solution to ensure proper item selection?
1
0
21
May ’25
CPTabBarTemplate in CarPlay Simulator: Tab Becomes Inactive on Re-selection
I am facing an issue in my CarPlay app using CPTabBarTemplate. The app has two tabs, and on launch, the first tab is correctly selected. However, when I tap on the first tab again, instead of staying active, it becomes inactive. This behavior is unexpected, as re-selecting the active tab should typically maintain its selected state. Has anyone else encountered this issue or found a workaround to prevent the tab from becoming inactive?
0
0
20
May ’25
Bundling OSX installer plugin with productbuild/pkgbuild
I'm trying to create a .pkg installer with productbuild/pkgbuild. But I'd also like to add my custom installer plugin to this. I'm using the following script. I'd like to add my bundle into this script. Since there are no official docs from apple how to do this nor there are a lot of updated resources, here are some things I have tried. adding the following line to Distrubtion.xml <bundle id="pluginid" path="path/to/myplugin.bundle"/> adding component tag to pkgbuild also doesn't do anything --component "path/to/myplugin.bundle" The bundle itself is build with XCode - it is a simple UI for user to type some input in Apple provides documentation for Distribution.xml file, which supports different UI elements but doesn't support text input - docs I have been also looking at this tutorial , it is very outdated but i could still fit it to my needs except the part where the .bundle file needs to be inserted into .pkg. Note - there is no option to view the contents of .pkg file build with pkbuild/productbuild How can i do this process correctly? I would like to link my installer pane plugin to a generic .pkg(with licenses and so on). I'd appreciate any kind of help!
0
0
30
May ’25
App Name Display
For now, my app name length is more than 20 characters, so the iPhone app name displays without a space, and uses the range operator to ensure showing the rest in the next line. Is it possible to show space and name with 2 lines?
Topic: UI Frameworks SubTopic: General Tags:
0
0
28
May ’25
tvOS Remote Control Entitlements
I've been looking for a solution to configure the Apple TV remote(s) from the 5th generation and upwards. Some of the basic functionalities are disabling buttons on the physical remote control while maintaining proper functionality on remote controller apps on iOS devices. There seems to be a lack of relevant entitlements in that category, and without it I can't seem to figure out a way to make it work. Any ideas on the matter? Maybe a workaround that allows to configure the Apple TV to work with other remotes? Thank you in advance to anyone that put in thought to my query.
0
0
38
May ’25