LoginSignup
0
0

More than 5 years have passed since last update.

Xcode 10でのUniversal frameworkビルドエラーについて

Last updated at Posted at 2018-10-05

問題

Xcode 10でUniversal frameworkビルドをしようとして、iphoneos/iphonesimulatorを連続ビルドすると、一つ前のDerivedDataが消えてしまう。これは-derivedDataPathを指定しても同様です。

なぜ?

Xcode 10 betaで確認したときは、何もなかったので、Xcode 10のリリース版までに何らかの変更があった模様。なかなか迷惑な変更ですね。。

解決方法

iphoneos/iphonesimulatorで、連続ビルドするときは、最初のプロダクト(DerivedData//Build/Products/内のデータ)を一時退避する。

おまけ

relax https://github.com/scenee/relax というビルド・パッケージツールのv0.6.8で対応済みで、こちらもぜひ使ってみてください。

※ relaxは、fastlaneのgymと同等の機能をもっていますが、provisioning profileでのマニュアルビルドとInfo.plist/Build Settingsのカスタマイズが、かなり簡単にできます。

Step 1. Install Relax

$ brew install scenee/formulae/relax

Step 2. Relfileを配置

$ touch Relfile
$ cat <<-EOF > Relfile
version: '2'
xcodeproj: MyLib

distributions:
  myframework:
    scheme: MyLib
EOF

Step 3. Frameworkをビルド

$ relax build myframework
# For your release build
$ relax build myframework --no-simulator
0
0
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
0
0