Monday, October 5, 2026
HomeiOS Developmentshare - iPad crash when presenting exercise controller with iOS 16 and...

share – iPad crash when presenting exercise controller with iOS 16 and swiftUI

[ad_1]

I get the next crash when presenting a share sheet on the iPad. Works fantastic on an iPhone:

Thread 1: “UIPopoverPresentationController (<UIPopoverPresentationController: 0x13f418e50>) ought to have a non-nil sourceView or barButtonItem set earlier than the presentation happens.”

right here is the code.


let av = UIActivityViewController(activityItems: [path], applicationActivities: nil)

    let scenes = UIApplication.shared.connectedScenes
    let windowScene = scenes.first as? UIWindowScene
    windowScene?.keyWindow?.rootViewController?.current(av, animated: true, completion: nil)

Thanks for the assistance.
Blessings,
–Mark

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments