GithubHelp home page GithubHelp logo

isabella232 / sentry-kotlin-multiplatform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from getsentry/sentry-kotlin-multiplatform

0.0 0.0 0.0 188 KB

Experimental not finished SDK for Kotlin Multiplatform

License: MIT License

Kotlin 79.21% Ruby 20.79%

sentry-kotlin-multiplatform's Introduction


Experimental Sentry SDK for Kotlin Multiplatform

This project is an experimental SDK for Kotlin Multiplatform. It was built during Hackweek and is not finished. This SDK is a wrapper around different platforms as JVM, Android, Cocoa, and JavaScript, that can be used on Kotlin Multiplatform.

Installation and Usage

Clone or fork this repo. This SDK is under construction and therefore we only publish it to maven local:

./gradlew publishToMavenLocal

Add this to your Gradle

repositories {
  // Because we only publish to maven local
  mavenLocal()
}

dependencies {
  implementation("io.sentry.kotlin.multiplatform:sentry-kotlin-multiplatform:0.0.1")
}

Cocoa

For iOS, iPadOS, MacOS, tvOS or watchOS we use CocoaPods to include sentry-cocoa into this SDK. The infrastracture of Kotlin can't resolve CocoaPods yet. Hence, when publishing and including this SDK via Maven we a different solution to package Sentry into our apps.

One way to achieve this is to include the Kotlin Multiplatform library via CocoaPods into your Xcode project and also add Sentry to the Podfile. This way CocoaPods and Xcode take care of packaging Sentry into your app. First, you need to install CocoaPods and the Gradle Plugin. Next integrate the Kotlin Gradle project as a CocoaPods dependency. Finally, also add Sentry as a CocoaPods dependency. Your Podfile should look something like this:

target 'iosApp' do
  use_frameworks!
  platform :ios, '13.5'
  # Pods for iosApp
  pod 'kotlin_library', :path => '../kotlin-library'
  pod 'Sentry', '~> 5.2.0' # Same version as in this SDK
end

Please make sure to specify the same version as used in this SDK. Otherwise weird bugs could happen.

Android

The initialization of the Android SDK needs a context. ContextProvider takes care of passing resolving the context. Add the following to your Application class.

class YourApplication : Application() {

    override fun onCreate() {
        super.onCreate()

        ContextProvider.init { this }
    }
}

JavaScript

Not implemented yet. Help appreciated.

sentry-kotlin-multiplatform's People

Contributors

philipphofmann 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.