I'm getting dynamic link errors (crashes) when running my app on pre SwiftUI 2 targets (in particular Mac OS 10.x) - error: dyld: lazy symbol binding failed: Symbol not found: _$s7SwiftUI15ScrollViewProxyVMa.
(My app targets macOS 10.15 onward - SwiftUI 1+).
I'm trying to use the new ScrollViewProxy (v2 to support automated scrolling of lists) and have this included in a class using the available attribute as per below:
@available (macOS 11, *)
final class ScrollingHelper {
private var proxy: ScrollViewProxy?
I have conditionals elsewhere that only instantiate the class if running on v11. eg. If #available (macOS 11, *) to call a function with the header: @available (macOS 11, *), this called function uses the class. The app runs fine on v11.
The linking error on pre v11 targets can be prevented if I simply comment out the declaration of the proxy in the ScrollingHelper class.
I want a single version of the app that can be deployed to v10 or v11 targets with the new v11 feature used at runtime (on v11 targets), however this dynamic linking problem has me stuck. I hope I don't need to drop support for pre v11 :( Please help.
(My app targets macOS 10.15 onward - SwiftUI 1+).
I'm trying to use the new ScrollViewProxy (v2 to support automated scrolling of lists) and have this included in a class using the available attribute as per below:
@available (macOS 11, *)
final class ScrollingHelper {
private var proxy: ScrollViewProxy?
I have conditionals elsewhere that only instantiate the class if running on v11. eg. If #available (macOS 11, *) to call a function with the header: @available (macOS 11, *), this called function uses the class. The app runs fine on v11.
The linking error on pre v11 targets can be prevented if I simply comment out the declaration of the proxy in the ScrollingHelper class.
I want a single version of the app that can be deployed to v10 or v11 targets with the new v11 feature used at runtime (on v11 targets), however this dynamic linking problem has me stuck. I hope I don't need to drop support for pre v11 :( Please help.