devxoul / Umbrella

☂️ Analytics abstraction layer for Swift
MIT License
615 stars 49 forks source link

Cannot specialize a non-generic definition #15

Open vitorventurin opened 6 years ago

vitorventurin commented 6 years ago

AppDelegate:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        let analytics = Analytics<EventTracking>() --> error: Cannot specialize a non-generic definition
        analytics.register(provider: FirebaseProvider())
        return true
}
devxoul commented 6 years ago

How did you define EventTracking?

AnatoliK17 commented 4 years ago

I had exactly the same issue. There is an Analytics class in firebase analytics and by default, it tries to initialize it.

You need to use the namespace Umbrella.Analytics<EventTracking>()