Digging Deep into iWork Document Sharing in Mountain Lion

| Ted Landau's User Friendly View

If you use Apple’s iWork apps, and you sync documents across multiple Macs and iOS devices, get OS X Mountain Lion. Now. It’s okay; I’ll wait till you get back. 

Got it? Good. Now let’s talk about why you’re about to be overjoyed.

Last Wednesday, along with Mountain Lion, Apple released updates to the Mac versions and iOS versions of iWork. With this trio of updates installed, any changes you make to an iWork document one device are “instantly available” on the others (a feature I previewed in a Macworld article last month). This is a huge improvement! Prior to this (as I covered in another Macworld article), such instant iWork syncing was impossible. In fact, syncing iWork documents, especially between Macs and iOS devices, was so clumsy and limited that it was just about not worth the bother.

Until last week, one big unanswered question remained: Would this new file sharing method really work as well as Apple’s advance publicity indicated? We can now answer this question. The short answer is…yes! It works. It works very well, amazingly well. It’s not perfect, but it’s darn close.

Getting what you need

To access the new file sharing features in iWork, you need Mountain Lion. Although the iWork app updates run in Lion, the new options covered here only show up in Mountain Lion. You also need to enable iCloud on all the devices that will be sharing documents (for more information on saving documents in Mountain Lion, including via iCloud, see my previous User Friendly View column).

If you already own iWork on your Mac, the updates are free. One minor note: You may have previously purchased iWork apps either from the Mac App Store or from outside the Store. If you have the former, get the iWork updates from the Mac App Store. For the latter, use Software Update from the Apple menu.

In Mountain Lion, both routes wind up going through the App Store app to do the downloads. However, if you have the outside-the-Store versions, this does not mean that you now own the App Store versions. You don’t. That’s why, for example, if you check the Purchases list in the App Store app, your iWork apps are still not listed.

Don’t worry, the iWork apps are the same no matter what their source. There is no reason to replace (at an added cost!) an outside-the-Store version with an App Store version. It is worth noting, however, that the outside-the-Store versions represent an exception to Apple’s “rule” that only apps sold from the App Store can access iCloud. I guess, as Apple makes the rules, it can also break them.

Sharing iWork documents

Once I had everything in place, I was ready to test drive the new sharing features. For my first test, I created a document in Pages on my Mac and saved the document to iCloud.

Saving a Pages doc

Saving a new Pages document from my Mac to iCloud.

Next, I launched Pages on my iPad, which is linked to my same iCloud account. Sure enough, the document I had just created on my Mac was now in the Documents list on my iPad. I tapped the file’s icon and it opened.

Opening Pages on an iPad

The icon for the just-saved Pages document (Pages Test, in upper left) shows up on iPad.

At this point, any changes I made (and saved) to the document one one device were almost immediately reflected in the document on the other device. [Note: As Pages for iOS does not have a Save command, I closed a document to save it.]

Especially impressive is that if the same document is open on both devices, and I make a change on one device, I can watch the change appear on the other device while simply staring at the screen. Very slick — and exactly as Apple promised this would work.

Similarly, if you are viewing an iWork app’s Documents list on the iPad or an Open dialog on a Mac, you can see a progress bar move across a document’s icon after making a change to the document on the other device. This is the indication that the document is getting synced.

If you have ever struggled with syncing iWork documents before, this is the equivalent of a glorious sunrise after a long and dark night.

Dealing with conflicts

Next, I wanted to know how the iWork apps would deal with document conflicts. That is, what would happen if I made different edits to the same document on two different synced devices (Mac and iPad, say) at about the same time? Would the iWork apps be able to figure out what I had done and know how handle it without getting messed up? 

The answer is: Yes. When this happens, a Resolve Conflict dialog pops up, telling you that “Modifications aren’t in sync.” From the dialog, you can choose which document you want to keep. You can even select to keep both, in which case two separate documents are created. Cool! 

Resolve Conflict

iWork’s Resolve Conflict dialog.

Sharing and syncing via iWork at iCloud.com

Prior to Mountain Lion, the best way to share (and, in some manner, sync) iWork documents among devices was via the iWork section of iCloud.com (as I’ve covered previously). With Mountain Lion, the iCloud.com interface becomes superfluous. The iWork section still exists, but presumably only for the benefit of those poor souls not yet running Mountain Lion.

Peering inside the Mobile Documents folder

Copies of all documents stored in iCloud are automatically locally stored on your Mac. You’ll find them in the Mobile Documents folder, located inside the invisible Home directory Library folder (to get here, hold down the Option key and select Library from the Finder’s Go menu). Every Mac app that supports iCloud document storage has its own folder here. For example, Pages’ folder here is named com~Apple~Pages. Page’s currently-stored iCloud documents are inside this folder. 

