Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tbxark/xcode-tool
A collection of useful tools for Xcode projects.
https://github.com/tbxark/xcode-tool
macos xcode
Last synced: about 4 hours ago
JSON representation
A collection of useful tools for Xcode projects.
- Host: GitHub
- URL: https://github.com/tbxark/xcode-tool
- Owner: TBXark
- License: mit
- Created: 2020-11-12T10:32:36.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-25T14:37:35.000Z (over 2 years ago)
- Last Synced: 2023-08-13T17:27:18.599Z (over 1 year ago)
- Topics: macos, xcode
- Language: Swift
- Homepage:
- Size: 66.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xct
A collection of useful tools for an xcode project## Build
```shell
swift build --arch arm64 --arch x86_64 -c release
```## Installation
### Homebrew (macOS only)
Install Homebrew:
You can skip this step if you already have Homebrew installed.
```shell
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```Now install xct itself:
```shell
brew install --build-from-source tbxark/repo/xcode-tool
```### Cocoapods
```shell
pod 'xcode-tool', '~> 1.0.3'
```## Usage
### xct version
> 用于读写 `.xcodeproj` 中的 `project version` `market version`
example: `xct version ./xctdemo.xcodeproj com.tbxark.xctdemo -p 1.2.3`
```shell
xct version [version]
arguments:
: location to *.xcodeproj
: target bundle id
:
--projectVersion, -p, -pv: get/set project version:
--marketVersion, -m, -mv: get/set market version
[version]: new version string
```### xct clean-file
> 列出未被`.xcodeproj`引用的文件
example: `xct clean-file ./xctdemo.xcodeproj /Sources /Tests`
```shell
xct clean-file ...
arguments:
: path to *.xcodeproj
...: path to target directory```
### xct rename-asset
> 将asset中的文件名设置成和文件夹相同
example: `xct rename-asset ./xctdemo/Sources`
```shell
xct rename-asset
arguments:
: path to target directory
```### xct clean-asset
> 列出未被代码引用的asset
example: `xct clean-asset ./xctdemo/Sources`
```shell
xct clean-asset
arguments:
: path to target directory
```### xct json
> 根据keypath读取json
example: `xct json '{"data": { "version": 1}}' 'data.version'`
```shell
xct json [keypath]...
arguments:
: The json string to be parsed
[keyPath]: json keypath
```### xct hex
> 将hex转换成UIColor
example: `xct hex #232323`
```shell
xct hex
arguments:
: hex color string
```### xct replace-hex
> 将代码中的hex相关代码转换成普通的UIColor初始化函数
example: `xct replace-hex /xctdemo`
```shell
xct replace-hex
arguments:
: path to target directory
```