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

Can I add "com.apple.developer.calling-app" in the InHouse account?
https://developer.apple.com/documentation/callkit/preparing-your-app-to-be-the-default-calling-app I have 2 accounts, one for App store and one for tesing (Inhouse type). I added the capability in the Xcode project, and can run it. But when I run a Inhouse build for it on my CI server, it failed. So is the Inhouse build support this "com.apple.developer.calling-app"?
1
0
52
Aug ’25
Change the Language of my current input keyboard programmatically in iOS and MacOS
We are building a Multi-Lingual Business Application -- where the user is able to enter values and data in multiple languages. One of our main use cases is, if a user is editing or adding to a text value or data that is in a different language. For example, the data they are editing could be in Japanese, and the user's current input language is set to English, then when they enter the editing mode, the input language is automatically set to Japanese by us -- programmatically. They can go back to editing English items, and the input language is changed back to English, and similarly, when they come back to edit the Japanese data or some German data, then the input language is again automatically changed to the respective language by the application -- without causing the user to manually go to the settings and change it. Is there any current way to have this behaviour in MacOS and iOS now? Please suggest what can be done to achieve the same.
4
1
593
Jul ’25
Context menus need option to disable morphing
For some controls it is desirable to not use the morphing transition when presenting a Menu. Instead, you might want to have the old behavior, where the menu is presented above or below the initiating view. This can be the case for any other control than toolbar items, but especially for bigger content cards, that should trigger a menu upon tapping it once. In those cases it looks weird and does not really help to keep context of what the action is doing. Is there some way to do this right now? In case it's not, I also filed a feedback. FB18413055
0
0
61
Jul ’25
What to do about the new glass medium detent sheets
So many issues with the new sheet design, I don't think I can ship these. And it's both in UIKit and SwiftUI. Honestly these net sheets seem like a failure from start to finish and I don't believe it will get better for the initial release. Toolbar buttons in medium detent size have very low contrast and look bad with their opaque appearance During the transition from medium to large detent the whole sheet flickers and turns transparent for a split moment, creating a very jarring transition (video here: https://mastodon.social/@nicoreese/114938826906689965). In the large detent the background is always white in light mode making the cells bleed into the background making them indistinguishable from it. I should be able to set a background color for the large detent which smoothly transitions to it. Like: glass in medium and system grouped background in large. Any interaction with the medium detent sheet makes it scale up. Why? It's okay for single interactions but not for when the user taps something in it rapidly. There needs to be a way to disable this behavior. In the medium detent List/UICollectionView rows are white in light mode or gray in dark mode. Especially in dark mode it looks very bad against the glass background. Those rows should probably be translucent to better fit the glass. This needs serious fixing and fast. FB18919680 FB18919657 FB18919600 FB18919549 FB18919496 FB18919630
0
1
82
Jul ’25
WKApplication、WKWatchKitApp
Validation failed Missing Info.plist value. A value for the key “WKApplication”, or “WKWatchKitApp” if your project has a WatchKit App Extension target, is required in “demo.app/demo.app” bundle. For details, see: https://developer.apple.com/documentation/watchkit/creating_independent_watchos_apps/setting_up_a_watchos_project (ID: 1***fc8) 我们APP中没有watchkit相关功能,但是在xcode16.3上传包的时候一直提示此错误?是什么原因?
3
1
104
Jul ’25
UWB Background Ranging with Live Activities - iOS 18.4
I’m developing an app that uses UWB for proximity detection between users. I have questions about iOS 18.4’s new Live Activity background UWB capabilities. Live Activity Background UWB “Loophole” Apple’s documentation states that apps can continue UWB ranging in background with “any supported device” if a Live Activity is started as the app backgrounds - without requiring Bluetooth LE pairing. Key Questions: 1. Background initiation: Can new UWB sessions be initiated between devices while in background using Live Activities, or must sessions start in foreground first? 2. No pairing requirement: Does this iOS 18.4 Live Activity approach truly eliminate the need for Bluetooth LE pairing for background UWB ranging? 3. Session persistence: How long can UWB ranging continue in background with an active Live Activity? 4. Testing without entitlement: Can I test UWB functionality between multiple devices in Xcode without the Nearby Interaction entitlement approved yet? Context My app needs precise proximity detection between users in real-time. The Live Activity background capability would be essential since users need to put phones away while the ranging continues. This iOS 18.4 feature seems like it could be a game-changer for apps requiring background UWB functionality without the complexity of Bluetooth pairing. Has anyone successfully implemented this Live Activity + background UWB approach?
0
0
166
Jul ’25
Replacement for deprecated CLPlacemark.region?
Hello, I use CLGeocoder to get the CLLocationCoordinate2D and CLRegion for an address. Now that this is deprecated in OS 26, I don't see a replacement for that property on MKMapItem via MKMapItemRequest and PlaceDescriptor. I've filed FB19027378 on this issue. Basically I have some addresses that have a street address, and others that just have a city. With CLGeocoder, when geocoding just the city, the CLRegion was set such that I could show my map zoomed out just right. I'm not sure how to do that now. Thanks!
0
0
77
Jul ’25
Alternative icons with Icon Composer
Hello dear Apple Engineers and fellow developers. Today I was crafting my new App Icon with Icon Composer and I was wondering how I can support alternative App Icons. I couldn't find any documentation about it yet. Is it already supported? Will it be supported soon?
Topic: UI Frameworks SubTopic: General
3
0
141
Jul ’25
Best Option for Programmatically Scrolling Long Dynamic Text
Hello! I am trying to create an iOS app that is based around a very large, vertically scrolling text view. The text is broken up into many sections, and the user should be able to press buttons in the navigation, which programmatically scroll to those sections. The user can also change the font size in a settings menu. It should generally keep the user's spot when resizing fonts or rotating the screen (from portrait to landscape). The problem I've been having is that no method of lazy text loading allows accurate enough navigation, and the text is too long to calculate the whole UI all at once. Here's my process in trying to find a solution: My app is built in SwiftUI, so I started with a ScrollView and a LazyVStack, and I used .scrollPosition() and bound it to an Int?. It worked pretty well for most scroll locations both on screen and far off the screen, but when I programmatically scroll to a location that is off the screen but not very far off, it completely misses. So, I investigated UIKit, and found that UITextView was a much better fit for the way I wanted to present the long text. I could also programmatically navigate by storing the NSRange of each section. I tried to use scrollRangeToVisible(), but for long distance it would scroll so that the desired section was just below the viewport and thus off screen. Then I tried to use UITextView's textLayoutManager.textViewportLayoutController.relocateViewport() to send it to the correct NSTextRange, it would not jump all the way, but instead would do nothing until I tried to scroll again and it would jump slightly forward. I tried to use textViewportLayoutController.layoutViewport() after the jump, and that fixed the glitch when scrolling, but it still did not jump to the correct place, only slightly forward. Then, I looked into TextKit 2 and the way it worked to try to find a solution. From what I can tell, it seems that to affect the NSTextViewportLayoutController without having to rewrite it, I need an NSTextViewportLayoutControllerDelegate, but the delegate required me to manually lay out the views, and in all the examples I've seen that use a custom NSTextViewportLayoutControllerDelegate, they wrote their own custom text view instead of using the default UITextView. I started looking into writing a custom text view so I can get the programmatic scroll to work consistently. However, it felt like, from a maintainability standpoint, it would probably be best to stick with what Apple has already implemented. For now, I found a workaround that scrolls consistently. Here is the code: if let start = self.textView.position(from: self.textView.beginningOfDocument, offset: desiredLineRange.location) { let location = textView.caretRect(for: start) self.textView.setContentOffset(CGPoint(x: 0, y: location.origin.y), animated: false) } if let start = self.textView.position(from: self.textView.beginningOfDocument, offset: desiredLineRange.location) { let location = textView.caretRect(for: start) self.textView.setContentOffset(CGPoint(x: 0, y: location.origin.y), animated: false) } It does the job, because the first time it gets close enough, and the second time it gets to the precise location, but it just feels like a bit of a hack to run the same code twice. I was wondering if anyone knows what I could be doing wrong and if Apple provides any solutions for this? (Also, all my UIKit navigation attempts ran inside an @objc func, which I passed using button.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside). Just so you know in case it may be a problem with the way Swift and UIKit handle concurrency/parallel tasks). Thank you!
0
0
151
Jul ’25
Add Unity Project to existing VisionOS App
Hello, As titled, my team is trying to find a way to add unity projects to our current developments. We have checked several posts and tutorials, but find they are all about porting to a brand new project. Without modifying too much on our current swift codes, we wonder if we can add Unity part as a WindowGroup/ImmersiveSpace like the following? :) struct TestVisionUnityApp: App { var body: some Scene { // from default template WindowGroup { ContentView() .... } // @TODO WindowGroup {...} } }
0
1
251
Jul ’25
PDFKit findString selection extend not working
With PDFKit in SwiftUI, I'm using the findString function to search the text of a PDF. That part works correctly, but when I use the extend function to get some of the text on both sides of the found word (ie, its context in the page), it doesn't extend. Am I doing this wrong? There is very little documentation or examples about the extend function; even the Apple page doesn't specify what the units refer to in the extend call (presumably it means characters, but I suppose it could also be pixels, or some other measurement specific to PDFs). Here is the code, and pictures of the app, the output (showing that the code can read all the text on the page), and the Acrobat Reader effect I'm trying to achieve. If the extend function truly is broken, and not just a problem in how I'm going about this, a workaround would be to use the text from the entire page, and extract the surrounding words from there, but that does get complicated, especially if there are multiple instances of the word on the page, or if the result straddles 2 pages. import PDFKit import SwiftUI struct ContentView: View { @StateObject var controller = PDFViewController() @State var searchResults:[PDFSelection] = [] var body: some View { VStack { Button { searchResults = controller.pdfView!.document!.findString("is", withOptions: [.caseInsensitive]) let fullPageText = controller.pdfView!.document!.string print(fullPageText) for result in searchResults { let beforeExtending = result.string ?? "" print("Before: \(beforeExtending)") result.extend(atEnd: 3) result.extend(atStart: 3) let afterExtending = result.string ?? "" print("After: \(afterExtending)") } } label: { Text("Do search") } PDFKitView(url: generateURL(), controller: controller) } .padding() } func generateURL() -> URL { let bundlePathRootAsString = Bundle.main.resourcePath! var pdfPathInBundle = URL(fileURLWithPath: bundlePathRootAsString) pdfPathInBundle.append(path: "TestPDF.pdf") return pdfPathInBundle } } struct PDFKitView: UIViewRepresentable { func updateUIView(_ uiView: PDFView, context: Context) { } let url: URL @ObservedObject var controller: PDFViewController func makeUIView(context: Context) -> PDFView { let pdfView = PDFView() pdfView.document = PDFDocument(url: self.url) pdfView.autoScales = true controller.pdfView = pdfView return pdfView } } class PDFViewController: ObservableObject { var pdfView: PDFView? }
2
0
119
Jul ’25
App Clip Custom URL not Invoking Clip
Subject: Need Assistance with App Clip Invocation via URL Hello Developers, I’m currently facing an issue with invoking my App Clip through a URL, specifically when the link is shared via iMessage or Email. Instead of launching the App Clip, the URL redirects to the website. Here’s my current configuration: Approved App with an App Clip Universal Links functioning correctly within the App (verified through AASA file hosted on the website) Associated Domain Entitlements included for both the App and the App Clip Universal Link is expected to invoke the App Clip if the App isn’t installed Advanced Experience configured in App Store Connect The default experience URL from App Store Connect successfully triggers the App Clip, but my custom URL does not. I suspect I might be missing a crucial configuration step. Has anyone encountered a similar issue or have suggestions on what else I should verify? Thank you in advance for your help!
7
1
210
Jul ’25
NSInternalInconsistencyException Reason: Modifications to the layout engine must not be performed from a background thread
Hello, We have a Xamarin app in the stores (I know, Xamarin is EOL). We are working on a new version, but do to planning issues, it's not yet ready to be published. We now have a customer who complains that our app is crashing on iOS 26 beta. Our biggest question now is: will it be fixed in the stable release of iOS 26 or will we get a lot of complains around mid September? We currently don't have a device running iOS 26. The crash logs show multiple devices: iPhone 15, iPhone 15 Pro Max and iPhone 16 Pro This is the crash log: Runtime.ThrowNSException (System.IntPtr ns_exception) SIGABRT: Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread. Native stack trace: 0 CoreFoundation 0x00000001a2e438dc 44CF748C-19F2-31C4-A0F1-143E32768AF1 + 825564 1 libobjc.A.dylib 0x000000019ffa17a4 objc_exception_throw + 88 2 CoreAutoLayout 0x00000001c9afb3a4 84BC5753-1758-31EE-9293-D54061CA6C7A + 5028 3 CoreAutoLayout 0x00000001c9afb734 84BC5753-1758-31EE-9293-D54061CA6C7A + 5940 4 CoreAutoLayout 0x00000001c9afb404 84BC5753-1758-31EE-9293-D54061CA6C7A + 5124 5 CoreAutoLayout 0x00000001c9afaee8 84BC5753-1758-31EE-9293-D54061CA6C7A + 3816 6 UIKitCore 0x00000001a5a8bac8 ABE178BE-C241-3474-A192-70F042F71BF4 + 162504 7 UIKitCore 0x00000001a5b62760 ABE178BE-C241-3474-A192-70F042F71BF4 + 1042272 8 UIKitCore 0x00000001a5c98228 ABE178BE-C241-3474-A192-70F042F71BF4 + 2310696 9 UIKitCore 0x00000001a5a8b674 ABE178BE-C241-3474-A192-70F042F71BF4 + 161396 10 UIKitCore 0x00000001a5a8c134 ABE178BE-C241-3474-A192-70F042F71BF4 + 164148 11 UIKitCore 0x00000001a7326898 ABE178BE-C241-3474-A192-70F042F71BF4 + 25962648 12 QuartzCore 0x00000001a4db7d98 56B9FC0F-1E8F-3B5F-BE34-7DDB9A5D7375 + 703896 13 QuartzCore 0x00000001a4d9a810 56B9FC0F-1E8F-3B5F-BE34-7DDB9A5D7375 + 583696 14 QuartzCore 0x00000001a4db945c 56B9FC0F-1E8F-3B5F-BE34-7DDB9A5D7375 + 709724 15 QuartzCore 0x00000001a4d7a30c 56B9FC0F-1E8F-3B5F-BE34-7DDB9A5D7375 + 451340 16 QuartzCore 0x00000001a4da6fc4 56B9FC0F-1E8F-3B5F-BE34-7DDB9A5D7375 + 634820 17 Time.iOS 0x0000000105ebb6b0 sqlite3_sourceid + 19991196 18 Time.iOS 0x0000000105dfe4f8 sqlite3_sourceid + 19216612 19 Time.iOS 0x0000000106094154 sqlite3_sourceid + 21927232 20 Time.iOS 0x0000000104efe21c sqlite3_sourceid + 3487240 21 Time.iOS 0x0000000104efb90c sqlite3_sourceid + 3476728 22 Time.iOS 0x0000000104efb70c sqlite3_sourceid + 3476216 23 Time.iOS 0x0000000104efb690 sqlite3_sourceid + 3476092 24 Time.iOS 0x0000000104efe384 sqlite3_sourceid + 3487600 25 Time.iOS 0x00000001051dea20 sqlite3_sourceid + 6503948 26 Time.iOS 0x0000000107a17744 sqlite3_sourceid + 48679728 27 Time.iOS 0x0000000107ad1390 sqlite3_sourceid + 49440636 28 Time.iOS 0x0000000107ad6d2c sqlite3_sourceid + 49463576 29 Time.iOS 0x0000000107b1efe0 sqlite3_sourceid + 49759180 30 Time.iOS 0x0000000107b1ed6c sqlite3_sourceid + 49758552 31 libsystem_pthread.dylib 0x00000002329c9424 _pthread_start + 136 32 libsystem_pthread.dylib 0x00000002329c58cc thread_start + 8 Runtime.ThrowNSException (System.IntPtr ns_exception) Runtime.throw_ns_exception (System.IntPtr exc) (wrapper native-to-managed) ObjCRuntime.Runtime.throw_ns_exception(intptr) (wrapper managed-to-native) ObjCRuntime.Messaging.objc_msgSend(intptr,intptr) CATransaction.Commit () CADisplayLinkTicker.StartThread () ThreadHelper.ThreadStart_Context (System.Object state) ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) ThreadHelper.ThreadStart () (wrapper managed-to-native) ObjCRuntime.Messaging.objc_msgSend(intptr,intptr) CATransaction.Commit () CADisplayLinkTicker.StartThread () ThreadHelper.ThreadStart_Context (System.Object state) ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) ThreadHelper.ThreadStart () kind regards
Topic: UI Frameworks SubTopic: General
0
0
124
Jul ’25
Automatic Sign-In API — requestAutoSignInAuthorization() - "Service temporarily unavailable"
When integrating the Automatic Sign-In API on physical devices (iPhone SE with iOS 26.0 and Apple TV with tvOS 26.0), the call to requestAutoSignInAuthorization() results in an immediate error stating "Service temporarily unavailable." This prevents the app from obtaining the necessary authorization context to proceed with token updates and the Automatic Sign-In flow. The issue occurs specifically at the authorization request stage and does not progress to calling updateAutoSignInToken(), since it does not acquire conditions for it. All entitlement and sandbox setup have been verified and are correctly configured. Error: Error Domain=VSErrorDomain Code=3 "The service is temporarily unavailable." UserInfo={NSLocalizedDescription=The service is temporarily unavailable., NSLocalizedRecoverySuggestion=Please try again later.}
Topic: UI Frameworks SubTopic: General
0
6
308
Jul ’25
Programmatic motion on the mouse cursor triggers "shake to locate"
I use the following code to keep the mouse cursor within the bounds of my application window. This causes the mouse cursor to become magnified while hugging the window's edges. Is there a way to prevent this? My clients are building a game, board style with a large map viewed from a top camera. They want the map to pan automatically when the mouse reaches the edge of the window. And they want the mouse cursor to stay confined to the game window. Thank you. CGDisplayMoveCursorToPoint(CGMainDisplayID(), location); // Removes a delay introduced by CGWarpMouseCursorPosition to keep mouse cursor motion fluid while hugging the screen edges CGEventSourceRef eventSourceRef = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState); CGEventSourceSetLocalEventsSuppressionInterval(eventSourceRef, 0);
0
0
44
Jul ’25
MIDI Drag-and-drop to Logic Pro via NSItemProvider
Logic Pro recently changed the way it accepts drag and drop. If the ItemProvider contains UTType.midi, then Logic Pro shows visual feedback for the drop operation, but when the item is dropped, nothing happens. In the past, drag-and-drop used to work. With today's version (Logic Pro 11.2), the only way I was able to successfully drop MIDI was to provide UTType.fileURL and no other data types. But that's not a viable solution; I need other data types to be included too. As a side note, I tested with Ableton Live 12 and it works with no issue. Is this a bug in Logic Pro? What ItemProvider structure does Logic Pro expect to correctly receive the MIDI data?
3
0
75
Jul ’25