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
538 questions
40
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
  • 548
  • 1
  • 5
  • 16
32
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
  • 1,039
  • 14
  • 32
29
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
  • 3,989
  • 6
  • 23
  • 30
28
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
  • 7,035
  • 6
  • 41
  • 62
23
votes
0 answers

SwiftUI and Catalyst: [API] cannot add handler to 3 from 3 - dropping

After converting my SwiftUI project to Catalyst I get this strange error message on the console: [API] cannot add handler to 3 from 3 - dropping This happens when a view is scrolled, even in release mode, and quite a lot, probably every frame. It…
heiko
  • 1,268
  • 1
  • 12
  • 20
17
votes
3 answers

Mac Catalyst version

I wonder what does macCatalyst version means and how it is mapped to macOS version? For example, API which is available from macCatalyst 14.0 means it requires macOS 11.0 (Big Sur), macCatalyst 13.0 means macOS 10.15.0, but what does it mean when…
KY1VSTAR
  • 395
  • 4
  • 16
17
votes
6 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
  • 251
  • 1
  • 6
15
votes
2 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
  • 339
  • 7
  • 16
15
votes
1 answer

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,898
  • 1
  • 15
  • 24
14
votes
2 answers

How can I conditionally compile code for Catalyst?

I'm working on porting an iOS application to Catalyst. The Catalyst (Mac) version will have its own target. Is there an official way to conditionally compile code just for Catalyst? Otherwise, I can add a target-specific define, but it would be…
Bill
  • 44,502
  • 24
  • 122
  • 213
14
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,501
  • 3
  • 18
  • 27
13
votes
2 answers

AVAudioEngine reconcile/sync input/output timestamps on macOS/iOS

I'm attempting to sync recorded audio (from an AVAudioEngine inputNode) to an audio file that was playing during the recording process. The result should be like multitrack recording where each subsequent new track is synced with the previous…
jnpdx
  • 45,847
  • 6
  • 64
  • 94
13
votes
1 answer

Silent push notification (background) not received on macOS Catalina (Mac Catalyst app)

I'm currently implementing push notifications from our backend server to our app (macOS Catalina & iOS - same code base), using Apple Push Notifications & the token based way of authentication (generating JWT from keyId, teamId, ... & signing it…
13
votes
4 answers

iOS Catalyst Cocoapod framework error - signing requires a development team

I'm updating my iOS app to also work on Mac. After selecting the Mac checkbox, I am getting the error in the screenshot below when trying to build for Mac. It's telling me I need to select a development team for this Cocoapod framework. However, I…
chickenparm
  • 1,570
  • 1
  • 16
  • 36
12
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
  • 1,544
  • 1
  • 15
  • 34
1
2 3
35 36