FTPopOverMenu_Swift icon indicating copy to clipboard operation
FTPopOverMenu_Swift copied to clipboard

UIApplication.shared is unavailable in Catalyst (Xcode 13, iOS 15)

Open pnome opened this issue 2 years ago • 0 comments

I just installed Xcode 13 and my app won't build due to use of UIApplication.shared.keyWindow?

The error is: 'shared' is unavailable in application extensions for Mac Catalyst: Use view controller based solutions where appropriate instead.

My app runs on iOS and mac (via Catalyst)

FTPopOverMenu is installed via SPM and is actually unused in the Catalyst version. However, because Xcode still tries to build it, I get the error and the build fails.

I'm going to try installing via CocoaPods and then not install that pod for the Catalyst build. However, I thought I'd point this out in case it becomes an issue for someone else. It would be great if I could use FTPopOverMenu with Catalyst.

Thanks, Joe

pnome avatar Aug 05 '21 21:08 pnome