How to init Fabric properly in Swift

2019-03-03 02:58发布

问题:

There are two different initialisation method shown in the documents:

A) From here

Fabric.with([Crashlytics.self(), Answers.self()])

B) From here

Fabric.with([Crashlytics.self, Answers.self])

C) This also doesn't make the compiler to complain

Fabric.with([Crashlytics.self, Answers.self()])

D) From nowhere

Fabric.with([Crashlytics(), Answers()])

As I know, A and D are identical. But B gets a Type array. Which one is the correct one? If they don't differ, how does it work?