0
votes

I recently switched to using CocoaPods for managing dependencies in my iOS apps. So I'm going through all my apps, deleting the frameworks and adding them again via CocoaPods.

I deleted the Fabric and Crashlytics frameworks, added the pods:

  • pod 'Fabric'
  • pod 'Crashlytics'

and ran pod install.

I also changed the run script from

./Crashlytics.framework/run [yourAPIKey] 

to

"${PODS_ROOT}/Fabric/run" [yourAPIKey]`

Everything works as expected, and the app works perfectly fine, except one thing. On the Fabric mac app, with the app selected, if I try to update Crashlytics by clicking Crashlytics > Update, it tries to open the *.xcodeproj file instead of the new *.xcworkspace file I'm now using with CocoaPods.

If I already have the *.xcworkspace file open, and click 'Update' in the Fabric app, it will attempt to open the *.xcodeproj file and Xcode will complain:

Cannot open "[app_name].xcodeproj" because it is already open in another workspace.

If Fabric is installed into a new project via CocoaPods, it will always open the correct file (*.xcworkspace). How do I tell the Fabric app to open an app's *.xcworkspace file instead of the old *.xcodeproj file?

I don't want to delete the app from Fabric and re-add it, because I will lose all the old data.

1
Why are you using the Mac app to update the frameworks anyway? That's now cocoapod's job - run pod update if you want to update.Gereon
@Gereon you're right, I thought about that then, but I'll leave it here for reference.gnarlybracket

1 Answers

1
votes
  1. In the Fabric mac app, add a new app by clicking '+ New App'
  2. Click on the .xcworkspace file of the app. Note: This will not add a new duplicate app, but will overwrite the configuration of the existing app while leaving all the history and past versions of the app intact.)
  3. Follow the steps in the Fabric app for onboarding. Make sure you choose the Podfile onboarding method to install via CocoaPods.