Integrate Fabric/Crashlytics via CocoaPods

后端 未结 16 1436
鱼传尺愫
鱼传尺愫 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:50

    If you relied on something specific to the older Podspecs and can't update to the official libraries yet, you can add

    source 'https://github.com/orta/FabricSpecs.git'
    source 'https://github.com/CocoaPods/Specs.git'
    

    To the top of your Podfile, and it will look for the older -unofficial- versions before the new ones. See the FabricSpecs repo for more details.

    0 讨论(0)
  • 2020-12-23 13:50

    I have meet this issue before. Here is my solution. to add the execution mode for the run file automatically before your run the script.

    In the Build Phase -> Run Script add following line:

    chmod +x ./Pods/CrashlyticsFramework/Crashlytics.framework/run
    
    ./Pods/CrashlyticsFramework/Crashlytics.framework/run YOUR_API_KEY YOUR_BUILD_SECRET
    
    0 讨论(0)
  • 2020-12-23 13:53

    The path to the script that is executed during the build phase is different when you use Cocoapods. The github page on https://github.com/bpoplauschi/CrashlyticsFramework advises to use ./Pods/CrashlyticsFramework/Crashlytics.framework/run however, I found I had to use ./Pods/Fabric/Fabric.framework/run for my installation. Anyways you will have to dig through the Pods directory to find what you are looking for.

    0 讨论(0)
  • 2020-12-23 13:53

    Make sure to uninstall pod 'Answers', '~> 1.3' from your pods if you are using Fabric in your project before.

    0 讨论(0)
  • 2020-12-23 13:57

    macOS Sierra, Swift 3

    change

    ${PODS_ROOT}/Fabric/run
    

    to

    "${PODS_ROOT}/Fabric/run"
    
    0 讨论(0)
  • 2020-12-23 13:59

    Same problem for me was fixed by changing the line from:

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

    to:

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

    In other words, just prepend an extra '.' to designate that the 'Pods' directory is a sibling rather than a child of the build directory. YMMV.

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