1

I just updated from Crashlytics to Fabric. But when I open the Mac App and try to update my projects it stops at "Build your project".

My project setup is a little bit complicated, I have multiple targets to build but it works with none of them (nor all of them)

Is there a way to manually do the update? I could not find a hint on the Crashlytics pages, nor is this a duplicate of Crashlytics in iOS won't proceed past "Build Your Project" in Fabric app

Community
  • 1
  • 1
dogsgod
  • 6,267
  • 6
  • 25
  • 53
  • Alex from Fabric here. It'd be great to dig into your logs and help get you up and running. Can you shoot me an email at support@fabric.io? Once I know what's going on, I can add an official answer here. – Alexizamerican Apr 29 '15 at 19:24
  • Thanks @Alexizamerican, I habe been able to resolve that part, see my answer below. For my remaining issues I alteady sent a support request. – dogsgod Apr 29 '15 at 20:21

3 Answers3

2

You can add the Fabric.framework and Crashlytics.framework manually and enable them for selected targets. Also, add this to your Info.plist:

<key>Fabric</key>
<dict>
    <key>Kits</key>
    <array>
        <dict>
            <key>KitInfo</key>
            <dict/>
            <key>KitName</key>
            <string>Crashlytics</string>
        </dict>
    </array>
    <key>APIKey</key>
    <string>YOUR_FABRIC_KEY</string>
</dict>

And this to your Build Phases - Run Script for every target where you wish to use Crashlytics. You can use the same key with every target as it's company, not application specific:

Shell: /bin/sh

./Fabric.framework/run YOUR_FABRIC_KEY BUILD_SECRET

I assume you already have this in your AppDelegate:

[Fabric with:@[CrashlyticsKit]];
Tapani
  • 3,191
  • 1
  • 25
  • 41
  • How would I download the frameworks? Furthermore, you can still use the Crashlytics import and call in your app ... but thanks for the hint about the changed shell script, could not have resolved it without that – dogsgod Apr 29 '15 at 11:37
  • When you install the Fabric plugin it should copy the frameworks to your project directory. – Tapani Apr 29 '15 at 12:13
  • That is what the Mac App tried to do and where it failed. I did not get to the step where it did let me download, because it was unable to find (and in the next step update) the old Crashlytics setup. – dogsgod Apr 29 '15 at 12:16
  • I wrote a quick how to, it requires cocoapods. Please see https://gist.github.com/marciomeschini/0e9492d0bb6de45b2e5c – marcio Nov 18 '15 at 11:26
0

I had to simplify my build setup. Make sure you have the ./Crashlytics.framework/run in your build setup run script and not in an external script called from there - otherwise it will fail.

Also make sure you have the Crashlytics call [Crashlytics startWithAPIKey:@"1234"] in your app for all build configurations at setup time, otherwise again the setup will fail.

If you did any mistake your only option is to kill the Fabric Mac App and start over again. So make sure you have a versioning system set up, so you can get back to the initial phase.

I also had to change the build setup run script manually from ./Crashlytics.framework/run to ./Fabric.framework/run, thanks to @Tapani for the hint

dogsgod
  • 6,267
  • 6
  • 25
  • 53
0

I have solved this issue by the following way. Following the advise from above, I began adding a new app to crashlytics. When I reached to adding new "Run script" build phase, I just copied that text and pasted it over the previous one(created with Crashlytics). I have also unchecked "Run script only when installing".

After this, I canceleed adding a new app and procedeed back to the UPGRADE. At this moment, building the app, can pass you to the next step and you don't get stuck on that screen anymore.

Oleg Danu
  • 4,149
  • 4
  • 29
  • 47