LoginSignup
20
10

More than 5 years have passed since last update.

[Xcode9] ipaをAppStoreにあげた後にAppleからメールが来て突き返された

Last updated at Posted at 2017-09-22

送られてきたもの

Xcode9で初めてAppStoreにipaをあげました。アップロード自体は成功したんですが、Appleから以下のメールが届きました。

Invalid Bundle - Disallowed LLVM instrumentation. Do not submit apps with LLVM profiling instrumentation or coverage collection enabled. Turn off LLVM profiling or code coverage, rebuild your app and resubmit the app.

なるほど、LLVM Profiling InstrumentationがAppにくっついているか、coverage colllectionが有効になったままだよって言ってるっぽいです。

対処方法

前提として、今回作っていたプロダクトではCarthageCocoaPodsを使ってました。各自の状況に合わせて読んでください。

まず、開発しているプロダクトのBuild Settings > Apple LLVM 9.0 Code Generation > Enable Code Coverage Supportの項目を見てください。YESになっている場合はここをNOにします。私はひとまずRelease環境のみNOにしておきました。

CocoaPodsを使っている方は、Podsでも上記と同様の設定をします。

Carthageを使っている方は、Build Settingsがないのでちょっと手順が変わります。ちなみにこちらを参考にしました。

  1. terminalを開いてプロジェクトルートに行く
  2. carthage update --platform iOS --no-use-binaries --no-buildを叩いて、コンパイルが始まったらctrl+Cでキャンセル
    • (これなんで必要なのかわからない)
  3. grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g'を叩く
    • Carthage内の各プロジェクトのcodeCoverageEnabledNOにしている様子
  4. carthage build --platform iOSを叩いて完了を待つ
  5. ビルドが通るか確認する

私の場合、以上を実施後、もう一度ArchiveしてAppStoreにあげればAppleは何も言ってこなくなりました。

そのうちCarthageがアップデートされて解決しそうですが、念のため書いておきました。

20
10
2

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
20
10