Installing Keynote Template

ryanlower
New Contributor II

My company recently updated their Keynote template. I used Jamf Composer to create a snapshot package where I used the Keynote app to manually save the theme as a template. I saved it as a DMG, and applied it to a policy that Fills existing users. It does exactly what I expect, placing the .kth file in the user Keynote directory (~/Library/Containers/com.apple.iWork.Keynote/Data/Library/Application Support/User Templates). However, upon opening Keynote.app, the theme does not appear in the Theme Chooser.

The final strange detail is that on the same computer I've been testing the policy on, if I create a new user before running the policy that has never opened Keynote before, the template does appear in the Theme Chooser on that second account, but will still not appear in Keynote on the first account.

I'm very new to this so please don't hesitate to suggest that I've made a mistake that seems dumb or obvious to you, it's entirely possible. I'll take any and all advice and appreciate it!

15 REPLIES 15

murphym
New Contributor

I'm also running into this issue and wondering if something changed in the new Keynote Version 9 as it used to work just fine in version 8. If the template file is installed by script or manually into that User Templates folder Keynote does not add the theme tab like it used to. But if you double click a template file and opt to add it to the theme chooser it will add it to the folder and make the tab visible. Maybe there is a plist somewhere to toggle that tab?

pmcavey
New Contributor II

Any update on this issue?

ryanlower
New Contributor II

I've not been able to find a solution that works without user interaction, and instead ended up writing a script that puts the keynote template file into /users/shared and then opens the file with keynote, so that the user is prompted to "add to theme chooser". Since I obviously don't want this happening randomly and confusing people, it's also meant that I compromised and am using self-service for the initial deployment so that the user expects the interaction.

The good news is that it also seems like the only thing that keynote needs to maintain the link between the theme chooser window and the .kth file stored in ~/Library/Containers/com.apple.iWork.Keynote/Data/Library/Application Support/User Templates is a consistent filename (not a plist or UUID or something). So, after a one time installation of the keynote theme file that requires user interaction, I can now update it as a background process.

I'm definitely open to hearing from anyone who has come up with a better solution!

s_hass
New Contributor II

i have the following solution:

Every template in ~/Library/Containers/com.apple.iWork.Keynote/Data/Library/Application Support/User Templates creates an entry in ~/Library/Containers/com.apple.iWork.Keynote/Data/Library/Application Support/com.apple.iWork.CloudKitStorage/com.apple.iWork.TSKCloudKitPrivateZone.db
(and also a numeric file in ~/Library/Containers/com.apple.iWork.Keynote/Data/Library/Application Support/com.apple.iWork.CloudKitStorage/data)

You need to delete these .db-file after adding the new .kth-files.
After restarting Keynote the db.-file will be recreated and the new templates appear in the Theme Chooser.

By doing this another new numeric file is generated in the "data"-Folder for every template.
In order to prevent the creation of thousands of numeric files you could also clear the whole "com.apple.iWork.CloudKitStorage"-folder

b_schueder
New Contributor

Yeah! Thanks! It works for me :-)

b_schueder
New Contributor

In Keynote 10 something seems to have changed again. Since then, our themes that we have distributed are no longer displayed. How about you? Do you have the same problem and does anyone have a solution?

jmbwell
New Contributor II

Same problem, no solution.

miawri
New Contributor

Add another one to this list - deleting the .db file no longer repopulates the 'My Themes' section in Keynote 10.

Has anyone managed to find another method to programmatically add Themes to the Chooser?

kenchan0130
New Contributor

We have created a solution to this issue.

https://github.com/kenchan0130/keynote-template-deployment

Philein
New Contributor III

it gives us this error:

 

curl: (3) URL using bad/illegal format or missing URL

 

What could be wrong?

erik-stam
New Contributor

@kenchan0130 Thanks for creating the script, works like a charm!!

Philein
New Contributor III

@kenchan0130 could you please explain me how to pass all the parameters in jamf? If i understand correctly parameters from 1 to 3 are reserved by jamf...

Philein
New Contributor III

it gives us this error:

 

curl: (3) URL using bad/illegal format or missing URL

 

What could be wrong?

James_h
New Contributor II

Same thing for me with the URL. I get the error but only when I have the 3rd box set to "current" user. When it is set to "all" users the URL is accepted but nothing gets installed. This does not seem to work correctly. Also is required to change all the $1 $2 $3 to $4 $5 $6. Would be cool if it worked or if the creator could pop in about the URL error.

marc_beuvin
New Contributor II

I had also this "curl: (3) URL using bad/illegal format or missing URL" error.


This was due to the fact I was using local file and there was a space in the path. So add %20 for every space in the path :

file:///Users/Shared/Keynote%20theme/theme.kth

I also had to change the line 149 in the script :

149     LOCAL_USER_GROUP_NAME=$(stat -f "%Sg" "${LOCAL_USER_HOME_DIRECTORY}")

And replace it with

149     LOCAL_USER_GROUP_NAME=$(id -g ${LOCAL_USER})

Now I use the script in a postinstall script of a Composer's package