Questions tagged [mac-catalyst]

An environment and build target for compiling iOS apps to macOS.

Mac Catalyst (previously referred to as and, unofficially, Marzipan) is an environment and build target used to compile an iPadOS app to a macOS app. This is different from running iOS apps on macs with the M1 chip (Apple Silicon macs), which is a more recent development and the iOS apps can run directly on M1 macs without porting.

As of November 2019, it can only port iPad apps. It automates the addition of desktop and windowing features needed by the desktop version of macOS. For example, tab bars on the iPad are automatically converted to toolbar segments on the Mac.

Catalyst is officially supported by Xcode 11 and macOS 10.15 and higher. With Xcode 12, it can port iPhone apps to MacOS as well.

Apple documentation is available here.


Getting Started with Catalyst

Theoretically things should be as simple as checking the "Mac" target in your iPad-compatible app target. However, some extra work usually needs to be done in order to successfully port an app.

One good way to start differentiating your iPad code-base is through the use of a Catalyst compile-time check:

#if targetEnvironment(macCatalyst)
  // Code for catalyst
#endif
380 questions
37
votes
3 answers

How to fix "Read-Write-Data Sandbox: error when using Mac Catalyst

I recently updated to macOS Catalina so I could update some of my apps with Mac support using Catalyst. Whenever I run the app and it tries to access the CloudKit data (I use CloudKit to sync Core Data, Data if an iCloud Account is available), it…
117MasterChief96
  • 498
  • 4
  • 15
27
votes
2 answers

Catalyst 'SwiftUI.AccessibilityNode' is not a known serializable element

I created a fresh iOS Single Page App (including SwiftUI) with Xcode 11.1 and enabled Mac Catalyst. After running the fresh Project on my Mac (macOS 10.15 of course) I get the following errors after tapping once on the window. 2019-10-18…
Lukas Kirner
  • 2,800
  • 4
  • 17
  • 29
24
votes
6 answers

Exclude pod when porting to mac with catalyst

Porting apps to mac is finally possible thanks to Catalyst, problem is, numerous pods don't support AppKit. Most common one would be Crashlytics / Firebase. In [...]/Pods/Crashlytics/iOS/Crashlytics.framework/Crashlytics(CLSInternalReport.o),…
Tancrede Chazallet
  • 6,547
  • 3
  • 35
  • 59
22
votes
8 answers

Mac-catalyst - minimum window size for Mac catalyst app

Mac catalyst allows to resize window, is there any way to provide minimum window size for Mac catalyst app?
Hiren Gujarati
  • 929
  • 10
  • 32
16
votes
3 answers

How do I setup the "Help" menu option for an iPad app being ported to the Mac using Mac Catalyst?

By default, Mac Catalyst creates a menu titled "Help" that is supposed to include help for the application. However, I found no documentation on how to implement Help. For standard Mac apps, you can use a Help book. However, there is no mention…
Ken Roe
  • 241
  • 1
  • 6
15
votes
2 answers

Detect Single Modifier Key Change in UIKit for Mac (Catalyst)

I am porting an iOS app on MacOS using UIKit for Mac also known as iPad Apps for Mac or Project Catalyst. The app uses keyCommands from UIKit to detect a single modifier key press: UIKeyCommand(input: "", modifierFlags: .shift, action:…
Dmitriy
  • 1,738
  • 1
  • 12
  • 23
12
votes
1 answer

EXC_BAD_INSTRUCTION from com.apple.xpc.activity.com.apple.cloudkit.scheduler.com.apple.coredata.cloudkit.activity.export

I have an app that runs fine on iOS, but when running with catalyst, it gives me this crash intermittently if I swipe to another virtual Desktop on macOS, and then back, for about 10 times. It mostly happens on a UICollectionViewController This is…
Phuah Yee Keat
  • 1,560
  • 1
  • 14
  • 16
11
votes
6 answers

DatePicker on Mac not saving date until return key is pressed

I'm adapting my iPad app to Mac with Mac Catalyst and am having a problem with the datePicker (it has a datePickerMode of time). On iPad the datePicker is a wheel and whenever the user scrolls on the date picker the dateChanged action is fired. But…
fphelp
  • 616
  • 5
  • 18
11
votes
0 answers

UIDocumentPickerViewController in SwiftUI on mac (macCatalyst)

So I've been meddling with "moving" a small SwiftUI iPad app to the Mac, and I've hit a bit of a speed bump with UIDocumentPickerViewController. I have wrapped the UIDocumentPickerViewController in a UIViewControllerRepresentable like so : struct…
ALex Popa
  • 289
  • 7
  • 15
11
votes
2 answers

How to open file dialog with SwiftUI on platform "UIKit for Mac"?

NSOpenPanel is not available on platform "UIKit for Mac": https://developer.apple.com/documentation/appkit/nsopenpanel If Apple doesn't provide a built-in way, I guess someone will create a library based on SwiftUI and FileManager that shows the…
Ngoc Dao
  • 1,433
  • 3
  • 17
  • 25
10
votes
0 answers

VPN not working on Mac Catalyst SecKeychainItemCopyContent returned The contents of this item cannot be retrieved

I'm trying to run my VPN iOS application on Mac OS platform with Mac Catalyst. My code is work on iOS applications but somehow it's not working on Mac OS. VPN is not connect. But seems available in Network from System Preferences on Mac…
Bartu Akman
  • 199
  • 9
9
votes
2 answers

Open a new window in Mac Catalyst

I am porting an iPad app using Mac Catalyst. I am trying to open a View Controller in a new window. If I were using strictly AppKit I could do something as described in this post. However, since I am using UIKit, there is no showWindow() method…
Arturo Reyes
  • 129
  • 1
  • 4
9
votes
1 answer

Issue with Mac Catalyst - linking in object file built for iOS Simulator

I am trying to build my iOS/iPadOS project on my mac using the new Mac Catalyst. When I build it on the simulator for iPhone everything is fine but when I build it on my Mac, I get this error. in…
Nevin Jethmalani
  • 2,248
  • 3
  • 19
  • 46
9
votes
4 answers

Is it possible to use full screen in Mac Catalyst?

Porting a game to macOS Catalyst, but window is quite small. Is it possible to start in full screen instead?
Lim Thye Chean
  • 6,652
  • 9
  • 40
  • 77
8
votes
2 answers

Clicking problems in SwiftUI Catalyst with Big Sur

I just updated to Big Sur and now I'm experiencing serious troubles in my Catalyst app. I created a new project with similiar code to test it. The behaviour is a little bit different, but in both cases there is one point, where clicking stops…
Lupurus
  • 2,819
  • 2
  • 24
  • 48
1
2 3
25 26