Asset Catalog

인생노잼시기·2021년 3월 11일
0

요약
기기 및 OS에 따라 사용자가 ASSET을 다르게 다운받으면서 속도를 향상시킬 수 있다
조건에 맞는 파일만 에셋 카탈로그에 넣을 수 있다

Asset 종류 예시

  • icon
    애플에서 제공하는 app store icon SF Symbols 2를 사용하면 편리하다
    최적의 정렬과 사이즈를 보장한다
    If you distribute your app through the App Store, add the App Store icon to an asset catalog located in the Xcode project. The location of the icon is different depending on the platform.
    배포하려면 app store icon을 추가해야 한다

  • sprite
    이미지 스프라이트
    css에서 하나의 이미지를 가지고 width, height, background-position을 조정해 아이콘을 만들어 사용

  • image set
    2x, 3x 이미지를 제공

on-demand resource

On-demand resources are app resources that are hosted on the App Store and are separate from the related app bundle that users download.
앱 스토어에서 제공하는 앱 리소스와 사용자가 다운로드받는 앱 번들은 다르다.
Slicing is the process of creating and delivering variants of the app bundle for different target devices and operating system versions.
슬라이싱을 통해 디바이스와 OS 버전에 맞는 에셋을 제공한다.

Content Types

Folders with invalid types are ignored by the asset catalog.
타입이 유효하지 않은 폴더는 에셋 카탈로그에 의해 무시된다.
특정 폴더 타입에 정해진 확장자만 넣을 수 있는 것으로 보인다.

  • 예시
    Folder type: App Icon Type
    Extension: .appiconset
    Description: The various sizes of the icon for an iOS or watchOS app.
    Children are .png files.

Contents.json File

The Contents.json file specifies metadata for the asset catalog, attributes for a folder type, and attributes for asset files.
폴더마다 Contents.json File이 required, optional, None하다.

Platform Types

플랫폼 iOS, OS X, tvOS, watchOS 마다 사용할 수 있는 폴더타입이 다르다

참고 자료

https://help.apple.com/xcode/mac/current/#/dev10510b1f7

https://developer.apple.com/library/archive/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/AssetTypes.html

profile
인생노잼

0개의 댓글