Im currently writing a Sketch Plugin.
I'm doning something like this:
fill.setFillType(4);
fill.setPatternImage( imageData );
fill.setPatternFillType(1);
The console Outputs: setPatternImage: is deprecated. Use setImage: instead with MSImageData «Scripting Legacy»
How can I solve this? This cause a crash.
fill.setImage( imageData )
Thanks in advance.
Did you look at sketch-headers about new version? https://github.com/abynim/Sketch-Headers
you can change your codes like, if you'd like to build a plugin which supports all versions:
firstly you need to catch your sketch version as a variable.