2

I am not referring to traditional symlinks in general, but specifically to the "alias" files used within iCloud Drive. I am also not referring to "stub" files that indicate that a file has not yet been downloaded from the cloud. These are specialized macOS alias files (yes, aliases) that point to files elsewhere in iCloud Drive. They're the files mentioned in this Apple discussion forum thread.

When a file in iCloud Drive is opened with an application, an alias (i.e., a file that "points" back to the original) is created in the iCloud Drive folder corresponding to the application used to open the file (unless the file is stored in that app's folder). For instance, I created a Keynote presentation called Intro to Git and stored it in ~/Documents (which corresponds to ~/Library/Mobile Documents/com~apple~CloudDocs/Documents in the iCloud Drive hierarchy). I then opened it in Keynote. The original file stayed in ~/Documents; however, an "alias" was generated and stored in Keynote's iCloud Drive folder (~/Library/Mobile Documents/com~apple~Keynote/Documents, or iCloud Drive > Keynote in Finder).

When I view the file in ~/Documents, it looks like this:

File in Documents folder

In other words, the original file is stored in Documents. However, within the Keynote folder, there is an alias file generated by iCloud Drive (note the in Documents text, indicating that this is not just a regular alias, but one automatically generated by iCloud Drive and detected by Finder):

Alias in Keynote folder

Having these aliases is particularly convenient, as it creates a single location from which I can open various documents editable in a certain application that may be stored throughout my iCloud Drive file system. However, I cannot seem to trigger the creation of aliases for several new spreadsheets I have made, all of which are stored in iCloud Drive but not in the Numbers folder. I've tried adapting the strategies mentioned in the PDF Viewer and MindNode support documents on this topic (Apple has none), including opening the documents in Numbers on both Mac and iOS, to no avail. Based on what those documents say, it seems that the alias should automatically created when I open the document in Numbers for the first time, but that is not the case.

I do not want to create a regular file alias in the Numbers folder (which I could do by holding command and option while dragging, or using Make Alias). Instead, I would like to trigger the generation of an iCloud Drive-specific alias (such files' actual names follow the format .########-####-####-####-############.alias, where each # represents a hexadecimal digit) in the Numbers iCloud Drive folder. How can I accomplish this?

I'm running macOS High Sierra 10.13.6 and iOS 11.4.1. I'm using the latest versions of Numbers and Keynote on both as of the time of writing, but this is not an application-specific question.

Edit: A hexdump of both the specialized iCloud alias and a regular alias to the same file indicate that these iCloud aliases are more than just a special file name—they also contain additional information. Specifically, there's an additional section in the alias file following the text NSURLDocumentIdentifier, which contains docs.icloud.com:com.apple.CloudDocs/[hexadecimal string]. There's also a _NSURLParentDirectoryIDKey that doesn't exist in the normal alias file. Moreover, these iCloud aliases are readable by iOS devices—normal alias files (for obvious reasons—they're pointing at a file on the Mac's local file system) aren't readable on iOS.

  • Let’s give these a name other than alias. I haven’t looked at the documentation extensively, but you may need to just create the files using iCloud Drive and then troubleshoot why your Mac can’t bring down the proper sync / stub files, but’s let’s assume what you Ask is technically possible and clean up the terminology – bmike Sep 16 '18 at 16:57
  • @bmike I'm not referring to the iCloud Drive stub files that indicate that a file has yet to be downloaded. I am instead referring to files that are generated when a file is opened in a specific application once the file has already been downloaded. – aaplmath Sep 16 '18 at 16:59
  • Oh. Those have a name, that’s the recents folder and recent opened documents? Go ahead and edit the question again - in this case a picture might let you edit 1000 words from the question. Calling it an alias may send people down the wrong path – bmike Sep 16 '18 at 17:05
  • 1
    The fact of the matter is, they exhibit every characteristic of other macOS “aliases.” It’s what Finder calls them; it’s how Finder treats them (e.g., the “Show Original” menu option); it’s the term every company with documentation I could find uses; it’s the file extension they use. I’ll use ls to double-check, but I think they are, in fact, aliases—just with special properties. – aaplmath Sep 16 '18 at 17:45
  • 1
    @Allan They are actually aliases. – aaplmath Sep 16 '18 at 19:05

You must log in to answer this question.

Browse other questions tagged .