You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When previewing a module that links against geos SwiftUI previews will fail to link with Cannot preview in this file and Update failed. Tapping on the diagnostic icon reveals a dynamic linker failure at runtime
LoadingError: failed to load library at path ".../Debug-iphonesimulator/PackageFrameworks/AppFeature_-763FCD0D750E0A09_PackageProduct.framework/AppFeature_-763FCD0D750E0A09_PackageProduct": Optional(dlopen(/Users/sena/Library/Developer/Xcode/DerivedData/Modules-dzuyxirpdnkkyqbokjvjlomldapx/Build/Intermediates.noindex/Previews/AppFeature/Products/Debug-iphonesimulator/PackageFrameworks/AppFeature_-763FCD0D750E0A09_PackageProduct.framework/AppFeature_-763FCD0D750E0A09_PackageProduct, 0x0000): Library not loaded: @rpath/geos.framework/geos
| Referenced from: <1B72
see Library not loaded: @rpath/geos.framework/geos
Is the reason for .dynamic linking of the upstream libgeos/geos C++ codebase solely for the LGPL license requirements? If so, it should be possible to create a static version of the library for the simulator while maintaining dynamic linking when not targeting the simulator.
The c++ code could be moved into a common module and two new modules be created geos and staticGeos. Both new modules would depend on common, geos would preserve backwards compatibility and be dynamically linked. staticGeos would be available for SwiftUI Previews use cases.
The text was updated successfully, but these errors were encountered:
When previewing a module that links against
geos
SwiftUI previews will fail to link withCannot preview in this file
andUpdate failed
. Tapping on the diagnostic icon reveals a dynamic linker failure at runtimesee
Library not loaded: @rpath/geos.framework/geos
When I disable dynamic linking in
Package.swift
the package still builds successfully and SwiftUI previews work again.Is the reason for
.dynamic
linking of the upstreamlibgeos/geos
C++ codebase solely for the LGPL license requirements? If so, it should be possible to create astatic
version of the library for the simulator while maintainingdynamic
linking when not targeting the simulator.The c++ code could be moved into a
common
module and two new modules be createdgeos
andstaticGeos
. Both new modules would depend oncommon
,geos
would preserve backwards compatibility and be dynamically linked.staticGeos
would be available for SwiftUI Previews use cases.The text was updated successfully, but these errors were encountered: