Jump to content

Recommended Posts

Posted

Xcode now allows imagesets to be in vector (pdf) format with a single scale. When checking "Preserve Vector Data" (see screenshot) the image is scaled by Xcode to any required size so there is no need to create lots of images in @1x,@2x,@3x for all required sizes. This is a great new feature of Xcode.

 

In Affinity Designer I create a slice with output format pdf (for export) and choose the builder "Xcode JSON Apple Universal Icon".

 

The JSON file gets the following content:

{
  "images" : [
    {
      "idiom" : "universal",
      "filename" : "Gear.pdf",
      "scale" : "x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

 

But what Xcode expects for this type of imageset is this:

 

{
  "images" : [
    {
      "idiom" : "universal",
      "filename" : "Gear.pdf"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  },
  "properties" : {
    "preserves-vector-representation" : true
  }
}

 

So no "scale" and an additional property "preserves-vector-representation".

 

Is there any way to customize the output of the builder JSON file?

 

Thanks,

Mario

 

xcode.png

Posted

No AFAIK you can't customize the JSON section/key/value attributes yet.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Posted

Jip this way you have most flexibility over the whole contents generation and can customize it to your needs. - Well done!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.