Integrate Fabric/Crashlytics via CocoaPods

后端 未结 16 1437
鱼传尺愫
鱼传尺愫 2020-12-23 13:49

I try to integrate Fabric/Crashlytics via CocoaPods, my Podfile looks like this:

pod \'Fabric/Core\', \'1.2\'
pod \'Fabric/Crashlytics\', \'1.2\'


        
相关标签:
16条回答
  • 2020-12-23 13:59

    I had the same problem, use the $PODS_ROOT environment variable which points to your Pods folder; be sure to quote it in case you have spaces in your path; so instead of

    ./Pods/Fabric/Fabric.framework/run YOUR_API_KEY YOUR_BUILD_SECRET

    use

    "$PODS_ROOT"/Fabric/Fabric.framework/run YOUR_API_KEY YOUR_BUILD_SECRET

    0 讨论(0)
  • 2020-12-23 14:01

    Fabric now supports installation with CocoaPods: http://docs.fabric.io/ios/fabric/cocoapods.html

    If you are just looking for Crashlytics you can use these two pods:

    pod 'Fabric'
    pod 'Crashlytics'
    

    Along with adding the following build phase script (note: In case the path to your repo contains spaces, you will need the quotes):

    "${PODS_ROOT}"/Fabric/run <API Key> <Build Secret>
    

    Run Script Build Phase

    If you are looking to use TwitterKit you will need to include:

    pod 'TwitterKit'
    
    0 讨论(0)
  • 2020-12-23 14:02

    For my project, this worked:

    "${PODS_ROOT}/Fabric/Fabric.framework/run" YOUR_API_KEY YOUR_BUILD_SECRET
    
    0 讨论(0)
  • 2020-12-23 14:04

    Delete podfile.lock and manifest.lock, then re-run podfile install, then continue from there using the "easy" configure app from Fabric.

    There are some very nice screen-shot slide-show demos on Fabric.io's site. I found them with Google - don't see where they are accessible from the site.

    FYI, if you're having issues, it's not you :). Basically (as of August 3rd), every step of the Fabric onboard process is potentially broken.

    • If you're lucky, you might have no issues.
    • If you're not, :( you might have issues to resolve at every step, including signing up for the service which can put you in an endless sign-up loop, and so on from there.

    Hopefully these will all get fixed soon.

    Warning: most of the answers you will find via a search will be outdated, because apparently fabric.io changed a lot on July 15th, but if you scroll down anything you find on stack/o, you might find a newer answer.

    0 讨论(0)
  • 2020-12-23 14:07

    Typically I would recommend not going against the grain and using the Fabric App for installation. Its hands down the simplest integration tool I've ever seen given the complexity they are providing.

    That being said, since you're dead set on using Cocoapods, the only way to get things going would be the following

    1. Run the Crashlytics App installer to the point where they give you the build phase script.
    2. Copy the script
    3. Undo the installation
    4. Install via Cocoapods
    5. Add the copied script to your buildphase
    0 讨论(0)
  • 2020-12-23 14:08

    If you update to Fabric & Crashlytics from older version:

    1. If you have any data in your info.plist file by the key Fabric, make sure to delete all that info along with the key.
    2. Use simple "${PODS_ROOT}/Fabric/run" script. Don't add any API_KEY and BUILD_SECRET

    That worked for me, hope this helps.

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