Skip to content

Commit

Permalink
Add README mention of using Google Material Icons exported symbol SVG…
Browse files Browse the repository at this point in the history
… in the xcassets resource
  • Loading branch information
marcprux committed Aug 27, 2024
1 parent 55cebef commit 71f5618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@ AsyncImage(url: Bundle.module.url(forResource: "sample", withExtension: "jpg"))

#### System Symbols

The `Image(systemName:)` constructor is used to display a standard system symbol name that is provided on Darwin platforms. There is no built-in equivalent to these symbols on Android, but you can add these symbols manually by creating a `Module.xcassets` asset catalog in your top-level app module's `Resources` folder, and then exporting the named symbol(s) from the [`SF Symbols.app`](https://developer.apple.com/sf-symbols/). These exported symbol SVG files can be dragged into your asset catalog to provide the necessary symbol data for your Android app.
The `Image(systemName:)` constructor is used to display a standard system symbol name that is provided on Darwin platforms. There is no built-in equivalent to these built-in symbols on Android, but you can add vector symbols manually by creating a `Module.xcassets` asset catalog in your top-level app module's `Resources` folder, and then downloading symbols from the [Google Material Icons catalog](https://fonts.google.com/icons) in the iOS SVG format (see the [documentation](https://developers.google.com/fonts/docs/material_icons#icons_for_ios)). You can also exporting the named customized symbols from the [`SF Symbols.app`](https://developer.apple.com/sf-symbols/) for import as well. These exported symbol SVG files can be dragged into your asset catalog to provide the named symbols for both the iOS and Android sides of your app.

See the [Skip Showcase app](https://github.com/skiptools/skipapp-showcase) `ImagePlayground` for a concrete example of using a system symbol with a exported symbol images, and see that project's Xcode project file ([screenshot](https://assets.skip.tools/screens/SkipUI_Custom_Symbol.png)) to see how the symbol is included in the `.xcassets` file for the app module.

Expand Down

0 comments on commit 71f5618

Please sign in to comment.