Skip to content

Latest commit

 

History

History
83 lines (65 loc) · 3.6 KB

README.md

File metadata and controls

83 lines (65 loc) · 3.6 KB

Firebase Crashlytics Quickstart

The Firebase Crashlytics iOS quickstart demonstrates how to report crashes and log events leading up to those crashes. You can read more about Firebase Crashlytics here!

To view the older Objective-C and Swift quickstarts, view the LegacyCrashlyticsQuickstart directory.

Getting Started

Clone and open Crashlytics quickstart project

  • Clone the quickstart repo and cd into the crashlytics directory.
  • Open file CrashlyticsExample.xcodeproj project using Xcode.
$ git clone https://github.com/firebase/quickstart-ios.git
$ cd crashlytics/
$ open CrashlyticsExample.xcodeproj
  • Once the .xcodeproj is 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:
    1. Visit the Firebase Console
    2. Add an iOS app to the project. Make sure the Bundle Identifier you set for this iOS App matches that of the one in this quickstart.
    3. Download the GoogleService-Info.plist when prompted.
    4. Drag the downloaded GoogleService-Info.plist into the opened quickstart app under the Shared folder.
  • Now you should be able to build and run the Firebase project!

Trigger a crash in Crashlytics quickstart app

  1. Click Build and then run the current scheme in Xcode to build your app on a device or simulator.
  2. Click Stop running the scheme or action in Xcode to close the initial instance of your app. This initial instance includes a debugger that interferes with Crashlytics.
  3. Open your app again from the simulator or device.
  4. Touch Crash button to crash the app.
  5. 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

Documentation

To learn more about the structure of the SwiftUI Realtime Database quickstart app, check out the documentation here.

Support

License

Copyright 2021 Google, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.