fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
39.54k stars 5.7k forks source link

Match creates profiles but Gym breaking because of it requires a provisioning profile with the Push Notifications feature #16383

Closed flipbosch closed 4 years ago

flipbosch commented 4 years ago

Question Checklist

Question Subject

Match + GYM

Question Description

Fastlane Match is not working for me (blanc install) but Automatic signing is I always get the error:

 [12:57:59]: ▸ error: "xxxAppIos" requires a provisioning profile with the Push Notifications feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'xxxAppIos' from project 'xxxAppIos')

This is what I did

  1. Even tried on a new machine
  2. Nuked all certificated.
  3. No need to delete certificates from machine, since it was new
  4. Then run this match command.

Result of match is: [12:57:37]: All required keys, certificates and provisioning profiles are installed 🙌

But GYM is not working.

Below an example of my Fastlane file

     update_code_signing_settings(
        use_automatic_signing: false,
        path: "./xxxAppIos.xcodeproj"
      )x
     pem(app_identifier: "xxx.xxx.#{options[:app]}")
      match(app_identifier: ["xxx.xxx.#{options[:app]}"],
            generate_apple_certs: true,
            type: "appstore")
      gym(scheme: "Live - #{options[:app]}",
            output_name: "Live-#{options[:app]}",
            clean: true,
            export_options: {
              compileBitcode: false,
              provisioningProfiles: {
                "xxx.xxx..#{options[:app]}" => "match AppStore xxx.xxx.#{options[:app]}"
              },
                signingStyle: "manual"
            },
            export_method: "app-store"
      )
