Clone and open Crashlytics quickstart project
- Clone the quickstart repo and
- Open file
CrashlyticsExample.xcodeprojproject using Xcode.
$ git clone https://github.com/firebase/quickstart-ios.git $ cd crashlytics/ $ open CrashlyticsExample.xcodeproj
- Once the
.xcodeprojis opened, update to the latest Swift Package Versions: go to the menu bar, click on File > Swift Packages > Update to Latest Package Versions.
Connecting to the Firebase Console
- To have a functional application, you will need to connect the Crashlytics quickstart example with the Firebase Console.
- For an in-depth explanation, you can read more about adding Firebase to your iOS
Project. Below is a summary of the main steps:
- Visit the Firebase Console
- Add an iOS app to the project. Make sure the
Bundle Identifieryou set for this iOS App matches that of the one in this quickstart.
- Download the
- Drag the downloaded
GoogleService-Info.plistinto the opened quickstart app under the
- Now you should be able to build and run the Firebase project!
Trigger a crash in Crashlytics quickstart app
Build and then run the current schemein Xcode to build your app on a device or simulator.
Stop running the scheme or actionin Xcode to close the initial instance of your app. This initial instance includes a debugger that interferes with Crashlytics.
- Open your app again from the simulator or device.
Crashbutton to crash the app.
- Open your app once more to let the Crashlytics API report the crash. Your crash should show up in the Firebase Console within 5 minutes.
For details on how to test out Crashlytics, read Test your Crashlytics implementation