property absoluteRect is removed on app v97.

Today I updated to beta version 97 and property absoluteRect is removed.
How to fix it.
And I can not export header files from class-dump.I try to dump header and check other version.Only beta version can not dump.

This is my class-dump version. https://github.com/NSGod/class-dump

If you’re talking about -[MSLayer absoluteRect] then the following function would be a decent replacement:

function absoluteRectForLayer(layer) {
    // NOTE: the code below assumes that `layer` is anything but MSPage instance
    let parent = layer.parentObject()
    let relativeRect = layer.frame().rect()
    return parent.convertRect_toCoordinateSpace_(relativeRect, /* to absolute/page coordinates */nil)
}

For -[MSLayer absoluteInfluenceRect] see a sibling topic: absoluteInfluenceRect removed in Sketch 96.

1 Like