Is there a way to manually offload files to iCloud Drive? - macos

TL;DR: I have a small internal hard drive and a 2TB iCloud Drive. I want to have access to all my files (iCloud), but I don't want all of my files on my computer.
In macOS (since Sierra I believe) Apple included a features where you can have your Desktop and Documents folders synced to in iCloud Drive, and if you enable it, when your drive fills up, macOS removes local copies of those files and replace it with a little placeholder.
I'm wonder if there is a way to pick and choose what files get offloaded to iCloud this way and when. Let's say I just added a file to my Documents folder that I want to keep, but I have no intention to use it for a while, so I just want it to sync to iCloud then replace the local copy with the placeholder, instead of waiting for my drive to fill up and then have macOS auto offload files for me.
Also, it would be nice to have more than just Documents and Desktop offloadable, but I'm guessing Apple doesn't expose that much functionality in their SDK that I could write an app to do that.
I currently don't develop in any Apple approved languages (Swift & Obj-C) but if there is a way to create an app with this ability to offload files to iCloud Drive I'll deep dive into the language to scratch this itch.
Note: I know I can store any file I want in iCloud Drive by dragging a file into the iCloud Drive icon in the Finder, but to my understanding, these files require a local cache of the file and not this placeholder method that Documents and Desktop folder syncing uses. If there is a way to offload through the customer facing iCloud Drive access in the Finder I'm open to that method too.

Within macOS Catalina this can now be done by right clicking the file/folder and clicking "Remove Download"

For those who cannot upgrade to macOS Catalina, you can simply turn off the iCloud drive in system preferences and then manually upload and download your files via icloud.com. May seem a little tedious, but doing things this way is intuitive enough that you shouldn't make any mistakes moving/locating your files.

Related

How to create a dmg file for a .app for mac.?

I am a developer of iOS, and developed a mac app. Now I want to distribute my app so that a searched for it and found that we need to upload .app to Mac App Store it looks fine. While for self distribution we can have three options:
is to share our app
is to create .dmg file
is to share .pkg file (Package Maker).
In pkg file my client want to install app without introduction, read me as well as license agreement, I removed the license and readme but unable to remove introduction section. Please help me out from hereā€¦
Thanks in advance
If you dont need any introduction, readme etc, the best option is to create a DMG.
You don't need any external tools for this.
Copy your app to a new folder.
Open Disk Utility -> File -> New Image -> Image From Folder.
Select the folder where you have placed the App. Give a name for the DMG and save. This creates a distributable image for you.
If needed you can add a link to applications to DMG. It helps user in installing by drag and drop.
How to create a dmg file for a .app for mac.?
It's a subjective issue, but .dmg's are a good and popular way to distribute the apps - user double-clicks, drags app, ejects just as they would a USB stick, done.
You can get apps to help you build them, but its not too Hard with Disk Utility, you just need to mess around a little to make it look nice. Here is one way to do it:
Use Disk Utility to create a new empty sparse bundle disk image
Double-click the image to open it.
Copy your app into the image.
Make a link to /Applications in the image.
Hide the toolbar/sidebar/etc. as desired.
Using View Options set to always one in icon mode.
Also add a background image if you like using View Options. Background images often contain text such as "Drag App to Application". Layout the app and /Applications icons to match your background image.
In another Finder window eject the sparse bundle.
In Disk Utility use Images -> Convert... to convert the sparse bundle to a read-only DMG
HTH
I strongly recommend DMG Canvas . For a very modest price, it allows you to create a professional looking dmg, with a license agreement and every other common feature.
I'm not affiliated in any way with the software, just a long time user.

Sync Desktop with Dropbox - Symlink

