![]() That’s why I don’t use Cookies on these webpages and don’t have any sort of tracking mechanisms implemented in any of my apps. I am not interested in anyone’s data (personal or otherwise), usage patterns, or anything else like that. It's an edge-case, but it's still something I'd like to solve to be on the safe side.My name is Matthias Gansrigler, I’m the developer and owner of Eternal Storms Software. Generally speaking, it's a limitation only if 5,000 files are actually inside Yoink at one time. It doesn't work for external disks' trashes, and I do not have permission to watch those inside the sandbox (I tried). It works, but only for the boot hard drive. I tried, instead of watching the files themselves if they're moved to the trash, watching the Trash and, if the Trash changes, see if it's one of Yoink's files that's in there. I'll have to find a more efficient way for that.ĭiscarding the dispatch_sources and polling the NSURL's filePath (to see if it's in the Trash) would be an alternative, but I really, really do not want to do that. The actual culprit was not the amount of bookmarks or NSURLs added to the sandbox, but the dispatch_source for vnodes I create for each NSURL added so I can track if they're renamed or are moved to the Trash/deleted. "Seems impractical that a user would want to drag 5000 files there, but I guess it could happen (and since you are asking, I'm assuming it did)."įor me, it wasn't really about having 5,000 files in Yoink at once, but that over the course of the app's session, those 5,000 items could be reached altogether (over several days or weeks) and then the app would stop working (which, before I make the switch to bookmarks with the next update, is happening).īut again, I thought about it the wrong way. No, I only start accessing those resources when needed, so I don't access all 5000 at the launch at once, only when scrolling through for creating QL previews, update their filenames, etc. "On relaunch, you attempt to go through all 5000 bookmarks and and start accessing the security scoped resources on them so you can show the files in your UI." Seems impractical that a user would want to drag 5000 files there, but I guess it could happen (and since you are asking, I'm assuming it did). I don't have your app, so I don't know how it works exactly, but I've heard of it (congrats). Not sure if that is "the limit", meaning you can't have more than 5000 bookmarks or you can't access more than 5000 bookmarks at a given time.someone with the fruit badge may be able to give you an answer. Are all 5000 files on screen at once? If your UI has some sort of 'paging' to it, you could ensure that you are only accessing X number of bookmarks at a given time. On relaunch, you attempt to go through all 5000 bookmarks and and start accessing the security scoped resources on them so you can show the files in your UI. So the user adds a file, you create a bookmark for it and save it to disk. They could reject you I guess, but that seems like a better approach than having to potentially create thousands of bookmarks. ![]() I have a couple of apps downloaded from the Mac App Store that ask for this. >That seems like something Apple would reject pretty quickly. >"Why don't you just ask the user for permission to the home directory on first launch" After that, maybe some 200 more files can be added, but after that, the sandbox can not consume the extension or something like that (it's the error I get). I tested it by 10x dragging 500 different files to the app. It takes a while until you get to the 5,000 file limit, but when you do, there's nothing that can be done aside from a restart to make the app work again. Move the files out of Yoink (files disappear from Yoink, bookmarks discarded) Add two files to Yoink (bookmarks created) Move the file out of Yoink (file disappears from Yoink, bookmark discarded) So the flow would be something like this: ![]() That seems like something Apple would reject pretty quickly.Īlso, usually, there's less than 5,000 files inside the app at any given time, so the bookmarks are obviously cleaned up when the files are no longer needed inside my app. "Why don't you just ask the user for permission to the home directory on first launch"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |