Firebase Crashlytics setup on iOS?

前端 未结 6 855
小鲜肉
小鲜肉 2021-02-03 17:13

I\'m trying to integrate Firebase Crashlytics into iOS my app, which has Firebase Crash Reporting enabled. I\'ve followed the documentation here, but my build a

相关标签:
6条回答
  • 2021-02-03 17:59

    I followed the https://fabric.io/kits/ios/crashlytics/install documentation and added the Run Script and updated Info.plist but still got the above issue.

    Apparently, I had accidentally added twice 'New Run Script Phase'. After removing the unnecessary 'Run Script's the project compiled successfully.

    Xcode 10.1 Fabric 1.7.5 Crashlytics 3.10.4

    0 讨论(0)
  • 2021-02-03 18:00

    If you follow closely the Getting Started documentation, you might be in for some frustrations. Trust me. I had my share of that.

    Now here's what I can share with you.

    1. If you previously had Fabric RunScript for that Target, then it's best if you delete that and create a new one, apply the GettingStarted instruction, and replace the $(INFOPLIST_PATH) with GoogleService-Info.plist.

    2. There should be no Fabric configuration on your Info.plist file anymore. It's this thing: <key>Fabric</key><dict>...</dict>. If you still have that, time to say goodbye and let go of those feelings or face this issue.

    3. If you keep seeing this in your Xcode console, [Fabric] failed to download settings Error Domain=FABNetworkError Code=-5... blah blah blah, then go clean that Build Folder first (shift + cmd + k).

    If your next build works, try force crashing your app and check out the crash logs on Firebase.

    Here's my stack: Xcode 10.2.1 | Fabric 1.9 | Crashlytics 3.12

    0 讨论(0)
  • 2021-02-03 18:02

    If you're using Crashlytics, you might have to go into your Build Phases -> Crashlytics configuration and add it into the shell/bin/sh section like this: `set -e

    if [[ ${PODS_ROOT} ]]; then echo "info: Exec Fabric Run from Pods" "${PODS_ROOT}/Fabric/run" YOUR KEY HERE else echo "info: Exec Fabric Run from framework" "${PROJECT_DIR}/Fabric.framework/run" YOUR KEY HERE fi`

    0 讨论(0)
  • 2021-02-03 18:08

    The issue for me was I was using the old Fabric before and I had to remove the key from my info.plist

    0 讨论(0)
  • 2021-02-03 18:09

    Finally figured it out, posting for anyone that might be baffled by the same problem.

    If you've tried to install fabric via the OSX Fabric.app, or you were using Fabric Crashlytics in the past, then it will have added your Fabric API key to your Info.plist, which the Fabric initialization build script is trying to read (I guess).

    After deleting the Fabric keys form the Info.plist the script works, without the need of any keys/params.

    The Firebase docs should include a snippet warning on this.

    0 讨论(0)
  • 2021-02-03 18:18

    Documentation

    • if crashlytics is already set up in your project (in case of migration),

      1. Remove the fabric key from Info.plist (need to remove the dictionary and the key for Fabric)
      2. Follow the documentation.(just need to use "${PODS_ROOT}/Fabric/run", instead of "${PODS_ROOT}/Fabric/run" key1 key2 in the Run script under build phase)
    • if crashlytics is not setup in your project already(starting a fresh integration with firebase crashlytics), simply follow the documentation.

    0 讨论(0)
提交回复
热议问题