I get this error in Xcode 13.4. I set the deployment target to macOS 12.3 (latest available) but I still get this error.
Which version of macOS should I set as deployment target, to get rid of this error. I dont want to use 'if #available' because I have no alternative code path.
Which macOS version corresponds to Mac Catalyst 14.0?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
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'.
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?
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?