caiyue1993/IceCream

Swift package target 'Realm' is linked as a static library by 'IceCream' and 'RealmSwift'. This will result in duplication of library code.

ts95 opened this issue · 2 comments

ts95 commented

I'm getting the following error with the preview canvas in my SwiftUI project with Xcode 12 beta 3:

Swift package target 'Realm' is linked as a static library by 'IceCream' and 'RealmSwift'. This will result in duplication of library code.

----------------------------------------

SchemeBuildError: Failed to build the scheme "MyApp"

Swift package target 'Realm' is linked as a static library by 'IceCream' and 'RealmSwift'. This will result in duplication of library code.

Build system information:
error: Swift package target 'Realm' is linked as a static library by 'IceCream' and 'RealmSwift'. This will result in duplication of library code.

I'm using SPM to depend on IceCream v1.13.1:
image

The project still builds and I can run the app in the simulator, but the canvas feature doesn't work at all.

Remove Realm from here in you Package.swift:
dependencies: ["RealmSwift", "Realm"],

The Realm module is already linked by RealmSwift.

ts95 commented

As of Xcode 12 beta 5 this is no longer a problem 👍