I have a project using SwiftUI that requires CloudKit sharing, but I\'m unable to get the UICloudSharingController to play nice in a SwiftUI environment.
UICloudSharingController
Maybe just use rootViewController.
let window = UIApplication.shared.windows.filter { type(of: $0) == UIWindow.self }.first window?.rootViewController?.present(sharingController, animated: true)