LoginSignup
10
7

More than 5 years have passed since last update.

xcconfig-extractor で Build Settings を xcconfig に抜き出す

Posted at

TL;DR

  • 基本的には xcconfig-extractor /path/to/App.xcodeproj configs で終わり

インストール

https://github.com/toshi0383/xcconfig-extractor/blob/master/README.md を見てお好みの方法で入れる

使ってみる

$ xcconfig-extractor /path/to/App.xcodeproj configs
Replacing existing xcconfig: Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig
Replacing existing xcconfig: Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig
Replacing existing xcconfig: Pods/Target Support Files/Pods-AppTests/Pods-AppTests.debug.xcconfig
Replacing existing xcconfig: Pods/Target Support Files/Pods-AppTests/Pods-AppTests.release.xcconfig

すでに xcconfig とか cocoapods 使ってる場合もよしなにしてくれる。

基本的にはこれでおしまい。

僕がハマったところ

pod install が失敗するようになる

$ pod install
[!] Unable to determine the platform for the `App` target.

って出て pod install 失敗するようになる。

解決方法

pod init して生成された Podfile でコメントアウトしてある platform の設定をちゃんとやる

↓これ

# Uncomment the next line to define a global platform for your project
platform :ios, '10.2'

動くし〜って感じでスルーしてた。

fastlane/CLI からバージョンの設定に失敗する

agvtool とか、fastlane の get_build_number increment_build_number、でバージョン設定してると、失敗するようになる。

解決方法

xcproject の方で CURRENT_PROJECT_VERSION を設定する。

設定方法は公式のドキュメントを見る。

VERSIONING_SYSTEM = apple-generic は xcconfig に書いてあれば良いらしい。

10
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
7