On iOS devices, apps that sync with iCloud similarly store their documents in a Mobile Documents folder, although you can only see this if you jailbreak your device. For example, using PhoneView to view the contents of my jailbroken iPad, I navigated to User>Library>Mobile Documents>com~Apple~Pages>Documents. Here I found local copies for all the iCloud-stored documents seen in Pages’ Documents list. That’s why I can open these files on my iPad even when in Airplane mode, with no connection to iCloud. [Note: In its iCloud developer documentation, Apple refers to the Mobile Documents location as an app’s out-of-the-sandbox “ubiquity container.”]

You can turn off iCloud syncing separately for each iOS iWork app. To do so for Pages, for example, go to Settings>Pages and disable the Use iCloud option. If you do so, the next time you launch Pages, a message appears prompting you to choose what to do with the saved files. If you choose “Keep on My iPad,” they will be moved from the Mobile Documents location to within the Pages app itself — “sandboxed” in Pages.app>Library>Application Support>Documents.

When iCloud is off

If you turn Use iCloud off (in the Settings option shown on left),
the dialog on the right appears the next time you launch Pages.

Apple would prefer that you stay away from the Mobile Documents folder (unless you’re planning on getting rid of your Mac). However, I have found working with the folder to be fairly robust. For example, if I dragged a Pages document from my Desktop to the Pages section of the Mobile Documents folder, the file soon appeared on my iPad. In almost all my testing, OS X, iOS and iCloud handled my hammering very well — doing more-or-less what I would have hoped.

Dealing with document incompatibilities

Even with these latest updates, the iWork apps on iOS devices still do not support the full range of features and document attributes available via their Mac siblings. This means that, when importing a document from a Mac to an iOS device, some attributes may get stripped out of the document. For example, in Keynote, you’ll find that comments are not imported, certain fonts are not supported, and some transitions are dropped. When this happens, you should see an Import Warning message on your iOS device, informing you exactly what is about to get removed.

Import Warning

iWork’s Import Warning dialog on an iPad.
Oddly, despite this warning, my iOS Keynote document retained its Shimmer transitions.

In addition to the Import Warning, a related message may show up in the latest iWork for iOS apps. The new “Open Document” message typically appears when first opening a document that originated on a Mac. The message appears even when the Import Warning message does not pop up. It thus indicates a more general formatting concern. The message states that the “document may look different on your iOS device than on your Mac.” It allows you to choose either to open the document or make a copy of the document.

[Note: You can bypass this warning, and forgo the opportunity to open up a copy, by going to Settings > Pages (or Keynote or Numbers) and turning off “Ask to Open Copies.”]

iWork’s Open Document warning on an iPad.

What’s the effect of opening the original document vs. making a copy? If you chose to open the document directly (and make any changes to it), the document is converted to an iOS compatible format (as detailed in the next section) — and this same format change is synced back to iCloud. This means you may lose certain unique attributes of the Mac version. However, I didn’t detect any visual differences between the iOS and Mac versions in my testing. Mainly, the message appears to be a generic warning that things “may look different” after the conversion. If you instead chose to make a copy, the original remains unaltered while the copy is converted to the iOS-compatible format.

After a document has been converted to the iOS format, the “Open Document” warning should no longer pop up when you next select to open the document. However, if you later edit the document back on your Mac, which reverts it to the Mac format, the warning will return on your iPad. Given this see-sawing of formats, it’s probably wise to minimize the number of times you shift back and forth between the Mac and iOS platforms for editing a document.

Understanding iWork file formats

 

This is your last chance. After this, there is no turning back. You take the blue pill - the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill - you stay in Wonderland and I show you how deep the rabbit-hole goes. (Morpheus, in The Matrix)

 

If you’re not especially familiar with the nuances of iWork documents, you may be wondering at this point: Why does syncing iWork documents have all of these complications? Why isn’t it as simple as syncing documents from most other apps? The answers require digging deeper into the workings of OS X and iWork apps. If that’s not your cup of tea, feel free to stop here.

Mac vs. iOS file formats. The key point (as I indicated above and explained in detail in yet another Macworld column) is that iWork documents for Macs and iOS devices have separate formats. It’s not just that an iOS iWork document may be missing some Mac-only features; the two files are actually different types of documents. I’m not sure why Apple felt it was necessary to do this, but they did. Almost all the other complications derive from this initial decision.

For most apps that have versions on both platforms, their documents typically can be equally well opened on Macs and iOS devices. Such is not the case for iWork apps.

