kocheck/Lazy-Export

IOS Custom Export Field name

Closed this issue · 1 comments

Overview

iOS tends to Handel exported assets differently. This issue should identify what is expected and what is helpful for IOS dev work. Then apply those findings to the default IOS export settings.

IOS can just drag and drop assets from a folder if they follow these set rules.

  • The suffix string is started with a / to make the Layer (or Node) name a folder.
  • userEnteredString + .imageset is applied as its own folder layer for xcode.
  • userEnteredString + {Asset Density} + .file extention

See String Below

{DesignerEnteredLayerName}/{userEnteredString}.imageset/{userEnteredString}@1x


Stretch Goal

  • Enable Lazy Export to actually trigger the figma Export function. This could get complex and should be turned into another issue if it presents its self to be a problem.
    • With the Exported Assets a Contents.json file should be included that follows this logic.
{
  "images" : [
    {
      "idiom" : "universal",
      "filename" : "add_photo_white.png",
      "scale" : "1x"
    },
    {
      "idiom" : "universal",
      "filename" : "add_photo_white@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "add_photo_white@3x.png",
      "scale" : "3x"
    }
  ],
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}

Marking this as complete and writing a new issue up for the .json.

I marked The IOS custom string talked about above as IOS Advance. Since it takes an extra step right now.