Coder Social home page Coder Social logo

cocoa's Introduction

Cocoa/iOS Demo

Setup

In XCode:

Select th sentry-cocoa root folder to open the app profile:

  1. Set a SENTRY_AUTH_TOKEN in 'Run Script' build phase.

  2. Put your DSN key in sentry-cocoa/AppDelegate.swift

  3. sentry-cli must be installed at /usr/local/bin

  4. XCode Edit Schemes > 'Run' action for your scheme > Info tab > uncheck 'Debug executable' box.
    This ensures your app doesn't run in debugging mode, in which case unhandled exceptions won't send to Sentry.

  5. Run pod install from the terminal

  6. Click the Run/play button targeting iPhone 11

  7. In Simulator, Launch the sentry-cocoa app

  8. Press a button to generate an Error

How to Upgrade SDK

Check out a new branch so you can open a PR.

  1. Xcode -> Podfile, increment the sdk version.
  2. pod update, or pod install if pod updating is hanging.
  3. Click 'Play' button

Flow/Demo

The demo app enriches every event with: Custom context, breadcrumbs, tags, user IP, extra data.

  1. From the Simulator explicitly send an event to Sentry by clicking
    • Handled Exception
    • Capture Message

Send Message

  1. For Native crashes click:
  • Crash Application
  • UnHandled Exception

Native Crash / Runtime Error

  1. Release:
  • Note that the cocoa-sdk automatically creates a Release by using the build version + dist as described in the Android SDK Release Version Format
  • The SDK then automatically tags every event with that release version id (i.e. there is no need to explicitly set the release version ID, unless you're explicitly setting a custom release name)
  1. Run Scripts:

    Upload the Debug Symbols to the target project and associate the commits to the release object.

  2. Check for User Feedback collected by the Capture Message and Unhandled Exception buttons

Documentation/Resources

https://docs.sentry.io/clients/cocoa/

If you still enter debugging mode by accident, then click 'Stop' which will detach the debugger, then re-launch the app from the touch screen. Do not click 'Play' again or else the debugger will re-attach.

CrashApplication button makes "EXC_BAD_INSTRUCTION: Fatal error > procpath"

UnhandledException button makes "EXC_BAD_ACCESS:causeCrash: > crash > Attempted to derefer"

Crashes and unhandled exceptions will have stack traces for several threads. Messages and Handled exceptions will have stack trace for top-level thread.

cocoa's People

Contributors

thinkocapo avatar idosun avatar rohitkataria-sentryio avatar vudngo avatar vusidequest avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.