18
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Xcode9、fastlaneでアプリを配信するときにエラーになるときに試すこと

Last updated at Posted at 2017-10-11

Xcode9が正式版になって、アップデートしたらfastlaneで上手く配信できなくなった!というときに試す設定を書き残しておきます。

No profiles for 〜 というエラーになる

下記のように No profiles forのようなエラーになる場合、

2017-09-05 10:18:42.249 xcodebuild[86003:39884346] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fc0436f3bd0>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'com.***.id' were found" UserInfo={NSLocalizedDescription=No profiles for 'com.***.id' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.***.id'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}"
)}
error: exportArchive: No profiles for 'com.***.id' were found

fastlaneのgymのoptionに下記を追加してみましょう。

Fastfile
export_xcargs: "-allowProvisioningUpdates"

Segmentation fault: 11 のようなエラーになる

gymのoptionに下記を追加してみましょう

Fastfile
export_options: { compileBitcode: false }

まとめると、上記2つを追加したgymのoptionは下記のようになります。

Fastfile
    gym(
      scheme: "appscheme",
      export_method: "ad-hoc",
      export_xcargs: "-allowProvisioningUpdates",
      export_options: { compileBitcode: false }
    )

Xcodeを別のディレクトリにインストールしている

旧バージョンのXcodeを残すために、別のディレクトリにXcode9をインストールしている場合は、下記のように環境変数を変更しておきます。

Fastfile
  before_all do
    ENV['DEVELOPER_DIR'] = '/Applications/Xcode9.app/Contents/Developer'
    carthage(cache_builds: true)
  end

参考

18
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
18
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?