Mac Catalyst

RSS for tag

Start building a native Mac app from your current iPad app using Mac Catalyst.

Posts under Mac Catalyst tag

88 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Xcode 26: Cannot generate provisioning profile for Mac Catalyst app in macOS 26 VM
Filed FB17873536 for this, posting here for reach. I cannot create a provisioning profile to run my Mac Catalyst app on a macOS 26 VM for my project with automatically manage signing (Xcode Managed Profile) enabled. I keep getting an error that “There is a problem with the request entity A device with number '' already exists on this team.” Disabling the device in Certificates, Identifiers, & Profiles does not work; I get the prompt to register the device on the next build but it results in the same error. “Download Manual Profiles” does not work, either. Additionally, in developer beta 2 (macOS build 25A5295e, Xcode build 17A5241o), I now get a second error message that Provisioning profile "Mac Catalyst Team Provisioning Profile: doesn't include the currently selected device "Virtual Machine" (identifier ). Clearing out the existing files in ~/Library/Developer/Xcode/UserData/Provisioning Profiles/ didn’t work either. Steps to reproduce: Create and set up a macOS 26 VM in the latest version of UTM for Mac Install Xcode 26 in the VM and sign into your Apple ID in Xcode preferences Open a Mac Catalyst app’s Xcode project and attempt to build it An alert comes up that the device is not registered in the developer account. Click the Register button to register it The process fails with the error mentioned above and it’s impossible to build for Mac Catalyst after this point. (Sign to Run Locally is not an option for me because I use entitlements that remove that option) I would appreciate any advice on how to get this working. Hopefully I will not have to create an entirely new macOS 26 VM. Thank you!
1
0
227
1w
Regression in UITabBarController on Catalyst when building under Xcode 16
I am running into an issue with UITabBarController in a Catalyst app when building under Xcode 16 and running on macOS 15. If a UITabBarController is used, the tabs are presented in an unwanted title/toolbar at the top of the window. If you have an app where your views run to the top of the window, this can obscure the content and controls that are near the top. I created a sample application that is attached to the Feedback record (FB14293963). When building under Xcode 15, this is what the app looks like: Under Xcode 16, it looks like this: Beyond this simple example, using UITabBarController in a presented view controller can result in the tabs not showing at all. Also, If you switch the view in the main window to something that isn't a UITabBarController, the tabs still remain at the top. This seems to stem from the tab bar/sidebar changes for iPadOS 18. While this approach can work for simpler apps, it may not work well at all for more complex apps and there really needs to be a way to opt out of this behavior so apps where it is not suited for can still take advantage of features in iPadOS/Catalyst 18. Has anyone discovered a workaround or way to disable the new tab bar behavior with having to write their own version of UITabBarController?
2
0
1.2k
1w
Can I tell when my iOS Widget is running on MacOS (when Use IPhone Widgets is on)
I have an iOS Widget that also can load on the Mac when the Use iPhone Widgets setting is turned on on the Mac in Desktop & Dock. I want to use a different url scheme to open video clips from the widget if it is being clicked on iOS or the Mac. I tried using ProcessInfo.processInfo.isiOSAppOnMac but it always thinks it is on iOS. I also tried looking for the user document path to see if it was /var/mobile/ or /Users/. but it always thinks it is /var/mobile. I assume this is as it is not really a catalyst app but a WidgetKit extension from the phone. Is there anyway I can figure out when the widget is running on the mac? Thanks!
6
0
542
3w
Issue with Copy Functionality in WKWebView Using Mac Catalyst
Hello, I am developing a Mac application via Mac Catalyst and encountering an issue with WKWebView. Specifically, I'm loading a webpage (e.g., https://translate.google.com) in WKWebView, but when I press the copy button on the page, the content doesn't actually copy to the clipboard. I've attempted modifying the UserAgent without any success. Here is the relevant part of my code: override func viewDidLoad() { super.viewDidLoad() let config = WKWebViewConfiguration() config.preferences = WKPreferences() config.defaultWebpagePreferences.preferredContentMode = .desktop let webView = WKWebView(frame: .zero, configuration: config) webView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(webView) webView.scrollView.showsVerticalScrollIndicator = false webView.backgroundColor = UIColor.white webView.scrollView.backgroundColor = UIColor.white webView.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true webView.topAnchor.constraint(equalTo: view.topAnchor).isActive = true webView.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true webView.bottomAnchor.constraint(equalTo: view.bottomAnchor).isActive = true if let url = URL(string: "https://translate.google.com") { let req = URLRequest(url: url) webView.load(req) } }
5
0
862
4w
Some sharing extensions disabled when running iOS app with Mac Catalyst
When I run my iOS app on a Mac using Mac Catalyst, several sharing options that show up on an iOS device in a share sheet are absent on the Mac. Clicking on Edit Extensions, I see Mail, Message and AirDrop, their switches are on and disabled. All three items show up when I share from Safari or Notes. How can I make Mail, Message and AirDrop available? For example, when sharing data, no share extensions are shown. For text, only Simulator, Shortcuts and Copy are shown.
0
0
42
Jun ’25
Supporting Dark and Tinted versions of App Icons on macOS
When exporting an icon using Icon Composer Beta for macOS 26, a light, dark and tinted versions for macOS are created, but I was not able to find how to use them on the Xcode Project. I also tried finding something pointing to that on documentation, but I was not able to find anything. I see that system apps have light, dark and tinted versions on the first beta of macOS 26, which leads me to believe it would be possible for third-party apps to do that same.
1
0
170
Jun ’25
Pencil "Touches" on Catalyst are interrupted with modifier
I'm working on a catalyst video editor and I'm using my wacom graphic tablet to work. The wacom input gets translated into a pencil touch. Whenever I hold down a modifier (shift, cmd etc) the touch gets ended and also ends all gestures. The mouse (indirectPointer touch) doesn't exhibit this kind of behavior. Is this expected behavior? If so is there a way to opt out? Any way to prevent this? This basically makes the typical transform gestures impossible to do when using the graphic tablet.
2
0
35
Jun ’25
macOS Sequoia/Xcode 16.2 - Catalyst App Missing Tab Bar
My Objective-C Catalyst app when built with Xcode 16.x/iOS 18 does not have a visible Tab Bar when run on Sequoia. App starts up in first tab, but there is no way to access other tabs. The same app when run on macOS Sonoma (or macOS Catalina) has a normal Tab Bar. The app has an initial View UITabBarController with 3 tabs. The main tab is a UiSplitViewController. Minimum macOS deployment 10.5. If app is built on Sonoma with Xcode 15.x/iOS 17 the Tab Bar is normal on macOS Sonoma, Sequoia, and Catalina. I've tried without success: if (@available(macCatalyst 18.0, *)) { self.tabBarController.tabBarHidden = false; } else { // Fallback on earlier versions } I wonder if this console log message has anything to do with the problem: CLIENT OF UIKIT REQUIRES UPDATE: This process does not adopt UIScene lifecycle. This will become an assert in a future version.
2
0
103
Jun ’25
Mac Catalyst App can't launch, reason: Library not loaded: /usr/lib/libc++.1.dylib
My app cannot be launched on some users' MacOS, it says "Library not loaded: /usr/lib/libc++.1.dylib". "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","******":"SIGABRT"}, "termination" : {"code":1,"flags":518,"namespace":"DYLD","indicator":"Library missing","details":["(terminated at launch; ignore backtrace)"],"reasons":["Library not loaded: \/usr\/lib\/libc++.1.dylib","Referenced from: <E4CB6764-8CB9-32E9-881B-252E2F3E0C4B> \/Applications\/myapp.app\/Contents\/MacOS\/myapp","Reason: tried: '\/System\/iOSSupport\/usr\/lib\/libc++.1.dylib' (no such file), '\/System\/Volumes\/Preboot\/Cryptexes\/OS\/System\/iOSSupport\/usr\/lib\/libc++.1.dylib' (no such file), '\/System\/iOSSupport\/usr\/lib\/libc++.1.dylib' (no such file, no dyld cache), '\/usr\/lib\/libc++.1.dylib' (no such file), '\/System\/Volumes\/Preboot\/Cryptexes\/OS\/usr\/lib\/libc++.1.dylib' (no such file), '\/usr\/lib\/libc++.1.dylib' (no such file, no dyld cache)"]}, User 1's environment: 2020 MacBook Air, M1, system version 15.4. User 2's environment: 2020 MacBook Pro, M1, system version: 15.5. I (and the people around me) cannot reproduce this problem. It can be reproduced on User 2's computer, but the performance is strange, sometimes good and sometimes bad. The app can be launched normally during the day, and it can also be launched normally after restarting the computer. But it cannot be launched from 21:00 to 22:00 at night, and the problem still exists even if the computer is restarted. After some searching, I suspect that there is a bug in the dynamic linker cache mechanism of MacOS, but we cannot confirm it. According to the official documentation: https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286) I also tried to manually copy libc++.1.dylib to the above path, but these paths are read-only, and files cannot be copied into them even if SIP is turned off. Is there any other way to fix or avoid this problem? Thank you. Other similar questions: https://developer.apple.com/forums/thread/756370 https://developer.apple.com/forums/thread/764824
14
1
166
May ’25
brightnessDidChangeNotification does not seem to work on Mac Catalyst 15.5
Hi, I have been trying to subscribe to brightnessDidChangeNotification (https://developer.apple.com/documentation/uikit/uiscreen/brightnessdidchangenotification) with my code: var publisher = NotificationCenter.default.publisher(for: UIScreen.brightnessDidChangeNotification) .map { _ -> Double in return UIScreen.main.brightness } But it does seem that no such event is fired on Mac Catalyst 15.5. https://developer.apple.com/documentation/uikit/uiscreen/brightnessdidchangenotification claims that API is available since 13.1. Could anybody tell me if I'm doing something wrong or if the API is not supported at the moment? Thank you!
0
1
55
May ’25
Mac Catalyst SplitViewController, UITitlebar bugs?
Bringing my iPad app to Mac Catalyst as iPad idiom. Primary interface is a UISplitViewController. Two things I think are bugs unless someone replies with a fix. SplitViewController is setup in two column with left column as sidebar: split.setViewController(primary, for: .primary) split.setViewController(secondary, for: .secondary) split.preferredDisplayMode = .oneBesideSecondary split.preferredSplitBehavior = .tile split.presentsWithGesture = true #if targetEnvironment(macCatalyst) split.primaryBackgroundStyle = .sidebar split.displayModeButtonVisibility = .never #endif The displayMode button aligns vertically with the navigation bar and below the 3 window control buttons (close, minimize, full screen), whereas on other macOS apps using SplitViewController such as Apple Notes app, the displayMode button aligns vertically and just to the right of the the 3 window control buttons (close, minimize, full screen). I downloaded the Apple Example app called Menus that is supposed to be a prime example of a Mac Catalyst app, and I see author must have faced the same bug and instead created their own displayMode button and placed it on the UITitlebar's toolBar. In my secondary ViewController which is a subclass of a UITableViewController, tapping a row, calls show and in a SplitViewController, that pushes another detailVC onto the Nav stack as expected. The UIWindowScene's UITitlebar which appears over the top of the secondary VC looks correct. This detailVC is a subclass of a UITableViewController. Finally, tapping a row in the table of the detailVC calls show but this time, the ViewController is actually a UIHostingViewController wrapping a SwiftUI View. At this point the UIWindowScene's UITitlebar changes appearance and takes on the same lightened color similar to the sidebar (primary) appearance. With UITitlebarTitleVisibility set to hidden and if I set the titlebar.toolbar to nil, (which removes the UITitlebar, there is no appearance issue. Running on iPad, with no UITitlebar, there is no odd lightening experienced when the UIHostingController is shown. I think this has something to do with the UIHostingController within Mac Catalyst.
1
0
49
May ’25
Failed to launch Photo Editing Extension from Mac Catalyst app
I have an iOS app that includes a Photo Editing Extension and is optimized for Mac Catalyst so you can edit photos in the Photos app on your Mac. This has worked really well but now I am encountering an error alert trying to open the photo editing extension: RBSLaunchRequest error trying to launch plugin com.company.TestEditor. TestPhotoEditor (B7A616A7-2 5A8-4E02-8B32-5CAB37C8B4B2): ErrorDomain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7f08fafd0 {ErrorDomain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}} Create a new iOS app project in Xcode Create a new target and choose iOS > Photo Editing Extension For both targets in the project, add Mac Catalyst as a supported destination Run the app on My Mac (Mac Catalyst) Open the Photos app, double click a photo, click Edit, click the more plugins button, and click TestPhotoEditor in the list macOS 15.4.1 + Xcode 16.3
1
0
112
May ’25
How to get UIFont to respect preferredContentSizeCategory in a Mac Catalyst app?
I have an iOS app that relies on dynamic text size such that all fonts in the app respect the user's setting of Text Size in the iOS Settings app. This app also runs on macOS via Mac Catalyst. But until macOS 14 Sonoma, there was no Text Size setting in the macOS Settings app. But even as of Sonoma, the Text Size setting isn't usable by 3rd party apps. And Sequoia doesn't seem to change that. As a work around, my Mac Catalyst app provides its own Text Size setting. I was able to make it work by providing my own UIApplication subclass and overriding preferredContentSizeCategory. Under macOS 12 to macOS 14, this workaround works just fine and all fonts in the app created with code such as UIFont.preferredFont(forTextStyle:) gives appropriately sized fonts based on the overridden content size category. However, this workaround stopped working with macOS 15 Sequoia. I've also tried code such as: self.window.traitOverrides.preferredContentSizeCategory = myCustomSizeCategoryValue and self.window.maximumContentSizeCategory = myCustomSizeCategoryValue self.window.minimumContentSizeCategory = myCustomSizeCategoryValue in the scene delegate but that made no difference. Is there any way to get code such as UIFont.preferredFont(forTextStyle:) to return an appropriately sized font based on some app provided content size category in a Mac Catalyst app running under macOS 15? It sure would be nice if Mac Catalyst apps automatically responded to the macOS Text Size setting under Settings -> Accessibility -> Display -> Text Size just like a native iOS app.
3
1
627
Apr ’25
UITextField with isSecureTextEntry in Catalyst display an empty box
Hi, In a Mac Catalyst app, I need to allow the user insert a passcode using a UITextField. The field is used to insert a one time passcode and I want to keep the content hidden. For this reason I set the isSecureTextEntry property to true. passcodeTextField.isSecureTextEntry = true By doing this, a button to allow the user to pick a password from the keychain is displayed: This option in my case should not appear because the password is a one time password that change every time. For that reason I set the textContentType to oneTimeCode. passcodeTextField.textContentType = .oneTimeCode This actually removes the password button, but introduce something weird. If the user type something and then delete everything, a big empty box appear under the field: I have no idea what this box is and why it appears. Does anyone know why it appears and how I can remove it? Thank you
1
1
807
Apr ’25
Mac Catalyst SwiftUI – . focused() not working
Hello, given this following simple SwiftUI setup: struct ContentView: View { var body: some View { CustomFocusView() } } struct CustomFocusView: View { @FocusState private var isFocused: Bool var body: some View { color .frame(width: 128, height: 128) .focusable(true) .focused($isFocused) .onTapGesture { isFocused.toggle() } .onKeyPress("a") { print("A pressed") return .handled } } var color: Color { isFocused ? .blue : .red } } If I run this via Mac – Designed for iPad, the CustomFocusView toggles focus as expected and cycles through red and blue. Now if I run this same exact code via Mac Catalyst absolutely nothing happens and so far I wasn't able to ever get this view to accept focused state. Is this expected? I would appreciate if anyone could hint me on how to get this working. Thank and best regards!
5
0
500
Apr ’25
Add MacOs Finder compatible Quicklook Extension for custom file types to Mac Catalyst App
I have an iOS app which has an embedded Quicklook Extension that works perfectly - in the Files app on iPad/iPhone I can QuickLook view and edit custom file types without problems. However, when I run the app on a Silicon Mac using Mac Catalyst (or (Made For iPad)) while the Finder does recognise the custom file types (allowing "Open in…" or double-clicking to open) it does not show the Quick Look extension. How do I add Finder QuickLook extension functionality to a Mac Catalyst app? Thanks
2
0
55
Apr ’25