You cannot open a Mac-formatted iWork document on an iOS device. It must be “imported” first. Importing a Mac iWork document to an iOS device doesn’t simply copy the document to the iOS device, it converts it to the iOS format.

Similarly, you cannot directly open an iOS formatted iWork file on a Mac. That’s why, prior to Mountain Lion, you needed the iWork interface in iCloud.com to download an iOS/iCloud document back to your Mac; the download process converted the file back to a Mac format.

If this all sounds irritating and inconvenient, you’re right. This is where Mountain Lion comes to the rescue. While these format conversions remain required in Mountain Lion, the new OS X and iWork software handle the conversions automatically and behind-the-scenes, so that you hardly notice they’re taking place. The end result is true syncing of files across platforms.

-tef packages. Actually, the file format situation is even more complicated than I’ve explained thus far. There are not just two, but (almost) three separate iWork file formats…

Let’s assume you are running Mountain Lion and the latest iWork software. On your Mac, if you save an iWork document locally to your drive, the file is saved in iWork’s traditional Mac format. In this case, the file will end with an extension that matches the name of the creating app. For example, a Pages document might be named “QuarterlyReport.pages.” Prior to iOS and iCloud, this was the only Pages format. 

If you instead save the document to iCloud, the document’s format is different. First, a -tef is added to the end of the file’s name, such as “QuaterlyReport.pages-tef.” These -tef files are actually folder “packages,” not standard files. I call this the iCloud format of iWork files. Under normal circumstances, all iWork documents in the Mobile Documents folder — and in iCloud — have this -tef extension.

I was pleasantly surprised to find that Mountain Lion is smart enough to do an on-the-fly conversion of the iCloud format back to the Mac format. That is, if you drag a .pages-tef file from the Mobile Documents folder to the Mac’s Desktop, Mountain Lion’s Finder converts it back to the .pages file format. Similarly, you can open a .pages-tef file in Pages on your Mac and save it to your Desktop. Doing so will also convert the document to its .pages Mac-format equivalent.

None of this happens in Lion. If you double-click a -tef item in Lion, the file will not open at all. Instead, you get a message that says the file cannot be opened “because its file type isn’t supported.”

Here’s the final wrinkle: There are two variations of iWork -tef files. When you save an iWork file to iCloud on your Mac, it is saved in the Mac variation. If you select the Show Package Contents contextual menu for such a -tef file, you will see something like this:

tef package: Mac format

Inside a Pages -tef package as created on a Mac and saved to iCloud. 
The index file is the equivalent of a traditional Mac-format .pages file.

This is the format variation that will trigger the Open Document warning on an iOS device. The package remains in this format until the first time you open the file on an iOS device. At this point, it is converted to the iOS variation, which will look something like this:

tef package: iOS format

The same Pages -tef package, after being open on an iPad and converted to the iOS variation.
The index.db file is not the same as the index file in the prior figure.

The file remains in this iOS variation format unless and until you open, edit and re-save the file (to iCloud) on your Mac. In that case, the file reverts back to the Mac -tef variation. And so on and so on. Whew!

Bottom line

Mark this day. Finally, there is true on-the-fly syncing of iWork documents between Macs and iOS devices.

There are still a few unwelcome complications, thanks mainly to the lingering use of separate formats for the different platforms. It would be better if Apple could have dumped the legacy arrangement and employed a single format, one that supported all document attributes on all devices. But, assuming this could not be, what we now have is the next best thing.

I would also appreciate it if Apple offered end-user documentation that clarified the relevant intricacies of how all of this works, saving me the hassle of trying to disentangle them myself. 

That aside, Mountain Lion and the new iWork apps do a superb job of handling file sharing and syncing. Well done, Apple.

Comments

LarryR

The one thing that seems to be missing, which I need, is sub-folders.  This is the chief reason I can’t use my iPad for serious work—I want documents, files and resources of all kinds organized in project-based folders, not in a big heap in one sandboxed folder.

I love the idea of instant synching, but it doesn’t (yet) match the workflow I need.  If iCloud can do this, I haven’t figured it out yet.

So, for now, I’m gonna stick with DropBox.

DocRoss

I thought that you could create sub-folders in iCloud. Don’t you just drag one file on top of another, just like you do with apps on the iPad or iPhone?

Henry Melton

Pages on iCloud was the one feature I was waiting for with Mountain Lion and it’s almost there.  I’m a writer and I’ve already used it extensively.
Heres what I miss thus far:

Hotkey assignments to named styles are erased when a document is converted.

IOS Pages does not support such hotkey assignments, nor command-i for italics, etc.

IOS Pages does not support smart quotes, so I’m always having to do a conversion once a document has gone through the cloud.  (Find and replace ” with ” will fix it.)

