Intercept Undo Redo in MobileTextArea

OK, I found this from jim_mckay, but I have no idea how to update it for iOS in 2022. It kills all undos, so I can roll my own. Does anyone know how to update this Declare?

jim_mckay

Declare Function undoManager lib “Cocoa” selector “undoManager” (obj_ref as ptr) as ptr
Declare Sub removeAllActionsWithTarget lib “Cocoa” selector “removeAllActionsWithTarget:” (obj_ref as ptr,target as Ptr)
Declare Function documentView lib “Cocoa” selector “documentView” (obj_ref as ptr) as Ptr
Declare Function textStorage lib “Cocoa” selector “textStorage” (obj_ref as ptr) as Ptr

dim docView As ptr=documentView(ptr(TextArea1.Handle))
dim textStor As ptr=textStorage(docView)
dim undoMgr as ptr=undoManager(docview)
removeAllActionsWithTarget(undoMgr,textStor)

From this old thread here: