Post

Replies

Boosts

Views

Activity

Reply to Customize message for NSWorkSpace.requestAuthorization?
Of course, you are correct. I'm using Xojo and the code is a bit different. I have a class to remove files. It gets the authorisation and the uses Filemanager with authorisation to delete some files: Private Property theFileManager As NSFileManagerMBS Public Sub Constructor(hasAppName as String, hasAuthorization as NSWorkspaceAuthorizationMBS, doRegistration as Boolean) AppName = hasAppName myAuthorisation = hasAuthorization theFileManager = NSFileManagerMBS.fileManagerWithAuthorization(myAuthorisation) DeleteApp if doRegistration then removeRegistration End Sub And Delete App: AppFolder = SpecialFolder.Applications if AppFolder <> nil and AppFolder.Exists then AppFolder = AppFolder.Child(AppCommon.getInstallationAppName) if AppFolder = Nil or not AppFolder.Exists or not AppFolder.Directory then Return dim theError as NSErrorMBS dim theResult as Boolean = theFileManager.removeItem(AppFolder, theError)
Jun ’23