Stacksift App SDK

Overview

Stacksift SDK

Capture and submit crashes to Stacksift.

This library ties together Wells and Impact to provide a full crash capturing and submission system. It is not required, but can be handy if you just want to drop something in and get going. It supports macOS 13.0+, iOS 12.0+, and tvOS 12.0+.

Integration

Swift Package Manager:

dependencies: [
    .package(url: "https://github.com/stacksift/SDK.git")
]

Carthage:

github "stacksift/SDK"

CocoaPods:

pod 'Stacksift'

Getting Started

All you need to do is import Stacksift, and call then call start early in your app's lifecycle.

import Stacksift

...

Stacksift.start(APIKey: "my key")

Background Uploads

By default, Stacksift using URLSession background uploads for both reliability and performance. However, sometimes these can take hours for the OS to actually execute. This can be a pain if you are just testing things out. To make that easier, you can disable background uploads with another parameter to the start method.

MetricKit vs In-Process

Stacksift can capture your crash information in two different ways: in-process monitoring or via MetricKit diagnostics. In-process is the default, but you can use a parameter to start to make another choice.

In-process monitoring is the traditional approach taken by third-party crash reporting systems. In-process monitoring can capture many, but not all types of crashes. However, it requires a complex system that does not interoperate well. You should install only one in-process reporter.

MetricKit crash diagnostics is a new facility introduced with iOS 14. MetricKit is far less invasive, much simpler, and can include more context than an in-process system. And, it was built to be used by multiple consumers within the same app. Unfortunately, MetricKit also comes with some severe limitations, in addition to the platform/OS availability.

MetricKit results are only available ~ 24 hours after they have been captured, even while testing. It is also undocumented how many crashes MetricKit will buffer, should your app not be relaunched within that 24 hour window. MetricKit crashes are only available on devices that have opted into sharing diagnostic data with developers. It is widely believed the opt-in rate is below 25%. Finally, MetricKit reports omit a number of relevant details, such as a precise time and information about uncaught runtime exceptions.

When Stacksift is configured to use MetricKit only, it will not intefere with any other installed 3rd-party reporter.

Exceptions from macOS Apps

Unfortunately, AppKit intefers with the flow of runtime exceptions. If you want to capture information about uncaught exceptions, some extra work is required.

⚠️ This technique does not work for SwiftUI lifecycle-based macOS applications. A solution is still being investigated.

The top-level NSApplication instance for your app must be a subclass of ImpactMonitoredApplication.

import Impact

class Application: ImpactMonitoredApplication {
}

and, you must update your Info.plist to ensure that the NSPrincipalClass key references this class with .Application.

I realize this is a huge pain. If you feel so motivated, please file feedback with Apple to ask them to make AppKit behave like UIKit in this respect.

I would also strongly recommend setting the NSApplicationCrashOnExceptions defaults key to true. The default setting will allow your application to continue executing post-exception, virtually guaranteeing state corruption and incorrect behavior.

Suggestions or Feedback

We'd love to hear from you! Get in touch via twitter, an issue, or a pull request.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

You might also like...
Basispay IOS SDK Version 2

BasisPay-IOS-KIT BasisPay IOS Payment Gateway kit for developers INTRODUCTION This document describes the steps for integrating Basispay online paymen

The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips.
The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips.

Gini Bank SDK for iOS The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips. By integra

Release repo for Gini Bank SDK for iOS
Release repo for Gini Bank SDK for iOS

Gini Bank SDK for iOS The Gini Bank SDK provides components for capturing, reviewing and analyzing photos of invoices and remittance slips. By integra

Sdk for Heap challenge

Heap SDK challenge how to: Introduction I developed Heap SDK with two test applications I built as a challenge for two companies ( Fleetio & Divvy ) d

Da Xue Zhang Platform Lvb iOS SDK

Cloud_Lvb_SDK iOS API Reference Dxz Meeting iOS SDK是为 iOS 平台用户音视频服务的开源 SDK。通过大学长开放平台自研RTC,RTM系统,为客户提供质量可靠的音视频服务。 类 类名 描述 CLS_PlatformManager SDK的音视频主要

Swift SDK for Blockfrost.io API
Swift SDK for Blockfrost.io API

Swift5 API client for Blockfrost Swift 5 SDK for Blockfrost.io API. Installation • Usage • API Endpoints Installation Swift package manager dependenci

PayPal iOS SDK

PayPal iOS SDK Welcome to PayPal's iOS SDK. This library will help you accept card, PayPal, Venmo, and alternative payment methods in your iOS app. Su

Unofficial Notion API SDK for iOS & macOS
Unofficial Notion API SDK for iOS & macOS

NotionSwift Unofficial Notion SDK for iOS & macOS. This is still work in progress version, the module interface might change. API Documentation This l

150,000+ stickers API & SDK for iOS Apps.
150,000+ stickers API & SDK for iOS Apps.

English | 한국어 Stipop UI SDK for iOS Stipop SDK provides over 150,000 .png and .gif stickers that can be easily integrated into mobile app chats, comme

Comments
  • Build errors with Xcode 13.0

    Build errors with Xcode 13.0

    https://github.com/stacksift/SDK/blob/52dfaecbbb4e0c57f3068ed443360a00c2d77a24/Sources/Stacksift/MetricKitSubscriber.swift#L30

    As usual, Xcode x.0 ships without the necessary SDK for the upcoming major macOS release. This means that availability checks for that version don't work anymore, causing compile errors when building using the Xcode RC.

    Not sure if you want to bump the check to the nonsense future version that Apple seem to use (99999?) - I'm happy to help with a PR.

    opened by tonyarnold 5
  • Shutting down or disabling

    Shutting down or disabling

    In order to adequately respond to the user's preference, opt-in and opt-out of data collection, it is important that the application is capable of turning off Stackshift as soon as the user revokes their consent for data collection.

    There doesn't appear to be a mechanism in place for doing so. Sentry, as an alternative, has the option of passing a nil dsn, passing false to the config's enabled, or simply invoking close() on the instance. Suggesting the SDK add a method for countering the start() method, (eg. stop()), as well as a manner for the application to find out whether Stacksift is currently installed and running.

    opened by lhunath 3
Releases(0.3.5)
Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter SDK is a cross-platform SDK consisting of a real-time 3D avatar system, facial motion capture, and an Avatar Designer component built from scratch for web3 interoperability and the open metaverse.

Alter 45 Nov 29, 2022
Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app.

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using Apple Pay or their credit card.

Shopify 411 Jan 2, 2023
iOS SDK for growing mobile in-app purchases

Adapty iOS SDK — in-app purchases start here Adapty SDK is an open-source framework that makes implementing in-app subscriptions in iOS fast and easy.

Adapty 339 Dec 14, 2022
Sample app to demonstrate the integration code and working of Dyte SDK for iOS, using Objective-C.

iOS sample app (using Objective-C) by dyte Sample app to demonstrate the usage of Dyte iOS SDK Explore the docs » View Demo · Report Bug · Request Fea

Dyte 8 Nov 26, 2021
Swiftui-webrtc-agora - SwiftUI webrtc app. use agora sdk for webrtc

Specs swiftui comnine firebase auth agora graphql apollo-ios( https://github.com

akiho 0 Jan 5, 2022
TelegramStickersImport — Telegram stickers importing SDK for iOS

TelegramStickersImport — Telegram stickers importing SDK for iOS TelegramStickersImport helps your users import third-party programaticaly created sti

null 35 Oct 26, 2022
RadioTimeKit - The Swift SDK for TuneIn RadioTimeKit is a Swift package to use the TuneIn API.

RadioTimeKit - The Swift SDK for TuneIn RadioTimeKit is a Swift package to use the TuneIn API. The goal for development was to have a Swift SDK to get

Frank Gregor 2 Jun 20, 2022
Official Appwrite SDK for Apple Devices 🍎

Appwrite Apple SDK This SDK is compatible with Appwrite server version 0.11.x. For older versions, please check previous releases. Appwrite is an open

Appwrite 55 Jan 2, 2023
Official Appwrite Swift SDK 🦅🍎

Appwrite Swift SDK This SDK is compatible with Appwrite server version 0.11.x. For older versions, please check previous releases. This is the Swift S

Appwrite 27 Dec 25, 2022
Muxer used on top of Feed iOS SDK for airplay

FeedAirplayMuxer Muxer used on top of Feed iOS SDK for airplay purposes. Demo Project --> https://github.com/feedfm/AirplayDemo Feed Airplay Muxer is

Feed Media 0 May 6, 2022