I tend to work almost entirely off of my desktop, and I'm attempting to simplify my workflow. I want to sync my Desktop between my Work iMac and my Mac Mini at home.
I've sucessfully synced my Home computer's Desktop TO a Dropbox folder (So in Dropbox I have a /Dropbox/Desktop/ directory)
Now, what I want is to have the contents of this Dropbox directory on my Work computer's Desktop.
I've succeeded at making a symlink on my Work computer to the Dropbox folder, BUT, it simply appears like a shortcut. In other words, my work desktop has a icon that links to my Dropbox. I want my Work desktop to BE the (dropbox/desktop) folder.

Write folder in Mac OS X with sandbox active

I created a small application in Xcode with Cocoa Desktop and this application has to create a folder in the current user's desktop Mac OS X
When I run the application without using the app creates a sandbox folder properly on desktop
If I use the sandbox putting right files for read / write I can not create a folder on the desktop
Does anyone know how to solve this as to send the application to the AppStore is necessary to use sandbox?
You shouldn't just create a folder on the desktop, regardless of whether you are using the sandbox or not. Instead use NSOpenPanel configured to select folders and ask your user to provide you either a folder to use. That is compatible with both open and sandboxed apps.
In the sandbox world once you've asked the user for a folder you can create a security scoped bookmark and save it in your apps preferences; on subsequent runs you can use that bookmark to re-establish rights to access the folder without user intervention. E.g. a browser might ask once for access to a folder to store downloads and then save a security scoped bookmark to that folder.
HTH
For some applications it just better to use some directory as default directory (Eg. Mail and Firefox uses Downloads as default directory). I guess this is your case. But, for better user experience (and for higher chances of your App's acceptance in AppStore) follow best practices - like avoiding direct Desktop access. And, mostly you will find the answer yourself if you go through these guides:
App Sandbox Design Guide (https://developer.apple.com/library/mac/documentation/Security/Conceptual/AppSandboxDesignGuide/AboutAppSandbox/AboutAppSandbox.html)
Entitlement Key Reference (https://developer.apple.com/library/ios/DOCUMENTATION/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html)

Windows: suppress warning when plugging in unformatted flash drive

I'm working on a device that writes some information directly to a flash drive, without using any file system (it just writes blocks of data directly to the disk sectors). After the flash drive is filled, I need to plug it into any computer with windows and read data using my application.
Everything works great except for when I plug the flash drive in windows warns me that flash drive is invalid an offers me to format it. I want to get rid of this message for my flash drives on any computer that have installed my windows application.
My flash drive have signature bytes at the start so I can always make out whether it's my flash drive or just a regular flash drive.
My idea is that I should be able to write some sort of service or driver which will check all flash drives and will disallow OS to mount my drives. However I don't know whether its really possible and I can't find any documents mentioning this sort of functionality.
I'd appreciate any docs / links / functions names that can help me suppress unformatted disk warning.
Make a tiny real partition at the start and format it to keep windows happy.
Then just use the rest of the drive as you please
This seems to work:
Remove the drive letter assigned to the device:
Right-click the 'Computer' (or 'My Computer') icon on your desktop or in the Start Menu and select Manage. The 'Computer Management' window should appear.
From the list on the left, select 'Disk Management' (within the Storage sub-tree).
Right-click the encrypted partition/device and select Change Drive Letter and Paths.
Click Remove.
If Windows prompts you to confirm the action, click OK.

iOS4 accessing the DCIM folder

I would like to read/write to the DCIM folder.
I was able to perform this operation under 3.1.3, but it fails under 4.0. Has the actual location been moved within the iPod directory tree?
Previously it was located at:
/var/mobile/Media/DCIM
I do not have a jailbroken 4.0 machine, so I cannot find the true location of the DCIM folder.
Did apple close the exploit of being able to write to the location from any application, or did they move it to another location??
This feature was removed for security reasons.
It allowed apps to see your GPS location from photos in the folder.
To be straight, now there is virtually NO way to access the user's photos apart from the UIImagePickerController? Even if I don't want to submit an app featuring these functions to the AppStore?
I can read out all of the thumbnails on my iPhone 4, but not the DCIM...

Resources