'Kotlin Multiplaform iOS Exceptions showing in Xcode, not in Firebase

We have noticed in our project, we are getting allot of exceptions logged in Xcode (->Organiser->Crashes) logged in production... enter image description here

However these Share crashes don't give any extra debug infomation, nor are they logged in our Firebase exceptions.

This is how network API calls are being made using ktor 1.6:

@Throws(CancellationException::class, ResponseException::class, Exception::class)
suspend fun getProfileGoals(profileId : Int) : ProfileGoal{

    val url = "$base/api/goals/$profileId"

        var client =  HttpClient {

        install(JsonFeature) {
            serializer = KotlinxSerializer(kotlinx.serialization.json.Json {
                prettyPrint = true
                isLenient = true
                ignoreUnknownKeys = true
                useAlternativeNames = false
                coerceInputValues = true
                encodeDefaults = true
            })
        }

    return client.get(url){
        headers {
            header(DEVICE_ID, deviceId)
        }
    }
}

And this is how it is used in iOS:

  func getGoals(){
    
    profilesApi?.getProfileGoals(profileId: Int32(selfProfile!.profileId), completionHandler: { profileGoal, error in
        if let profileGoal = profileGoal {
            self.profileGoals = profileGoal
                ....
            }
        }
        
        self.collectionView.reloadData()
    })
}

There are obviously lots of other API calls, but they are all done in a similar way.

I guess my question is, is anything obviously wrong or done the incorrect way or how to get these exceptions appearing in Firebase Crashlytics, which may hopefully have more info for debugging



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source