When a Dropbox user connects to a single folder Dropbox app (let's call it Foo), Dropbox creates a new app folder like so:
Dropbox > Apps > Foo
If the user changes the name of folder Foo to something else, will Foo (the app) still be able to access its contents?
I haven't been able to find documentation about what happens when a user renames an app folder. From my own testing, everything seems to still work but I'd like confirmation.
Yes, if the user renames the app folder, the app will continue to work and be able to access the contents of the app folder. The app won't even know about the change, and doesn't need to do anything special to handle it. (This is much like how a user can rename a shared folder: https://www.dropbox.com/help/64 )
Related
For reasons that I'm not gonna go into, I have one computer that I can install OneDrive but not Dropbox, and computer that I can install Dropbox but not OneDrive.
With that in mind, is it possible to have a folder that is shared between the two services and that updates automatically when changes are made. I.e., if I change a file within the shared folder in Dropbox, the changes automatically get updated on the same folder in OneDrive, and vice versa.
Thanks.
So I have a sandboxed app, which allows users to drag and drop files from Finder onto a project window.
I would like to use these files from their existing location, ie by reference, rather than copy them to a project folder, as the user may have a large existing library of files.
While the app is running, these files are fully available for reading. (They are .mp4 and I can preview them in an AVPlayer view).
When I save the app's project, I include the NSURL of the files.
When the app restarts and re-opens the project later, the files are not available and Console shows deny(1) file-read-data - which means the file is not reaable. (Access denied).
Presumably this is because the files are out-side of the sandbox. Yet, they were readable when dropped onto the app. Looks to me like the app sees them as "user selected" when first dropped on, and so they are readable, but on the next session because they are loaded from NSCoder as NSURLs they are not considered user-selected and therefore become unaccessible!
My app currently has these entitlements:
com.apple.security.files.user-selected.read-only
com.apple.security.files.user-selected.read-write
Is there soemthing I need to do with entitlements etc to allow the re-loading of files later?
When the file is first dropped you need to create and save a security scoped bookmark which you can the use on a subsequent app launch to regain access to the file. Read Security-Scoped Bookmarks and Persistent Resource Access in Apple's App Sandbox in Depth.
Hey friends I came up with the question today that I have a window where I am adding users selected folder in my app from NSOpenSavePanel. I was accessing all the files and folders properly but as soon as I quit my app I am not able to open those folder because when I am giving path to open those files or folders it is showing pop up You don't have permission to access this folder
I saved BookMark data to my app's preferences and now it is working fine.
The question was ; What exactly is happening ?
Looking forward to you.
The reason for this is the App Sandbox. The idea is that the user controls to what files an app has access.
For a one time access everything is handled for you. But if you want keep access across launches of your app you need to store and restore a bookmark.
You find all details about this in: Security-Scoped Bookmarks and Persistent Resource Access
I was wondering if it is possible to make a new file inside the existing application? Now i am using:
[filemgr createFileAtPath: #"newFile.txt" contents: data attributes: nil];
But I think I have to change the path to something else. Anyone knows?
This is not a good idea. If the app is installed at /Application/ then only admin users launch the app will be able to write that file. (Never assume users are admins!)
The application might also be on read-only media.
If might also interfere with digitally signed applications though I'm not sure. Changing a file within the bundle means the app has changed, which is essentially what digital signatures want to avoid. (Don't mess with application bundles)
Instead, you should save a file on ~/Library/Application Support/<yourApplicationName>/.
Read File System Programming Guide.
I am wondering if there is a way in objective c to have my iPad app copy a file in it's documents folder to another app's documents folder and have that app open the file for editing and finally copy the file back to my documents folder. Or better yet, can I have another app open a file from my documents folder, edit the file, and save it back to my documents folder?
So far I know I can have another app open a file in my documents folder but the app that I'm handing the document off to seems to be making a local copy and editing the copy. I also know that each app's document folder is a shared folder that users can drag and drop stuff from itunes but I'm not sure if the same can be done in code.
I am pretty sure what you are trying to do is impossible. iOS applications are "sandboxed" which means that each app has its own documents directory. No application has access to the file system outside its own "sandbox" i.e. outside its own local documents directory.
For more on the iOS application sandbox, Read here.
Though a sandbox exists, I found a way to work around it (it's a trick being used by other File Manager apps like GoAruna). I would first register my app as an app that can open the type of files that I plan to work with. Then I use the Open In functionality to have my users open up my apps local documents in the second app, an app like iAnnotate. Then, because my app is registered as an app that can open the current file type, I can instruct my users to use Open In from iAnnotate to move the modified document back to my app. Sorry but I could not accept "no" as an answer. If anyone is interested in this approach, go here
If your iPad is jail broken, try this:
On the app iFile, type in the document name in the search box located at the top. Once you find the document, click on it and options would be showed to you. From here you can choose the app you want to open the file with.
Hope this helps.