Kotlin-native: iOs app crashes on start after migration 1.3.61 -> 1.3.70

Created on 7 Mar 2020  路  4Comments  路  Source: JetBrains/kotlin-native

dyld: Library not loaded: /System/Library/Frameworks/IOSurface.framework/IOSurface
  Referenced from: /Users/subprogram/Library/Developer/CoreSimulator/Devices/734560C9-6DF2-489F-839D-BE683FC7AD43/data/Containers/Bundle/Application/B95CB35D-07D0-4893-8A87-86837635D473/GuitarSongs.app/GuitarSongs
  Reason: no suitable image found.  Did find:
    /System/Library/Frameworks/IOSurface.framework/IOSurface: mach-o, but not built for iOS simulator

This issue is dependent on iOs version. In my tests only iOs 10.3.1 is affected.
I've also tested 12.4.4 and 13.1 - the issue is not reproduced.

Most helpful comment

Hello, @subprogram! Sorry for such a late response. This problem seems to be caused by Kotlin/Native compiler caches, that was introduced in 1.3.70. Therefore, it can be workaround by disabling them.
Just set the kotlin.native.cacheKind = none in your project's Gradle properties.
Also, as the caches feature applies only for the debug mode, your releases should not be affected.

All 4 comments

Hello, @subprogram! Sorry for such a late response. This problem seems to be caused by Kotlin/Native compiler caches, that was introduced in 1.3.70. Therefore, it can be workaround by disabling them.
Just set the kotlin.native.cacheKind = none in your project's Gradle properties.
Also, as the caches feature applies only for the debug mode, your releases should not be affected.

Hi @artdfel! Thanks for your reply. I confirm that setting the kotlin.native.cacheKind = none solves the issue.

@artdfel. thanks for the heart. this single line of code saved my day, after I wasted more than 10 hours on this issues.

The fix for this issue will be shipped with 1.4.20.
So after updating your project to 1.4.20 please try to remove the "kotlin.native.cacheKind = none" workaround.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

msink picture msink  路  4Comments

dpomada picture dpomada  路  3Comments

benasher44 picture benasher44  路  4Comments

msink picture msink  路  4Comments

barsan-md picture barsan-md  路  4Comments