https://github.com/417-72ki/r2acconverter
Convert `R.image` with `ImageResources` for Xcode 15
https://github.com/417-72ki/r2acconverter
Last synced: about 1 month ago
JSON representation
Convert `R.image` with `ImageResources` for Xcode 15
- Host: GitHub
- URL: https://github.com/417-72ki/r2acconverter
- Owner: 417-72KI
- License: mit
- Created: 2023-09-21T08:03:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-15T19:45:41.000Z (2 months ago)
- Last Synced: 2025-04-15T20:41:25.421Z (2 months ago)
- Language: Swift
- Homepage:
- Size: 831 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# R2ACConverter
[](https://github.com/417-72KI/R2ACConverter/actions)
[](https://github.com/417-72KI/R2ACConverter/releases)
[](https://swift.org/package-manager)
[](https://github.com/417-72KI/R2ACConverter)
[](https://raw.githubusercontent.com/417-72KI/R2ACConverter/master/LICENSE)**R2ACConverter** is a simple converter from R.swift to Asset Catalog for Xcode 15.
Its name is came from ***R**swiftresources **to** **A**sset **C**atalog*
## Example
### R.image
| before | after |
| --- | --- |
| `R.image.foo()` | `UIImage(resource: .foo)` |
| `R.image.bar()!` | `UIImage(resource: .bar)` |
| `UIImage(resource: R.image.baz)` | `UIImage(resource: .baz)` |
| `Image(R.image.qux)` | `Image(.qux)` |
| `Image(uiImage: R.image.quux()!)` | `Image(.quux)` |
| `Image(uiImage: UIImage(resource: R.image.corge)!)` | `Image(.corge)` |
### R.color
| before | after |
| --- | --- |
| `R.color.foo()` | `UIColor(resource: .foo)` |
| `R.color.bar()!` | `UIColor(resource: .bar)` |
| `UIColor(resource: R.color.baz)` | `UIColor(resource: .baz)` |
| `Color(R.color.qux)` | `Color(.qux)` |
| `Color(uiColor: R.color.quux()!)` | `Color(.quux)` |
| `Color(uiColor: UIColor(resource: R.color.corge)!)` | `Color(.corge)` |## Requirement
- macOS 13+
- Xcode 15+
- Swift 5.9+## Installation
### Mint```sh
mint install 417-72KI/R2ACConverter
```### Homebrew
```sh
brew install 417-72KI/tap/r2acconverter
```## Usage
```sh
$ r2acconverter /path/to/project
```