• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Refactor BuildSettings into xcconfigs

xcconfig-extractor

Refactor buildSettings into xcconfigs.

Build Status patreon

Requirements

  • Xcode10+ is officially supported, but should work against older ones too.

Usage

$ xcconfig-extractor /path/to/Your.xcodeproj Configurations

This will create xcconfig files under Configuration dir. Configurations are removed from buildSettings section of pbxproj.

Generated xcconfigs are added to your project automatically. ✏️

xcode's general tab

Available Options

Options:
    --no-trim-duplicates [default: false] - Don't extract duplicated lines to common xcconfig files, simply map each buildSettings to one file.
    --no-edit-pbxproj [default: false] - Do not modify pbxproj at all.
    --include-existing [default: true] - `#include` already configured xcconfigs.
    --no-set-configurations [default: false] - Do not set xcconfig(baseConfigurationReference) in pbxproj. Ignored if `--no-edit-pbxproj` is true.

Build Setting Validation

⚠️ Waring ⚠️

xcconfig-extractor is a refactoring tool. It shouldn't affect your App's actual "Build Setting".

Recommended way to check Build Settings is to use xcodebuild command. Make sure outputs does not change between before and after.

$ xcodebuild -showBuildSettings -configuration Release > before
$ # apply xcconfig-extractor
$ xcodebuild -showBuildSettings -configuration Release > after
$ diff before after # should prints nothing!

If outputs differ, fix it manually e.g. simply by adding missing value to target's xcconfig.

xcconfig does not allow any $(inherited) from #includeing xcconfigs. (See: #8 (comment)) So if you have any existing xcconfig configured on your project, it might cause problems. This article is helpful to understand how inheritance works.

agvtool compatibility

⚠️ Waring ⚠️

If you use agvtool for automatic versioning, it won't work after applying xcconfig-extractor.
agvtool updates versions correctly iff INFOPLIST_FILE is configured in Xcode's buildSettings section.

So make sure you either

  • Restore INFOPLIST_FILE in Xcode's buildSettings section.

or

  • Quit using agvtool and fallback to other tools like /usr/libexec/PlistBuddy to update Info.plist.

e.g.

/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $(git describe --tags --abbrev=0)" App/Info.plist
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${BITRISE_BUILD_NUMBER}-${BITRISE_GIT_BRANCH}" App/Info.plist

Install

Mint

mint install toshi0383/xcconfig-extractor

Build from source

  • Clone this repo and run swift build -c release.
  • Executable will be created at .build/release/xcconfig-extractor.

Donate

If you think it's a useful tool, consider donation to maintain project.

patreon

License

MIT

More Repositories

1

Bitrise-iOS

Client iOS app for bitrise.io 🚀
Swift
143
star
2

cmdshelf

Better scripting life with cmdshelf 📚
Rust
128
star
3

HorizontalStickyHeaderLayout

Horizontal UICollectionViewLayout with Sticky HeaderView
Swift
85
star
4

TVMLKitchen

Swifty TVML template manager with or without client-server
Swift
81
star
5

VideoPlayer

AVPlayer control and monitoring made easy (with Rx)
Swift
31
star
6

CircleProgressButton

UIView based circle button with CAShapeLayer based progress stroke.
Swift
26
star
7

Toast

Toast Popup for iOS, tvOS and macOS(OSX)
Swift
17
star
8

scripts

Handy scripts for iOS/tvOS/Mac developers!
Shell
17
star
9

Yokoso

Simple spotlight instruction framework for UIKit iOS
Swift
14
star
10

hackscode

A hacky partner for my life with Xcode
Swift
13
star
11

abceed

demonstration purpose
Swift
13
star
12

ImageOverlay

UIImageView.overlayContentView made easy and even cooler on tvOS
Swift
12
star
13

FocusZPositionMutating

Focus view order management made easy
Swift
10
star
14

ipanema

ipanema analyzes and prints useful information from *.ipa file.
Go
9
star
15

RxSmartThrottle

Observable.throttle with custom intervals
Swift
8
star
16

ts-react-pager

Super simple pager component
JavaScript
6
star
17

gh-pr-patrol

Rebuild outdated status-checks for pull-requests
Swift
4
star
18

tvOS-10-Sampler

Some new stuff for tvOS 10...
Swift
4
star
19

RateTV

An awesome Rating view for tvOS.
Swift
4
star
20

Pbxproj

Swift Package to Read and Modify Xcode's pbxproj ✏️
Swift
4
star
21

GestureTV

Advanced Siri Remote (and additional GameControllers) Event Handlings on tvOS
Swift
4
star
22

xcodebuild-samplers

Demonstrating xcodebuild usage.
Objective-C
3
star
23

AutoScrollCollectionViewController

Swift
3
star
24

RxTV

Reactive Extension Pack for tvOS 📺
Swift
3
star
25

dotfiles

personal backup
Shell
2
star
26

ghaw

GitHub at work
Swift
2
star
27

iap-server

A Node.js server, which verifies your receipt via Apple.
JavaScript
2
star
28

sniper

OS X command-line app terminator
Swift
2
star
29

Queue

FIFO Queue Implementation in Swift
Swift
1
star
30

tab-width-github

Safari extension - Make tab indented code more readable by forcing the tab size to 4 instead of 8
Swift
1
star
31

ObjCSample

Objective-C
1
star
32

HelloRx

Playing with undocumented RxSwift's behavior
Swift
1
star
33

LGTM

A Super Quick LGTM Image Picker.
CSS
1
star
34

AVAudioSessionSample

My little playground demonstrating how to use AVAudioSession
Swift
1
star
35

MP4Kit

A Swift Library that aims to take care of mpeg4 compatible files.
Swift
1
star
36

Picture-in-Picture-sample

Swift
1
star