Skip to content

iOS example not working correctly, throws: mutation attempt of frozen kotlin.collections.HashMap #12

Closed
@falcon4ever

Description

@falcon4ever

Hi,

I was following the tutorial Kotlin Multiplatform Hands-on: Networking and Data Storage from scratch using Android Studio Arctic Fox Beta 4 and KMM plugin v0.2.6.

The Android demo works great, the iOS demo seems to have a problem trying to retrieve the data from the shared KMM module.

I also noticed that the iOS template that's generated with KMM plugin v0.2.6 is different from the one in the tutorial and this repo. The plugin now generates a template with iOSApp.swift and ContentView.swift only (there is no AppDelegate.swift or SceneDelegate). In my fork I made some changes to make it run, unfortunately, it gives me the following error when launching: "mutation attempt of frozen kotlin.collections.HashMap@1cad628"

Screen Shot 2021-06-29 at 5 07 08 PM

Steps to replicate:

Any ideas how to fix the demo code?

I'm using:

  • Kotlin: 1.5.20
  • Coroutines: 1.5.0-native-mt
  • Serialization: 1.2.1
  • ktor: 1.6.0
  • sqldelight: 1.5.0

edit June 30th 2021
I also tried updated the existing final branch to see if it was some XCode proj issue (but it gives the same result):

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions