maccatalyst

UIDocumentPickerViewController in SwiftUI on mac (macCatalyst)

ぃ、小莉子 提交于 2019-12-11 16:24:59
问题 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 DocumentPickerView: UIViewControllerRepresentable { func makeUIViewController(context: Context) -> UIDocumentPickerViewController { let documentPicker = UIDocumentPickerViewController(documentTypes: [(kUTTypeImage as String)], in: .import) return

Xcode 11 - Disable resize mode in catalyst swift

女生的网名这么多〃 提交于 2019-12-07 01:15:15
问题 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? 回答1: Beta 5 added a sizeRestrictions property to UIWindowScene. If you set sizeRestrictions.maximumSize and sizeRestrictions.minimumSize to the same value, the window will not be resizable: windowScene.sizeRestrictions?.minimumSize = CGSize(width: 640, height: 480) windowScene

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

隐身守侯 提交于 2019-12-05 09:25:38
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 > architecture: Building for UIKit for Mac, but the linked library 'libssl.a' was built for < unknown >. You may need to restrict the platforms for which this library should be linked in the target editor. But when I check my static libs, I can see they do contain the desired architecture x86_64 : I believe this issue may be related to an Xcode Beta bug. Does anyone have