🚫 fastlane environment 🚫 ### Stack | Key | Value | | --------------------------- | ------------------------------------------- | | OS | 10.15.4 | | Ruby | 2.6.5 | | Bundler? | true | | Git | git version 2.21.0 (Apple Git-122) | | Installation Source | ~/.rvm/gems/ruby-2.6.5/bin/fastlane | | Host | Mac OS X 10.15.4 (19E287) | | Ruby Lib Dir | ~/.rvm/rubies/ruby-2.6.5/lib | | OpenSSL Version | OpenSSL 1.1.1g 21 Apr 2020 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Applications/Xcode.app/Contents/Developer/ | | Xcode Version | 11.1 | ### System Locale | Error | | --------------------------- | | No Locale with UTF8 found 🚫 | ### fastlane files:
`./fastlane/Fastfile` ```ruby fastlane_version '2.112.0' platform :ios do lane :build do |options| clean_dir() install_pods() inclBuildNumber(options[:app],options[:beta]) update_app_identifier( xcodeproj: "./spontRestaurantAppIos.xcodeproj", plist_path: "./spontRestaurantAppIos/Info.plist", # Path to info plist file, relative to xcodeproj app_identifier: "cash.spont.#{options[:app]}" # The App Identifier ) update_code_signing_settings( use_automatic_signing: false, path: "./spontRestaurantAppIos.xcodeproj" ) pem(app_identifier: "cash.spont.#{options[:app]}") match(app_identifier: ["cash.spont.#{options[:app]}"], generate_apple_certs: true, type: "appstore") gym(scheme: "Live - #{options[:app]}", output_name: "Live-#{options[:app]}", clean: true, export_method: "app-store", xcargs: "-allowProvisioningUpdates", export_options: { compileBitcode: false, provisioningProfiles: { "cash.spont.#{options[:app]}" => "match AppStore cash.spont.#{options[:app]}" }, signingStyle: "manual" } ) uploadTestflight(options[:beta],options[:app]) if options[:beta] if options[:app] == "horeca" pushToGit("H") else pushToGit("R") end end end def clean_dir reset_git_repo(force: true) ensure_git_status_clean clear_derived_data end def install_pods sh("bundle install") sh("bundle update fastlane") cocoapods( clean: true, podfile: "Podfile", try_repo_update_on_error: true ) xcversion(version: "11.1") end def uploadTestflight(beta, app) changelog = File.read("../releaseNote.md") puts "Should we reject_build_waiting_for_review? = #{beta}" if beta sentTo = ['Fastlane','In App Subscriptions'] else sentTo = ['Fastlane'] end puts sentTo upload_to_testflight( beta_app_review_info: { contact_email: "flip@spont.cash", contact_first_name: "Flip", contact_last_name: "van den Bosch", contact_phone: "+31202251444", demo_account_name: "apple@crypton.nl", demo_account_password: "Apple2016", notes: "We hope you like the new build. <3 If you have any issues, let us know! thank you for reviewing" }, skip_submission: false, ipa: "Live-#{app}.ipa", skip_waiting_for_build_processing: false, beta_app_feedback_email: "flip@spont.cash", beta_app_description: changelog, demo_account_required: true, notify_external_testers: beta, reject_build_waiting_for_review: beta, groups: sentTo, distribute_external: true, changelog: changelog ) end def pushToGit(app) version = get_version_number(xcodeproj: "./spontRestaurantAppIos.xcodeproj", target: "spontRestaurantAppIos") build_number = get_info_plist_value(path: "./spontRestaurantAppIos/Info.plist", key: "CFBundleVersion") add_git_tag( tag: "#{app}/#{version}/B#{build_number}" ) push_git_tags( remote: "git@gitlab.com:cryptonApps/spont/spontv2.git", force: true ) end def inclBuildNumber(app, beta) app_store_build_number(app_identifier: "cash.spont.#{app}") current_version = lane_context[SharedValues::LATEST_VERSION] puts ("Current appstore version is #{current_version}") if beta beta_version = current_version.to_f + 0.1 puts ("Beta version is #{beta_version}") increment_version_number( version_number: "#{beta_version}" # Automatically increment minor version number ) else alpha_version = current_version.to_f + 0.2 puts ("Alpha version is #{alpha_version}") increment_version_number( version_number: "#{alpha_version}" # Automatically increment minor version number ) end version = get_version_number(xcodeproj: "./spontRestaurantAppIos.xcodeproj", target: "spontRestaurantAppIos") build_number = latest_testflight_build_number(version: version, app_identifier: "cash.spont.#{app}") increment_build_number( build_number: build_number + 1 # specify specific build number (optional, omitting it increments by one) ) end end ```
`./fastlane/Appfile` ```ruby apple_id("info@crypton.nl") # Your Apple email address itc_team_id("453487") # App Store Connect Team ID team_id("82R7G284P6") # Developer Portal Team ID ```
### fastlane gems | Gem | Version | Update-Status | | -------- | ------- | ------------- | | fastlane | 2.146.1 | ✅ Up-To-Date | ### Loaded fastlane plugins: | Plugin | Version | Update-Status | | ----------------------- | ------- | ------------- | | fastlane-plugin-trainer | 0.4.1 | ✅ Up-To-Date |
Loaded gems | Gem | Version | | ------------------------- | ------------ | | did_you_mean | 1.3.0 | | bundler | 1.17.3 | | etc | 1.0.1 | | forwardable | 1.2.0 | | CFPropertyList | 3.0.2 | | concurrent-ruby | 1.1.6 | | i18n | 0.9.5 | | minitest | 5.14.0 | | thread_safe | 0.3.6 | | tzinfo | 1.2.7 | | activesupport | 4.2.11.1 | | public_suffix | 2.0.5 | | addressable | 2.7.0 | | httpclient | 2.8.3 | | json | 2.3.0 | | algoliasearch | 1.27.1 | | atomos | 0.1.3 | | aws-eventstream | 1.1.0 | | aws-partitions | 1.303.0 | | aws-sigv4 | 1.1.2 | | jmespath | 1.4.0 | | aws-sdk-core | 3.94.0 | | aws-sdk-kms | 1.30.0 | | aws-sdk-s3 | 1.63.0 | | babosa | 1.0.3 | | claide | 1.0.3 | | fuzzy_match | 2.0.4 | | nap | 1.1.0 | | netrc | 0.11.0 | | ffi | 1.12.2 | | ethon | 0.12.0 | | typhoeus | 1.3.1 | | cocoapods-core | 1.9.1 | | cocoapods-deintegrate | 1.0.4 | | cocoapods-downloader | 1.3.0 | | cocoapods-plugins | 1.0.0 | | cocoapods-search | 1.0.0 | | cocoapods-stats | 1.1.0 | | cocoapods-trunk | 1.4.1 | | cocoapods-try | 1.2.0 | | colored2 | 3.1.2 | | escape | 0.0.4 | | fourflusher | 2.3.1 | | gh_inspector | 1.1.3 | | molinillo | 0.6.6 | | ruby-macho | 1.4.0 | | nanaimo | 0.2.6 | | xcodeproj | 1.16.0 | | cocoapods | 1.9.1 | | colored | 1.2 | | highline | 1.7.10 | | commander-fastlane | 4.4.6 | | declarative | 0.0.10 | | declarative-option | 0.1.0 | | digest-crc | 0.5.1 | | unf_ext | 0.0.7.7 | | unf | 0.1.4 | | domain_name | 0.5.20190701 | | dotenv | 2.7.5 | | emoji_regex | 1.0.1 | | excon | 0.73.0 | | multipart-post | 2.0.0 | | faraday | 0.17.3 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | faraday_middleware | 0.13.1 | | fastimage | 2.1.7 | | jwt | 2.1.0 | | memoist | 0.16.2 | | multi_json | 1.14.1 | | os | 1.1.0 | | signet | 0.14.0 | | googleauth | 0.12.0 | | mini_mime | 1.0.2 | | uber | 0.1.0 | | representable | 3.0.4 | | retriable | 3.1.2 | | google-api-client | 0.36.4 | | google-cloud-env | 1.3.1 | | google-cloud-errors | 1.0.0 | | google-cloud-core | 1.5.0 | | google-cloud-storage | 1.26.0 | | mini_magick | 4.10.1 | | multi_xml | 0.6.0 | | plist | 3.5.0 | | rubyzip | 1.3.0 | | security | 0.1.3 | | naturally | 2.2.0 | | simctl | 1.6.8 | | slack-notifier | 2.3.2 | | terminal-notifier | 2.0.0 | | unicode-display_width | 1.7.0 | | terminal-table | 1.8.0 | | tty-screen | 0.7.1 | | tty-cursor | 0.7.1 | | tty-spinner | 0.9.3 | | word_wrap | 1.0.0 | | rouge | 2.0.7 | | xcpretty | 0.3.0 | | xcpretty-travis-formatter | 1.0.0 | | trainer | 0.9.1 | | fastlane-plugin-trainer | 0.4.1 | | xcode-install | 2.6.4 |
*generated on:* **2020-04-26**
fastlane-bot commented 4 years ago

