Hi,
I want to implement the func windowScene(_ windowScene: UIWindowScene, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShare.Metadata)
method in my SwiftUI lifecycle app. I already used@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
and added the AppDelegate:
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShare.Metadata) {
print("CK Share accepted")
}
}
Without any success. No "CK Share accepted" in the log.
I also tried it with the Scene Delegate and the
swift
func windowScene(_ windowScene: UIWindowScene, userDidAcceptCloudKitShareWith cloudKitShareMetadata: CKShare.Metadata)
again no luck.
I've tried literally everything. The link is working because if I open the share on a sample that uses the UIKit Lifecycle it works correctly.
Did I miss anything, or is this a bug with the SwiftUI Lifecycle and UIApplicationDelegateAdaptor?
Take care,
David