Skip to content

Instantly share code, notes, and snippets.

@marciomeschini
Last active June 6, 2019 10:38
Show Gist options
  • Save marciomeschini/0e9492d0bb6de45b2e5c to your computer and use it in GitHub Desktop.
Save marciomeschini/0e9492d0bb6de45b2e5c to your computer and use it in GitHub Desktop.
Add iOS project to Fabric/Crashlytics without using Fabric app. Requires use of cocoapods.
  • create a new project from Xcode
  • open a terminal, go to the project folder
  • pod init
  • open Podfile, add:
pod 'Fabric'
pod 'Crashlytics'
  • pod install
  • open workspace
  • open Info.plist, add Fabric item:
	<key>Fabric</key>
	<dict>
		<key>APIKey</key>
		<string>YOUR_API_KEY</string>
		<key>Kits</key>
		<array>
			<dict>
				<key>KitInfo</key>
				<dict/>
				<key>KitName</key>
				<string>Crashlytics</string>
			</dict>
		</array>
	</dict>

(see attached image)

  • open target Build Phases tab
  • add New Run Script Phase
	"${PODS_ROOT}/Fabric/Fabric.framework/run" YOUR_API_KEY YOUR_BUILD_SECRET
  • open target Build Settings/Debug Information Format and make sure that, for every configuration, is
DWARF with dSYM File

(if you forget, no worries, Fabric will show you a warning during the build)

  • run from simulator
  • app should now be available from your Fabric dashboard (make sure you refresh the browser)
  • hooray!
@erkekin
Copy link

erkekin commented Jun 6, 2019

this should be upvoted 💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment