user2884707bond
user2884707bond

Reputation: 569

How does it not know what AppDelegate is?

I am trying to create a swift based framework for iOS. I have one swift file, which I want to embed in my Framework. When I drag and drop into framework folder I get

"Use of undeclared type 'AppDelegate'"

error? Here is the picture

This is how my directory listed out

Upvotes: 3

Views: 3096

Answers (1)

brimstone
brimstone

Reputation: 3400

The Framework doesn't have an AppDelegate. Instead, use UIApplicationDelegate or pass the AppDelegate to your class.

Swift 3.0

var appDelegate = UIApplication.shared.delegate

Upvotes: 4

Related Questions