Post

Replies

Boosts

Views

Activity

Official instruction for installing iOS 17.0 beta 2 and visionOS 1.0 in Xcode 15 beta 2
I downloaded the simulators, opened the DMGs, and copied them to the library. Then I start Xcode and it enters an infinite loop of "Cannot open because unverified...". I keep pressing "Open Anyway" in the Settings app, it keeps telling me "Cannot open because unverified blah blah...". I tried following the hints in this thread (https://developer.apple.com/forums/thread/732324) but no luck, I only wasted hours of work So, Apple, how to install visionOS 1.0 in Xcode 15 beta 2, such a way that it works??
0
0
635
Jul ’23
Xcode 14 Automatic signing failed
I have added Siri capability for an iOS/MacCatalyst app in Xcode. The app compiles just fine for iOS, but when compiling for MacCatalyst I get the error: “/Volumes/xdrive/M2/M2.xcodeproj Provisioning profile "Mac Catalyst Team Provisioning Profile: com.anotherview.M2.mac" doesn't include the com.apple.developer.siri entitlement. ” On the “Signing & Capabilities” page I get the error: “Automatic signing failed Xcode failed to provision this target. Please file a bug report at https://feedbackassistant.apple.com and include the Update Signing report from the Report navigator.” How can I add Siri capabilities on a Mac Catalyst app?
0
0
1.1k
Aug ’23
How to symbolicate macCatalyst X86-64 crash files on M1/2
Got some crashes in Xcode Organizer from a macCatalyst app and they are not symbolicated. The crashes are from an X86-64 machine, and my work machine is M1. When trying to symbolicate them in Organizer I get an error: "Unable to Symbolicate Crash - An error occurred attempting to symbolicate crash. Unable to locate dSYMs for ...". It makes sense, as I only run the app on M1, and maybe the X86-64 was not built on this machine. I then went to download the dSYM file from AppStoreConnect/TestFlight/Build Metadata, but there is no "Download dSYM" link, even though the app page says "Includes Symbols Yes". I then tried to compile the app for "AnyMac (Mac Catalyst, Apple Silicon, Intel)", and now I get a binary with two images, the arm64 and the x86, but the UUID of x86 image is different than the one from the crash file. How can I get the original dSYM to symbolicate crashes from production?
0
0
669
Aug ’23
How to implement a search bar above the keyboard like Safari on iPad
How can I insert a UISearchBar in the middle of the shortcuts bar displayed above the keyboard on iPad? You insert custom shortcuts in the shortcuts bar using 'someTextField.inputAssistantItem' with 'leadingBarButtonGroups' or 'trailingBarButtonGroups' properties, but it has no 'middleBarButtonGroups'. If I add the search bar as 'inputAccessoryView', like 'someTextField.inputAccessoryView = UISearchBar()' it is added above the shortcuts bar.
0
1
618
Aug ’23
iPadOS 15, cannot replace/destroy foreground scene, and activate an existing background scene.
I have a document based app, and if the user tries to open a document in the active/foreground scene, and that document is already open in another existing scene, I would like to activate that existing scene, and destroy the current foreground one. I do it like that: UIApplication.shared.requestSceneSessionActivation(existingSession, userActivity: activity, options: nil) UIApplication.shared.requestSceneSessionDestruction(foregroundSession, options: nil) When I run this code, the foreground scene is destroyed, but the activated one is not brought to foreground, it simply takes me to home screen. On iOS14, it kinda works, the existing one is brought to foreground and splits the screen with the current foreground one for a split second, then the current one is destroyed, and the existing scene now takes all the screen. The intermediate split state is not visually nice but it does it's job. How can I achieve the same behaviour on iOS15?
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
956
Sep ’21
Disable the focus system for a MacCatalyst app
I'm building a MacCatalyst app, where the Tab key is used for a special functionality within the app. For that, I inserted a UIKeyCommand in the main menu for "\t". When I press Tab, the default functionality takes over, and the focus moves to a button in the toolbar and stays there, which I don't want. As a result, the action of my key command is not called. I set tabKeyCommand.wantsPriorityOverSystemBehavior = true, but it makes no difference. The root view controller of my app is an UISplitViewController. I overloaded 'shouldUpdateFocus(in:)' and always return false hoping that this will disable moving the focus for the whole app, but it's not working. It looks like it's more difficult then needed. How can I instruct the system to not interfere with the Tab key?
1
0
1.1k
Feb ’22
Named pasteboard not working on MacCatalyst
Hi, I'm storing a string on a named UIPasteboard, and when reading it back, it comes as nil. It works fine on iOS, but on MacCatalyst it always returns nil. I store it like that: let p = UIPasteboard(name: UIPasteboard.Name(rawValue: "aaa"), create: true)! p.string = "some text" print("hasStrings: \(p.hasStrings)") // hasStrings: true and I read it like that: let p = UIPasteboard(name: UIPasteboard.Name(rawValue: "aaa"), create: false)! print("hasStrings: \(p.hasStrings)") // hasStrings: false I'm running the two pieces of code from two different methods of a UIViewController. Say I store the string in 'viewWillAppear', and read it back in 'viewDidAppear'.
1
0
993
Mar ’22
Incorrect scene is activated on opening handoff user activity on macCatalyst
I have a doc app consisting of two types of scenes, "Default Configuration" and "About". When an about scene is created, I set its activation condition to NO, so it does not get activated for any userActivity or URLContext: scene?.activationConditions.canActivateForTargetContentIdentifierPredicate = NSPredicate(value: false) Now, I open an about scene and some default configuration scenes. If the about scene is on top, then when opening a handoff user activity, this about scene gets activated instead of the default ones, or a new default scene being created. If the about scene is in background or it is not created, a correct default scene is activated and passed the activity. Opening documents from finder works fine in both cases, a default scene is activated and it gets URLContext objects. Is this the expected behaviour? I found a workaround but it feels like a workaround. I enable activation on the about scene: scene?.activationConditions.canActivateForTargetContentIdentifierPredicate = NSPredicate(value: false) Then in the about scene, I listen to scene(_:userActivity:), get the activity when it gets activated, pass it to UIApplication.shared.delegate, which in turn requests a new scene activation and passes the activity object to this new scene. In this case, a scene with the correct default configuration gets activated. I'm running the tests on macOS 12.4 if it matters.
1
0
824
Oct ’22
'Perform' is never called from iOS17 Widget
I have created a widget and added a button in its body like this: Button("Tap me: ", intent: TaskIntent()). If I compile the TaskIntent in both the app and the widget, when tapping the button, it open the app and that's all, 'perform' is not called at all. If I compile the TaskIntent only in the widget, when tapping the button, it does nothing, 'perform' is not called either. Is there any special sauce needed to run the 'perform' of the AppIntent attach to the button?
1
1
921
Aug ’23
TextKit2 vs TextKit1 memory usage
I'm working on an app displaying a few hundred custom labels. The custom label is modelled after UILabel. When I implement the custom label using TextKit, the app is using about 0.5 GB of memory. When I implement it using TextKit2, it takes about 1.2 GB. Did anyone notice such a big difference in memory usage between TextKit and TextKit2? For how long will TextKit be around before being deprecated?
1
0
748
Aug ’23
How to fix iOS 26 Beta / iOS 18 SDK compile conflicts?
A method in my app now requires the override keyword when compiling with Xcode 26 beta / iOS 26 SDK, but if I add it, the current official Xcode 16.4 (iOS 18 SDK) throws a compile error. It's about 'toggleSidebar(_:)' in UIViewController. The problem is: Apple expects our apps to be ready for iOS 26 launch this fall, so I need to be actively developing and testing in the Xcode 26 beta now. At the same time, I still need to submit updates to the App Store using the current official Xcode 16.4 until iOS 26 officially launches. I'm using a single .xcodeproj file and can't keep manually adding/removing -DIOS_SDK_26_OR_LATER in Build Settings multiple times a day. How to fix it and why isn't there a straightforward #if sdk(>=26.0) type of check for compile-time in Swift? It's really frustrating to manage this override conflict.
1
0
168
Jul ’25
Chaotic keyboard frame notification in windowed app in iOS 26
I have a simple task, to measure the height of the overlapping area occupied by the keyboard in the current view. In the attached images, I use it to position a UITextView (red) above the keyboard, as a test. The keyboard displays an inputAccessoryView (yellow) when editing a text view, but it’s also summoned by a UIFindInteraction, which shows a search bar above the keyboard. When measuring the keyboard, I need to account for either the accessory view or the search bar, basically, the total keyboard height including any extra views above it. I use the usual algorithm: the keyboard frame from UIResponder.keyboardWillShowNotification (documented as being in screen coordinates) is converted to my view’s coordinates and intersected with the view’s bounds to get the overlapping height. The first issue: in windowed mode, the keyboard frame reports a negative origin.x (e.g. -247), even though in screen coordinates it should start at 0. I display the raw frame in the navbar, as shown in the first screenshot. I then suspected the frame might be in window coordinates on iOS 26, but repositioning the window a few times, and switching between find interaction keyboard and text editing keyboard, sometimes yields a positive origin.x instead, as if the keyboard starts from the middle of the screen!? (see the second screenshot). And in some cases, the raw keyboard height is even 0, despite the keyboard clearly being visible and taking space (third screenshot). Interestingly, the reported frame for the search keyboard is always consistent and in screen coordinates, but the default keyboard frame just doesn’t make sense.
1
0
289
Sep ’25
Double border in UIBarButtonItem with Custom View on iOS 26, bug or feature?
I have several UIBarButtonItems in a navigation bar, and they get the default glass treatment in iOS26. All look ok excepting one, which is a UIBarButtonItem with a custom view, a plain UIButton. This one does not change the tint of the inner button's image to white/black like all the others, but it stays blue, like the regular tinted bar buttons pre iOS26. I then built the inner UIButton starting from glass configuration, UIButton.Configuration.glass(), and it looks fine, see the 2nd pic. But if I send the app to background and bring it back, the inner button gets a border, such that the bar button now has 2 borders, and look out of place compared to the other bar buttons, see 3rd pic. Is this a bug or a feature? How can I make custom-view bar buttons look like regular ones, without double border.
2
0
228
Jul ’25