fastlane: xcode9 Code Signing Error

New Issue Checklist

Issue Description

Xcode8 works, updated to xcode9 get the error. There is the fastlane logs: The following build commands failed: Check dependencies Check dependencies Check dependencies Check dependencies Check dependencies Check dependencies Check dependencies Check dependencies (8 failures) [16:15:44]: Exit status: 65

±--------------±------------------------+ | Build environment | ±--------------±------------------------+ | xcode_path | /Applications/Xcode.app | | gym_version | 2.61.0 | | export_method | enterprise | | sdk | iPhoneOS11.0.sdk | ±--------------±------------------------+

[16:15:44]: ▸ === BUILD TARGET Colours OF PROJECT Pods WITH CONFIGURATION Release === [16:15:44]: ▸ Check dependencies [16:15:44]: ▸ Code Signing Error: Colours does not support provisioning profiles. Colours does not support provisioning profiles, but provisioning profile NO_SIGNING/ has been manually specified. Set the provisioning profile value to “Automatic” in the build settings editor. [16:15:44]: [16:15:44]: ⬆️ Check out the few lines of raw xcodebuild output above for potential hints on how to solve this error [16:15:44]: 📋 For the complete and more detailed error log, check the full log at: [16:15:44]: 📋 /Users/jahov/Library/Logs/gym/creams-creams.log [16:15:44]: [16:15:44]: Looks like fastlane ran into a build/archive error with your project [16:15:44]: It’s hard to tell what’s causing the error, so we wrote some guides on how [16:15:44]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/ [16:15:44]: Before submitting an issue on GitHub, please follow the guide above and make [16:15:44]: sure your project is set up correctly. [16:15:44]: fastlane uses xcodebuild commands to generate your binary, you can see the [16:15:44]: the full commands printed out in yellow in the above log. [16:15:44]: Make sure to inspect the output above, as usually you’ll find more error information there [16:15:44]: ±-----------------±------------+ | Lane Context | ±-----------------±------------+ | DEFAULT_PLATFORM | ios | | PLATFORM_NAME | ios | | LANE_NAME | ios release | ±-----------------±------------+ [16:15:44]: Error building the application - see the log above

±-----±--------------------±------------+ | fastlane summary | ±-----±--------------------±------------+ | Step | Action | Time (in s) | ±-----±--------------------±------------+ | 1 | Verifying required | 0 | | | fastlane version | | | 2 | default_platform | 0 | | 3 | cocoapods | 11 | | 4 | number_of_commits | 0 | | 5 | last_git_tag | 0 | | 💥 | gym | 10 | ±-----±--------------------±------------+

[16:15:44]: fastlane finished with errors

[!] Error building the application - see the log above

Environment

Please run fastlane env and copy the output below. This will help us help you 👍 If you used --capture_output option please remove this block - as it is already included there.

✅ fastlane environment ✅

Stack

Key Value
OS 10.12.6
Ruby 2.2.4
Bundler? false
Git git version 2.13.5 (Apple Git-94)
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.12.6 (16G29)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained false
Is homebrew true
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.0

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

`./fastlane/Fastfile`
# Customise this file, documentation can be found here:
# https://docs.fastlane.tools/actions/
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command

# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`

# If you want to automatically update fastlane if a new version is available:
# update_fastlane

# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.60.1"
default_platform :ios


## update me in different project
WORKSPACE_NAME = 'creams'
SCHEME_NAME = 'creams'
FIR_TOKEN = '93fe440b0c2371550f57b088ce04a6da'
## end

DEBUG_CONFIGURATION_NAME = 'Debug'
DEBUG_EXPORT_METHOD = 'ad-hoc'
DEBUG_CODESIGNING_IDENTIFIER = 'iPhone Developer: GuoYong Zhou (G66SUHG772)'
DEBUG_PROFILE_PREFIX = 'debug'

RELEASE_CONFIGURATION_NAME = 'Release'
RELEASE_EXPORT_METHOD = 'enterprise'
RELEASE_CODESIGNING_IDENTIFIER = 'iPhone Distribution: Hangzhou Jiangren Network Technology Co., Ltd'
RELEASE_PROFILE_PREFIX = 'release'

PREVIEW_CONFIGURATION_NAME = 'Preview'
PREVIEW_EXPORT_METHOD = 'enterprise'
PREVIEW_CODESIGNING_IDENTIFIER = 'iPhone Distribution: Hangzhou Jiangren Network Technology Co., Ltd'
PREVIEW_PROFILE_PREFIX = 'preview'

DISTRIBUTION_CONFIGURATION_NAME = 'AppStore'
DISTRIBUTION_EXPORT_METHOD = 'app-store'
DISTRIBUTION_CODESIGNING_IDENTIFIER = 'iPhone Distribution: Hangzhou Jiangren Network Technology Co., Ltd.'
DISTRIBUTION_PROFILE_PREFIX = 'distribution'

# 打包
def generate_ipa(typePrefix,codesigningIdentity,exportMethod,configuration,options)   
    build_number = number_of_commits
    version_number = last_git_tag

    gym(
      workspace: "./#{WORKSPACE_NAME}.xcworkspace",
      scheme: SCHEME_NAME,
      clean: true,
      output_directory: './build/',
      output_name: "#{RELEASE_CONFIGURATION_NAME}_#{version_number}_#{build_number}.ipa",
      configuration: configuration,
      codesigning_identity: "#{codesigningIdentity}",
      include_symbols: 'false',
      include_bitcode: 'false',
      archive_path: './build/',
      export_method: "#{exportMethod}"
    )

end

