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'.