After my recent adventures with saving and restoring folders in Catalina in https://forum.xojo.com/54254-wwdc-gotchas-for-xojo-developers something occurred to me: in the Sandboxed version of my application I still use my standard code for saving and restoring folderitems. Here is the restoring code:
Dim theCFObject As CFObjectMBS = theCFPrefs.CopyAppValue(NewCFStringMBS(fieldName), theCFPrefs.kCFPreferencesCurrentApplication) if theCFObject = Nil then Return nil dim theFolderitem as FolderItem if theCFObject.TypeDescription = "CFString" then dim FieldValue as String = CFStringMBS(theCFObject).str theFolderitem = Volume(0) dim theSaveInfo as String = DecodeBase64MBS(FieldValue) return theFolderitem.getRelative(theSaveInfo) end if
I double-checked that this works fine when the app is Sandboxed. Is this something that should work? Will this continue to work in the AppStore? Should I change this to using security scoped bookmarks?