It seems like you have not included the output of fastlane env To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env :+1:

daraul commented 4 years ago

I'm having this problem as well. See my fastlane env summary below:

✅ fastlane environment ✅ ### Stack | Key | Value | | --------------------------- | -------------------------------------------------------------- | | OS | 10.15.1 | | Ruby | 2.6.3 | | Bundler? | false | | Git | git version 2.21.1 (Apple Git-122.3) | | Installation Source | /usr/local/bin/fastlane | | Host | Mac OS X 10.15.1 (19B88) | | Ruby Lib Dir | /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib | | OpenSSL Version | LibreSSL 2.8.3 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Applications/Xcode.app/Contents/Developer/ | | Xcode Version | 11.3.1 | ### System Locale | Variable | Value | | | -------- | ----------- | - | | LANG | en_US.UTF-8 | ✅ | | LC_ALL | en_US.UTF-8 | ✅ | | LANGUAGE | | | ### fastlane files:
`./fastlane/Fastfile` ```ruby # This file contains the fastlane.tools configuration # You can find the documentation at https://docs.fastlane.tools # # For a list of all available actions, check out # # https://docs.fastlane.tools/actions # # For a list of all available plugins, check out # # https://docs.fastlane.tools/plugins/available-plugins # # Uncomment the line if you want fastlane to automatically update itself # update_fastlane platform :ios do desc "Push a beta build to testflight" lane :beta do match(readonly: is_ci) update_code_signing_settings( use_automatic_signing: false, path: "./platforms/ios/" + ENV['APPLICATION_NAME'] + ".xcodeproj" ) update_project_team( path: "./platforms/ios/" + ENV['APPLICATION_NAME'] + ".xcodeproj", teamid: ENV['DEVELOPMENT_TEAM_ID'] ) gym end end ```
`./fastlane/Appfile` ```ruby # Apple metadata app_identifier(ENV['application_id']) apple_id("xxxx") team_id("xxxx") ```
### fastlane gems | Gem | Version | Update-Status | | -------- | ------- | ------------- | | fastlane | 2.146.1 | ✅ Up-To-Date | ### Loaded fastlane plugins: | Plugin | Version | Update-Status | | ----------------------- | --------- | -------------- | | fastlane-plugin-appicon | undefined | 💥 Check failed |
Loaded gems | Gem | Version | | ------------------------- | ------------ | | did_you_mean | 1.3.0 | | slack-notifier | 2.3.2 | | atomos | 0.1.3 | | CFPropertyList | 2.3.6 | | claide | 1.0.3 | | colored2 | 3.1.2 | | nanaimo | 0.2.6 | | xcodeproj | 1.16.0 | | rouge | 2.0.7 | | xcpretty | 0.3.0 | | terminal-notifier | 2.0.0 | | unicode-display_width | 1.7.0 | | terminal-table | 1.8.0 | | plist | 3.5.0 | | public_suffix | 2.0.5 | | addressable | 2.7.0 | | multipart-post | 2.0.0 | | word_wrap | 1.0.0 | | tty-screen | 0.7.1 | | tty-cursor | 0.7.1 | | tty-spinner | 0.9.3 | | babosa | 1.0.3 | | colored | 1.2 | | highline | 1.7.10 | | commander-fastlane | 4.4.6 | | excon | 0.73.0 | | faraday | 0.17.3 | | unf_ext | 0.0.7.7 | | unf | 0.1.4 | | domain_name | 0.5.20190701 | | http-cookie | 1.0.3 | | faraday-cookie_jar | 0.0.6 | | faraday_middleware | 0.13.1 | | fastimage | 2.1.7 | | gh_inspector | 1.1.3 | | json | 2.1.0 | | mini_magick | 4.10.1 | | multi_xml | 0.6.0 | | rubyzip | 1.3.0 | | security | 0.1.3 | | xcpretty-travis-formatter | 1.0.0 | | dotenv | 2.7.5 | | bundler | 2.1.4 | | naturally | 2.2.0 | | simctl | 1.6.8 | | jwt | 2.1.0 | | uber | 0.1.0 | | declarative | 0.0.10 | | declarative-option | 0.1.0 | | representable | 3.0.4 | | retriable | 3.1.2 | | mini_mime | 1.0.2 | | multi_json | 1.14.1 | | signet | 0.14.0 | | memoist | 0.16.2 | | os | 1.1.0 | | googleauth | 0.12.0 | | httpclient | 2.8.3 | | google-api-client | 0.36.4 | | google-cloud-env | 1.3.1 | | google-cloud-errors | 1.0.0 | | google-cloud-core | 1.5.0 | | digest-crc | 0.5.1 | | google-cloud-storage | 1.26.0 | | emoji_regex | 1.0.1 | | jmespath | 1.4.0 | | aws-partitions | 1.301.0 | | aws-eventstream | 1.1.0 | | aws-sigv4 | 1.1.2 | | aws-sdk-core | 3.94.0 | | aws-sdk-kms | 1.30.0 | | aws-sdk-s3 | 1.63.0 | | forwardable | 1.2.0 | | logger | 1.3.0 | | stringio | 0.0.2 | | ipaddr | 1.2.2 | | openssl | 2.1.2 | | ostruct | 0.1.0 | | strscan | 1.0.0 | | date | 2.0.0 | | fileutils | 1.1.0 | | etc | 1.0.1 | | zlib | 1.0.0 | | libxml-ruby | 3.1.0 | | rexml | 3.1.9 | | psych | 3.1.0 | | mutex_m | 0.1.0 | | webrick | 1.4.2 |
*generated on:* **2020-05-07**
daraul commented 4 years ago

If I generate the push certificate myself, is it safe for me to just push that into the match repo myself? Or with fastlane match import?

fastlane-bot commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

daraul commented 4 years ago

Be great to hear from someone on the team.

fastlane-bot commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

daraul commented 4 years ago

Listen here, bot!

fastlane-bot commented 4 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself :muscle:

fastlane-bot commented 4 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1: