0

I posted a post which was named "Initialize Fabric in iOS with cocoa pods", regarding initialization with crashlytics. It basically asked how to initialzie crashlytics with an API key, without having to go through info plist. That was solved by doing this:

Crashlytics.start(withAPIKey: FABRIC_API_KEY)

But then im trying to do the same for Answers:

Answers.start(withAPIKey: FABRIC_API_KEY)

But Answers doesnt have any .start method? How can I initialize this then?

It is later used in this line:

Fabric.with([Crashlytics.self, Answers.self])
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
vonGohren
  • 929
  • 8
  • 22

1 Answers1

2

Mike from Fabric here. Answers is included within Crashlytics by default, you only need to init Answers separately if you're not using Crashlytics. Using:

Fabric.with([Crashlytics.self])

is all you need to do.

Mike Bonnell
  • 16,181
  • 3
  • 61
  • 77
  • Ok, but im getting some problems with iOS on react native, with this library, https://github.com/corymsmith/react-native-fabric. Some message about I need to register all kits. And some other stuff. Lost the message now. Are you familiar with that? – vonGohren May 03 '17 at 14:22
  • I'm not familiar with that. We don't have official support for React Native apps at the moment. – Mike Bonnell May 03 '17 at 14:45
  • I know, but it worked with crashlytics, so it should work with answere aswell. If you wouldnt mind having a look at these errors happening when trying to do call answeres through the library? https://gist.github.com/vongohren/ace1fa40639ebb75b43e465bad51a3bd See if you might point me in the right direction to solve the issue. – vonGohren May 03 '17 at 15:26
  • Looks like you're linking in two libraries, as Crashlytics contains Answers, you're then re-initializing Answers causing the errors. Removing the call to Answers should resolve those. – Mike Bonnell May 03 '17 at 16:42
  • There was some react native magic with swift, cocoapods problem. I ended up making a hardcoded reference(drag and drop the files) into the project, on the node modules folder. It actually works, but is not optimal. Got the idea from airbnb - https://github.com/airbnb/react-native-maps/blob/master/docs/installation.md#ios – vonGohren May 04 '17 at 10:25