Open AndriiHanets opened 1 month ago
Hello @AndriiHanets,
Thanks a lot for reporting this issue. We're currently working on investigating it and hopefully a hotfix will be released soon. Please keep the feedback coming.
For now to unblock yourself, you can just add:
override init(layer: Any) {
super.init(layer: layer)
}
to your custom layer and this should take care of that.
The root cause of the problem is that Clarity depends on presentation layers to capture ongoing animations. The presentation()
function internally makes use of the initializer that takes a layer as an input. Now on the Swift side, if you provide one initializer, your class does not inherit the rest of the super class initializers, hence the missing initializer error.
SDK version 1.0.0
Example code
Crash logs: App/CustomGradientLayer.swift:11: Fatal error: Use of unimplemented initializer 'init(layer:)' for class 'App.CustomGradientLayer'