用于 iOS/tvOS/macOS/watchOS的官方Sentry SDK

・1 分钟阅读

  • 源代码名称: sentry-cocoa
  • 源代码网址: https://www.github.com/getsentry/sentry-cocoa
  • sentry-cocoa的文档
  • sentry-cocoa的源代码下载
  • Git URL:
    git://www.github.com/getsentry/sentry-cocoa.git
  • Git Clone代码到本地:
    git clone https://www.github.com/getsentry/sentry-cocoa
  • Subversion代码到本地:
    $ svn co --depth empty https://www.github.com/getsentry/sentry-cocoa
                              Checked out revision 1.
                              $ cd repo
                              $ svn up trunk
              

  • 官方Sentry SDK

    TravisplatformslangaugesCocoaPods ShieldCocoaPods ShieldCarthage compatiblecodecov

    这个SDK是用 objective-c 编写的,但也适用于 Swift 项目。

    
    
    
    
    import Sentry
    
    
    
    func application(application: UIApplication,
    
    
     didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    
    
    
     // Create a Sentry client and start crash handler
    
    
     do {
    
    
     Client.shared = try Client(dsn: "___PUBLIC_DSN___")
    
    
     try Client.shared?.startCrashHandler()
    
    
     } catch let error {
    
    
     print("(error)")
    
    
     // Wrong DSN or KSCrash not installed
    
    
     }
    
    
    
     return true
    
    
    }
    
    
    
    

    (1)有限的符号支持

    讨论
    Fansisi profile image