Ted Landau

A reader asked me: “How do I view on an iOS device a .pdf file that I sent to iCloud on my Mac using Preview in Mountain Lion?”

My answer:

Unfortunately, there is no way to do this, as Apple does not have an iOS equivalent to Preview. This is a weakness of how iCloud works.

What I do for PDFs is save them to Dropbox rather than iCloud. I can then view the file in the Dropbox app on iOS devices ??or use the Open In command in Dropbox to transfer the pdf to another app (even to iBooks).

Allister

Great article for the most part, but misfiring on two points, I think.

Your headline had me reeled in, but then I discovered that ‘sharing’ wasn’t actually the right word for the article. Am I wrong, in this social age, to think that ‘sharing’ normally implies more than one person? Look at Apple’s new toolbar button for ‘sharing’ ? it’s about involving other people. iCloud can’t do sharing of documents. It can do syncing.

Then there was the comment that ‘certain fonts are not supported’. Of course you mean ‘most fonts are not supported’. I have hundreds of fonts installed on my Mac so that I can use them in my documents. iOS has a mere 57, many of which are subtle variations of others in the list.

Ted Landau

Am I wrong, in this social age, to think that ?sharing? normally implies more than one person?

You are half-wrong. Or half-right, if you prefer. Yes, there are new Sharing features in Mountain Lion, for social sharing. And yes, that is not what this article is about. But the word “sharing” is frequently used to refer to “file sharing” in the sense of syncing or at least sharing a document among different devices. As one example, check out OS X “Sharing” System Preferences pane.

Allister

OK, it’s perhaps a fine point of language, but you used ‘syncing’ yourself in the article, too, and I think that’s the better fit. BTW, there are numerous mentions of “other users” in the Sharing pane of System Preferences.

Further to my font point, I just created a collection of fonts on my Mac that are on iOS. I was surprised that some of the iOS fonts aren’t even on my Mac! I ended up with 28 fonts of English characters or general symbols. 20 of those fonts are what I would call ‘professional’ and might be used for setting significant amounts of text. Only a few are ‘display fonts’ for use in creative works. So any letters, novels etc are going to work great. Posters and flyers, not so much.

I have 601 English fonts on my Mac.

Oh, and the Captcha on this site is REALLY HARD! Especially when some examples are quite obviously rendered incorrectly.

LarryR

I thought that you could create sub-folders in iCloud. Don?t you just drag one file on top of another, just like you do with apps on the iPad or iPhone?

Thanks, Doc.  This is helpful, a bit.  Unfortunately, it only lets you create folders inside a sandbox.  If I have a project that includes Pages documents, Numbers spreadsheets, PDFs and photos, I still can’t keep them together in a single folder.  Dropbox lets me do this, but its not nearly as well integrated into the OS as iCloud.

I need a real file system!

Ron

A reader asked me: ?How do I view on an iOS device a .pdf file that I sent to iCloud on my Mac using Preview in Mountain Lion??

My answer:

Unfortunately, there is no way to do this, as Apple does not have an iOS equivalent to Preview. This is a weakness of how iCloud works.

What I do for PDFs is save them to Dropbox rather than iCloud. I can then view the file in the Dropbox app on iOS devices ??or use the Open In command in Dropbox to transfer the pdf to another app (even to iBooks).

Wrong.  Just use the iBooks iOS app to read .pdf files.

How do you not know this?

Ted Landau

Wrong.? Just use the iBooks iOS app to read .pdf files. How do you not know this?

Calm down!

The iBooks iOS app does not “see” PDF files saved to iCloud by the Mac’s Preview app. That was my answer to the question being asked. I still believe my answer is correct.

In passing, I also noted that Dropbox has a good deal of flexibility, including being able to transfer a PDF to iBooks. I never said this was the only way to get a PDF to iBooks.

Ron

Calm down!

The iBooks iOS app does not ?see? PDF files saved to iCloud by the Mac?s Preview app. That was my answer to the question being asked. I still believe my answer is correct.

In passing, I also noted that Dropbox has a good deal of flexibility, including being able to transfer a PDF to iBooks. I never said this was the only way to get a PDF to iBooks.

No.  You don’t get to choose to believe your answer is correct when it contradicts facts and the truth.

The fact is iBook app easily allows one to view pdf files.  Period.  You were wrong.

Please do some research before spouting off incorrect information.

P.S.  Dropbox is great.  But it’s an alternative.  And you don’t need it to view pdf files.

Lee Dronick

Will the next version of iOS be more PDF friendly, perhaps.

Ted Landau

