In Mojave we can choose new type of wallpaper: dynamic.

Depending on day time, system displays different wallpaper. At night it is picture of Mojave at night, during day it’s picture of Mojave taken during day. So at night we have dark wallpaper at day we have light wallpaper.

All built in wallpapers in macOS we can find in folder: /Library/Desktop Pictures . Also here we can find dynamic wallpaper.

Dynamic wallpaper is saved as a HEIC file ( Mojave (Dynamic).heic ). More information about this type of file you can find on Wikipedia. Generally this is type of file which Apple uses in iOS devices. Photos in iOS (also live photos) are stored as a HEIC file. That kind of file can contains multiple images/thumbnails and metadata in a single file.

There is really good online tool where we can check content of Mojave wallpaper file: https://strukturag.github.io/libheif/. You can upload Mojave (Dynamic).heic file and you will see that in this single file there is 16 separate pictures taken in different day phase.

So maybe it’s enough to create new HEIC file with 16 separate images and macOS will show them properly. Let’s try it!

First I had to prepare 16 different images.

I know, I know — they are not impressive :-). However for our experiment they will be enough.

Now I have to prepare application which convert set of images to one HEIC file. I prepared simple console application in Swift.

Application requires that in my Documents folder I have wallpaper-new folder with 16 images (from 1.png to 16.png ). I can run application and after that I have new output.heic file in the same directory.

After setting this file as a wallpaper I had only one image displayed during whole day. So it seems that this file have to contains something extra. I decided to check what metadata is inside original Mojave wallpaper. I downloaded libheif library (I modified a little bit heif-info application) and I’ve got below result:

Number of top level images: 16

image #0

id: 61

width: 5120

height: 2880

is primary: yes

number of metadata: 1

metadata type: mime

content type: application/rdf+xml

metadata size: 3302

metadata content: http://www.w3.org/1999/02/22-rdf-syntax-ns# "> http://ns.apple.com/namespace/1.0/ " apple_desktop:solar="YnBsaXN0MDDRAQJSc2mvEBADDBAUGBwgJCgsMDQ4PEFF1AQFBgcICQoLUWlRelFhUW8QACNAcO7vOubr3yO/1e+pmkOtXBAB1AQFBgcNDg8LEAEjQFRxqCKOFiAjwCR6waUkDgHUBAUGBxESEwsQAiNAVZV4BI4c+CPAEP2uFrMcrdQEBQYHFRYXCxADI0BWtALKmrjwIz/2ObLnx6l21AQFBgcZGhsLEAQjQFfTrJlEjnwjQByrLle1Q0rUBAUGBx0eHwsQBSNAWPrrmI0ISCNAKiwhpSRpc9QEBQYHISIjCxAGI0BgJff9KDpyI0BENTOsilht1AQFBgclJicLEAcjQGbHdYIVQKojQEq3fAg86lXUBAUGBykqKwsQCCNAbTGmpC2YRiNAQ2WFOZGjntQEBQYHLS4vCxAJI0BwXfII2B+SI0AmLcjfuC7g1AQFBgcxMjMLEAojQHCnF6YrsxcjQBS9AVBLTq3UBAUGBzU2NwsQCyNAcTcSnimmjCPAGP5E0ASXJtQEBQYHOTo7CxAMI0BxgSADjxK2I8AoalieOTyE1AQFBgc9Pj9AEA0jQHNWsnnMcWIjwEO+oq1pXr8QANQEBQYHQkNEQBAOI0ABZpkFpAcAI8BKYGg/VvMf1AQFBgdGR0hAEA8jQErBKblRzPgjwEMGElBIUO0ACAALAA4AIQAqACwALgAwADIANAA9AEYASABRAFMAXABlAG4AcAB5AIIAiwCNAJYAnwCoAKoAswC8AMUAxwDQANkA4gDkAO0A9gD/AQEBCgETARwBHgEnATABOQE7AUQBTQFWAVgBYQFqAXMBdQF+AYcBkAGSAZsBpAGtAa8BuAHBAcMBzAHOAdcB4AHpAesB9AAAAAAAAAIBAAAAAAAAAEkAAAAAAAAAAAAAAAAAAAH9"/> end="w"? image #1

id: 123

width: 5120

height: 2880

image #2

id: 184

width: 5120

height: 2880

image #3

id: 245

width: 5120

height: 2880

image #4

id: 306

width: 5120

height: 2880

image #5

id: 367

width: 5120

height: 2880

image #6

id: 428

width: 5120

height: 2880

image #7

id: 489

width: 5120

height: 2880

image #8

id: 550

width: 5120

height: 2880

image #9

id: 611

width: 5120

height: 2880

image #10

id: 672

width: 5120

height: 2880

image #11

id: 733

width: 5120

height: 2880

image #12

id: 794

width: 5120

height: 2880

image #13

id: 855

width: 5120

height: 2880

image #14

id: 916

width: 5120

height: 2880

image #15

id: 977

width: 5120

height: 2880

Thus we can see that in the first image we have additional XMP metadata. Now I know that I have to modify a little bit my Swift application. It should also add metadata for the first image in the sequence.

Now we can set up our new file as a wallpaper. And this is the result:

It works! We can prepare our custom dynamic wallpaper! And it’s pretty easy.