Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Kalyaganov kalyaganov

View GitHub Profile
@kalyaganov
kalyaganov / creating.swift
Created May 25, 2021
Ktor self signed certs
View creating.swift
let skipSessionDelegate = SkipSSLSessionDelegate()
SDK(
// ....
challengeHandler: { (session, task, authenticationChallenge, completionHandler) in
skipSessionDelegate.urlSession?(session, didReceive: authenticationChallenge) {
(authChallengeDisposition, urlCredentials) in
completionHandler(KotlinLong(integerLiteral: authChallengeDisposition.rawValue), urlCredentials)
}
}
View report.json
This file has been truncated, but you can view the full file.
View RouterVisiter.kt
class RouterVisiter {
fun route(item: TypeA){
//route for TypeA
}
fun route(item: TypeB){
//route for TypeB
}
}
View CrashlyticsTree.kt
/**
* A tree which logs important information for crash reporting.
*/
private class CrashReportingTree : Timber.Tree() {
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
if (priority == Log.VERBOSE || priority == Log.DEBUG) {
return
}
Crashlytics.log(priority, tag, message)
if (t != null) {