No.? You don?t get to choose to believe your answer is correct when it contradicts facts and the truth.
The fact is iBook app easily allows one to view pdf files.? Period.? You were wrong.
Please do some research before spouting off incorrect information.

Geez. First of all, I’m not spouting off anything and I don’t need to do any more research. What YOU seem to need is a pair of reading glasses. Because apparently you’re not reading what I am writing. Either that, or you’re not understanding it.

I NEVER said that iBooks cannot view PDF files. So I have no need to correct such a statement.

The reader who emailed me wanted to know if he could directly access on his iOS device a PDF stored in the iCloud section of the Preview app. The answer is no. Yes, a copy of PDF could potentially be viewed in iBooks, but not directly from Preview’s iCloud storage.

I offered Dropbox as an easy way to get a PDF from your Mac to your iOS device. Especially if working in Preview, you can simply select to save the document to Dropbox from Preview’s Save dialog. Yes, you could alternatively get the PDF to iBooks, say via iTunes. But that was not the point. I wasn’t even specifically focusing on iBooks (it was only mentioned in parentheses, as one example of where you might view a PDF on an iOS device).

Nothing I said “contradicts facts or truth.” If this is still not clear, I’m not sure there’s anything more I can say.

Ted Landau

Will the next version of iOS be more PDF friendly, perhaps.

To me, the larger question is will Mac apps, such as Preview and TextEdit, eventually have matching iOS apps, so that syncing their documents between devices is on a par with how Notes now works in Mountain Lion?

My answer is that I don’t know.

Ron

Geez. First of all, I?m not spouting off anything and I don?t need to do any more research. What YOU seem to need is a pair of reading glasses. Because apparently you?re not reading what I am writing. Either that, or you?re not understanding it.

I NEVER said that iBooks cannot view PDF files. So I have no need to correct such a statement.

The reader who emailed me wanted to know if he could directly access on his iOS device a PDF stored in the iCloud section of the Preview app. The answer is no. Yes, a copy of PDF could potentially be viewed in iBooks, but not directly from Preview?s iCloud storage.

I offered Dropbox as an easy way to get a PDF from your Mac to your iOS device. Especially if working in Preview, you can simply select to save the document to Dropbox from Preview?s Save dialog. Yes, you could alternatively get the PDF to iBooks, say via iTunes. But that was not the point. I wasn?t even specifically focusing on iBooks (it was only mentioned in parentheses, as one example of where you might view a PDF on an iOS device).

Nothing I said ?contradicts facts or truth.? If this is still not clear, I?m not sure there?s anything more I can say.

Try re-reading your own post.

Here it is in the original form without your later modification:

“Ted Landau said:

A reader asked me: ?How do I view on an iOS device a .pdf file that I sent to iCloud on my Mac using Preview in Mountain Lion??

CORRECT ANSWER:  iBooks app

DocRoss

Dear Ron,
Wow. I guess it’s true. Ignorance knows no bounds. You’re either being deliberately combative, or you just don’t know how to read.

George

Question for Ron. iBooks app will read PDF’s yes. If I send a PDF to iCloud on my Mac using Preview, how to I find it from my IOS device? I see no way but I would love to do this.

Ted Landau

A reader asked me: ?How do I view on an iOS device a .pdf file that I sent to iCloud on my Mac using Preview in Mountain Lion??

CORRECT ANSWER:? iBooks app

Wrong. Correct answer is: You can’t.

But I despair of trying to explain this to you further.

ron


ALL OF YOU:

http://support.apple.com/kb/PH2704

RTFM!!

ron

http://support.apple.com/kb/PH2704

Jeff Butts

http://support.apple.com/kb/PH2704

That support article doesn’t explain how to convince iBooks to look in a user’s iCloud storage for a PDF. Have you actually tried this and gotten it to work? If so, please post the steps you took in achieving this. If not…

JAS

pdf is a puzzle and not solved by the Apple help pages provided by Ron (and chillax please Ron this is supposed to be helpful to us all).  I have a pdf file in my keynote folder in iCloud, its greyed out on my MBA and invisible on my ios devices.  I can view on my MBA using viewer.  Another puzzle is in preview move to icloud works on the face of it, ie the menu works, but darned if I can then find the pdf file anywhere in iCloud.

Extensor

I think ron isn’t understanding the pdf-preview-icloud connection.

Anyway, my solution is to use the share button in Preview to email the pdf. On the iPad, just tap the attachment to open. Works great for when the iPad isn’t your own.

James Dwyer

Enjoyed the banter here.  Just found it because I was perplexed by the -tef extension, which I didn’t remember seeing before. Glad you all cooled it before my birthday in August!  LOL

Log-in to comment