它怎么不知道 AppDelegate 是什么?

How does it not know what AppDelegate is?

我正在尝试为 iOS 创建一个基于 swift 的框架。我有一个 swift 文件,我想将其嵌入到我的框架中。当我拖放到框架文件夹时,我得到

"Use of undeclared type 'AppDelegate'"

错误?

框架没有 AppDelegate。相反,使用 UIApplicationDelegate 或将 AppDelegate 传递给您的 class.

Swift 3.0

var appDelegate = UIApplication.shared.delegate