Questions tagged [uikitformac]

UIKit applications compiled for running on macOS (Project Catalyst)

Project Catalyst (formerly codenamed 'Marzipan') allows recompiling UIKit applications (previously exclusive to iOS) for running on macOS.

32 questions
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 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
7 answers

Blue Highlighting / Focus Ring on Catalyst App

I'm currently in the process of porting my iOS app to macOS using Project Catalyst. All of my text fields, text views and table views have a blue outline when active. I've noticed it in Apple Catalyst apps (e.g. News) in recent betas so I'm hoping…
adamfootdev
  • 1,149
  • 10
  • 15
10
votes
3 answers

Xcode 11 - Disable resize mode in catalyst swift

We are converting our Swift based iOS app to Mac compatible using Catalyst in Xcode 11. We are facing an issue in UI when user resize app window. So can we disable resize mode and give fix frame for app window?
Hardik Thakkar
  • 15,269
  • 2
  • 94
  • 81
8
votes
3 answers

How to get a search bar into an NSToolbar in a Catalyst app?

I've seen some Catalyst apps add a search bar to the NSToolbar and was wondering how I could do the same. Would I have to import AppKit/Cocoa to get an NSSearchField and the actual NSToolbar? Or is there some way with UISearchBars that I am just not…
8
votes
2 answers

UIDatePicker Not working In Mac Catalyst (Xcode 11 Beta 5)

We are converting our iOS app to Mac Catalyst compatible using Swift in Xcode 11 beta 5. We have facing issue that default DatePicker not shown in window. I am trying this solution for mac and it will add date picker in view but I want another…
Hardik Thakkar
  • 15,269
  • 2
  • 94
  • 81
8
votes
6 answers

Xcode 11 Beta 3, build error "Unknown attribute 'State'", "Use of undeclared type 'View'" etc

I build an app with the 2nd beta of Xcode 11, using SwiftUI, and everything worked completely fine, but now, with the 3rd beta, the app isn't even build. I get errors like "Use of undeclared type 'View'", "Unknown attribute 'State'" etc. What can I…
Shahar Melamed
  • 1,534
  • 5
  • 15
  • 23
6
votes
1 answer

building for UIKitForMac, but linking in .tbd built for macOS

I'm trying to compile my iOS app to work on macOS and after checking the Mac checkbox, I'm getting this error on compile: d: building for UIKitForMac, but linking in .tbd built for macOS, file…
Jan
  • 2,462
  • 3
  • 31
  • 56
6
votes
2 answers

Xcode 11 not recognizing static library's architecture: MacCatalyst (aka UIKitForMac)

After getting excited about 2019's WWDC announcements, I tried compiling my existing iOS app against the MacOS using Xcode 11.0 beta. Unfortunately, it didn't go as expected. Xcode says my static library is built for < unknown >…
marcelosalloum
  • 3,481
  • 4
  • 39
  • 63
5
votes
3 answers

Does Mac Catalyst supports UIActivityViewController?

I am trying to port over our app to Mac. But it seems that what works for iOS/iPadOS does not show up on Mac app. Nothing popups at all. let activityController = UIActivityViewController(activityItems:items,…
Lim Thye Chean
  • 8,704
  • 9
  • 49
  • 88
5
votes
5 answers

Can I disable the window resizing feature on my Mac Catalyst iOS app

I'm migrating my iOS app to support MacCatalyst but I'd like to prevent the window from being resized by the user. Do you have any tips for that?
marcelosalloum
  • 3,481
  • 4
  • 39
  • 63
4
votes
1 answer

How to capture right click in a MacCatalyst app?

How can I present a context menu or even better a iOS Popover controller when right clicking in a MacCatalyst app? Right now I have it set up for long presses, not that doesn't feel right on a desktop app.
Johan Nordberg
  • 3,621
  • 4
  • 33
  • 58
4
votes
1 answer

How to compile a 3rd party library to be used with UIKit For Mac/Catalyst?

If you try to use a 3rd party library (compiled using make or cmake) in your iOS 13 project and turn on the "UIKit For Mac" option, Xcode will be unhappy about the library. It will complain that the provided library is compiled for the wrong…
Anton
  • 1,655
  • 15
  • 16
3
votes
1 answer

Detect application minimize event for UIKIt for Mac?

When i minimize the application applicationDidEnterInBackground not called for Mac Catalyst. After some search i found that Background delegate methods not called for Mac Catalyst but foreground method of Scene delegate called. is there any way to…
chirag
  • 1,090
  • 9
  • 13
3
votes
1 answer

Differentiate pod based on MacOS and iOS for macCatalyst (Xcode 11 Beta 5)

We are converting our iOS app to macCatalyst compatible using catalyst swift in xcode 11 beta 5. I am facing issue in some pod files which are not yet supported for macCatalyst. so, any one found solution in which we can differentiate pod based on…
Hardik Thakkar
  • 15,269
  • 2
  • 94
  • 81
1
2 3