def versionBuildUpdate()
    build_number = number_of_commits
    version_number = last_git_tag
    increment_version_number(
      version_number: "#{version_number}" # Set a specific version number
    )
    increment_build_number(
      build_number: "#{build_number}" # set a specific number
    )
end

def uploadToFir()
    build_number = number_of_commits
    version_number = last_git_tag
    file_name = "#{RELEASE_CONFIGURATION_NAME}_#{version_number}_#{build_number}.ipa"
    sh "pwd"
    sh "fir p ../build/#{file_name} -T #{FIR_TOKEN}"
end

platform :ios do
  before_all do
    cocoapods
  end

  lane :preview do |options| #预览版
    desc "Submit a new preview Build to fir.im"
    generate_ipa(
      PREVIEW_PROFILE_PREFIX,
      PREVIEW_CODESIGNING_IDENTIFIER,
      PREVIEW_EXPORT_METHOD,
      PREVIEW_CONFIGURATION_NAME,
      options
    )
    uploadToFir()
  end

  lane :release do |options| #内测版
    desc "Submit a new Beta Build to fir.im"
    generate_ipa(
      RELEASE_PROFILE_PREFIX,
      RELEASE_CODESIGNING_IDENTIFIER,
      RELEASE_EXPORT_METHOD,
      RELEASE_CONFIGURATION_NAME,
      options
    )
    uploadToFir()
  end

lane :distribution do |options| # appstore
    # match(type: "appstore") # more information: https://codesigning.guide
    # cert(team_id: 'Hangzhou Jiangren Network Technology Co., Ltd.(6K4AKLPNTH)',username:"crafts-man@qq.com")
    # sigh(team_id: 'Hangzhou Jiangren Network Technology Co., Ltd.(6K4AKLPNTH)',username:"crafts-man@qq.com")
    desc "for keychain unlock"
    keychain_entry_builder = CredentialsManager::AccountManager.new(user: "crafts-man@qq.com")
    password_builder = keychain_entry_builder.password
    ENV["USER_PASS"] = "#{password_builder}"
    desc "for pilot(TestFlight)"
    keychain_entry_devid = CredentialsManager::AccountManager.new(user: "crafts-man@qq.com")
    password_devid = keychain_entry_devid.password
    puts "#{password_devid}"
    generate_ipa(
      DISTRIBUTION_PROFILE_PREFIX,
      DISTRIBUTION_CODESIGNING_IDENTIFIER,
      DISTRIBUTION_EXPORT_METHOD,
      DISTRIBUTION_CONFIGURATION_NAME,
      options
    )
    deliver(
      force: true,
      submit_for_review: false
    )
  end

  lane :metrics do
    #scan(scheme: SCHEME_NAME, code_coverage: true, derived_data_path: "./DerivedData", output_directory: "./sonar-reports")
    #slather(cobertura_xml: true, jenkins: true, scheme: SCHEME_NAME, build_directory: "./DerivedData", output_directory: "./sonar-reports", proj: "./creams.xcodeproj")
    sh("cd .. && mkdir sonar-reports && lizard ./ -l swift --xml > ./sonar-reports/lizard-report.xml")
    swiftlint(output_file: "./reports/swiftlint.txt", ignore_exit_status: true)
    #sonar
end
  after_all do |lane|
  end

  error do |lane, exception|
  end
end



`./fastlane/Appfile`


for_lane :release do 
	apple_id "apple-ee@91souban.com"
	app_identifier "com.jiangren.creams" # The bundle identifier of your app
	team_id "JXQ4Q3HT8V"  # Developer Portal Team ID
end

for_lane :preview do 
	apple_id "apple-ee@91souban.com"
	app_identifier "com.jiangren.creams" # The bundle identifier of your app
	team_id "JXQ4Q3HT8V"  # Developer Portal Team ID
end

for_lane :distribution do 
	apple_id "crafts-man@qq.com"
	app_identifier "com.jiangren.creams-appstore" # The bundle identifier of your app
	team_id "6K4AKLPNTH"
	itunes_connect_id "crafts-man@qq.com"
  # Developer Portal Team ID
end


# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md

fastlane gems

Gem Version Update-Status
fastlane 2.61.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
slack-notifier 1.5.1
CFPropertyList 2.3.5
claide 1.0.2
colored2 3.1.2
nanaimo 0.2.3
xcodeproj 1.5.2
rouge 1.11.1
xcpretty 0.2.6
terminal-notifier 1.7.1
unicode-display_width 1.1.3
terminal-table 1.7.3
plist 3.2.0
public_suffix 2.0.5
addressable 2.5.1
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.5.0
babosa 1.0.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.5
excon 0.55.0
faraday 0.12.1
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.0
gh_inspector 1.0.3
json 1.8.1
mini_magick 4.5.1
multi_json 1.12.1
multi_xml 0.6.0
rubyzip 1.2.1
security 0.1.3
xcpretty-travis-formatter 0.0.4
dotenv 2.2.0
bundler 1.14.6
faraday_middleware 0.11.0.1
uber 0.0.15
declarative 0.0.10
declarative-option 0.1.0
representable 3.0.4
retriable 2.1.0
mime-types-data 3.2016.0521
mime-types 3.1
little-plugger 1.1.4
logging 2.2.2
jwt 1.5.6
memoist 0.15.0
os 0.9.6
signet 0.7.3
googleauth 0.5.1
httpclient 2.8.3
google-api-client 0.13.6

generated on: 2017-10-09

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 2
  • Comments: 17 (1 by maintainers)

Most upvoted comments

@feiadan I resolved it by adding some code to podfile

post_install do |installer| installer.pods_project.build_configurations.each do |config| config.build_settings['PROVISIONING_PROFILE_SPECIFIER'] = '' end end

@robindirksen1 I had the same issue and your solution worked like charm.