But it says that the other type of Security-Scoped Bookmark document-scoped bookmark is meant to be embedded in a document. The documentation does not say anything about it. 12:57:43.552932 macXYZZ writeBookmarkData ERROR errorDesc:Error Domain=NSCocoaErrorDomain Code=512 "The file couldn’t be saved. Is it possible that an admin creates an app-scoped bookmark for the macOS sandbox which is then distributed to all users, so they can access the referenced file location. 12:57:43.551786 macXYZZ ready to: writeBookmarkData to URL:file:/Users/steve/Library/Containers//Data/Library/Application%20Support/macXYZZ/aliases/rtfAlias 12:57:43.551668 macXYZZ ready to: writeBookmarkData bookmarkCreationOptions:4096 12:57:30.326348 macXYZZ bookmarkDataWithOptions SUCCESS errorDesc:(null) 12:57:24.525621 macXYZZ ready to: bookmarkDataWithOptions bookmarkCreationOptions:4096 08:44:51.655697 macEnact usedAttibutes: else ERROR ** NO DATA RETURNED ** debugDescription]) 08:44:51.655558 macEnact readFromURL SUCCESS errorDesc:(null) 08:44:51.654555 macEnact documentRTFURL: file:///Users/steve/Documents/Untitled.rtf setURL:nil 08:44:51:654 macEnact rURL: file:///Users/steve/Documents/Untitled.rtf Self.attributedRTFString = initWithString:tString_] If((myBool=NO)&(myError=nil)) SUCCESS STALE:%hhd debugDescription]) Įlse if((myBool=YES)||(myError!=nil)) ERROR STALE:%hhd debugDescription]) MyBool= options:bookmarkCreationOptions error:&myError] If(myError!=nil) ERROR debugDescription]) Įlse SUCCESS to: writeBookmarkData bookmarkCreationOptions:%ld",bookmarkCreationOptions) MyData = [self.documentCurrentURL bookmarkDataWithOptions:bookmarkCreationOptions If(myError!=nil) ERROR: to: bookmarkDataWithOptions bookmarkCreationOptions:%ld",bookmarkCreationOptions) Self.attributedRTFString= initWithString:kMacEnactEmptyString] NSURLBookmarkResolutionOptions bookmarkReadingOptions = (NSURLBookmarkResolutionOptions)(NSURLBookmarkResolutionWithoutUI|NSURLBookmarkResolutionWithoutMounting|NSURLBookmarkResolutionWithSecurityScope) How do I go about understanding what is wrong? NSURLBookmarkCreationOptions bookmarkCreationOptions = (NSURLBookmarkCreationOptions)NSURLBookmarkCreationWithSecurityScope Yes I have: -sandbox=true in my entitlements file I can do this AS LONG AS I do NOT use 'NSURLBookmarkCreationWithSecurityScope'. I can successfully use the code below to write a bookmark at the same location that behaves as expected. The app is a UIDocument based app, the code below is in a UIViewController that display the document.New macOS app trying to allow user access to files they opened with NSOpenPanel at a later date | sessioin. On iOS (14/15) I'm trying to pass security scoped bookmarks to user picked files on iCloud Drive between devices but whatever I try: I cannot get urls to be restored on another device running the same app.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |