0

I am trying to add an AppDelegate to a standalone watchOS SwiftUI app (no companion iOS app) as indicated in here, but I can't seem to resolve the issue Cannot find type 'UIApplicationDelegate' in scope

Explicitly adding an import UIKit does not help.

Any clues?

Paolo Marini
  • 323
  • 1
  • 3
  • 13

1 Answers1

1

https://developer.apple.com/documentation/uikit/uiapplicationdelegate

UIApplicationDelegate seems to only work with Catalyst, iOS and TvOS. Per WatchKit documentation it using the WKExtensionDelegate that has all the same methods.

https://developer.apple.com/documentation/watchkit/working_with_the_watchos_app_life_cycle

https://developer.apple.com/documentation/watchkit/wkextensiondelegate

lorem ipsum
  • 21,175
  • 5
  • 24
  • 48