fastlane: Match: template_name param is not being honored

New Issue Checklist

Issue Description

Currently when running fastlane match with the template_name parameter, the custom entitlement is not being selected in the profile in the apple developer portal. After creating a new template with Match, the entitlement selected is still default.

Screen Shot 2021-04-05 at 6 46 33 PM In the above image, our entitlement should have been selected from the template_name parameter.

Passing a non-existent template_name to match returns an error, so clearly Match is able to see the available template names on the developer portal.

Command executed

This has failed both in the context of a fastfile, and from the commandline: in a fastfile I have tried:

    match(
        app_identifier: "our.company.app.identifier",
        type: "adhoc",
        force: true,
        git_branch: "master",
        git_url: "redacted",
        keychain_password:"redacted",
        shallow_clone: true,
        readonly: false,
        generate_apple_certs: true,
        team_id: "OurTeamId",
        template_name: "Our Template Name",
        verbose: true
    )

and from commandline:

bundle exec fastlane match -a our.company.app.identifier -u person@email.com -r https://some.git.address -p secret --template_name "Custom Template Name" --shallow_clone --force --clone_branch_directly -y adhoc --generate_apple_certs true
Complete output when running fastlane, including the stack trace and command used
 
leiftaylor:fastlane leif.taylor$ bundle exec fastlane create_adhoc_provisioning_profile
[✔] 🚀 

±------------------------±--------±------------------------+ | Used plugins | ±------------------------±--------±------------------------+ | Plugin | Version | Action | ±------------------------±--------±------------------------+ | fastlane-plugin-appicon | 0.16.0 | android_appicon appicon | | fastlane-plugin-trainer | 0.4.1 | trainer | ±------------------------±--------±------------------------+

18:21:45: — Step: default_platform — 18:21:45: ------------------------------ 18:21:45: Driving the lane ‘create_adhoc_provisioning_profile’ 🚀 INFO [2021-04-05 18:21:45.55]: ------------------- INFO [2021-04-05 18:21:45.55]: — Step: match — INFO [2021-04-05 18:21:45.55]: -------------------

±-------------------------------±-------------------------------------------------------------------------------------+ | Summary for match 2.179.0 | ±-------------------------------±-------------------------------------------------------------------------------------+ | app_identifier | [“REDACTED”] | | type | adhoc | | force | true | | git_branch | master | | git_url | https://REDACTED | | keychain_password | ******** | | shallow_clone | true | | readonly | false | | generate_apple_certs | true | | team_id | REDACTED | | template_name | Our Template Name | | profile_name | Custom Test Profile | | verbose | true | | skip_provisioning_profiles | false | | storage_mode | git | | clone_branch_directly | false | | keychain_name | login.keychain | | force_for_new_devices | false | | skip_confirmation | false | | skip_docs | false | | platform | ios | | derive_catalyst_app_identifier | false | | fail_on_name_taken | false | | skip_certificate_matching | false | | skip_set_partition_list | false | ±-------------------------------±-------------------------------------------------------------------------------------+

INFO [2021-04-05 18:21:45.55]: Cloning remote git repo… INFO [2021-04-05 18:21:45.55]: If cloning the repo takes too long, you can use the clone_branch_directly option in match. INFO [2021-04-05 18:21:45.55]: $ git clone https://REDACTED.git /var/folders/26/sfx5pkj17b1dfkhshvbg52640000gn/T/d20210405-55881-rt4qmd --depth 1 --no-single-branch /REDACTED/ruby/2.7.0/gems/json-2.1.0/lib/json/common.rb:156: warning: Using the last argument as keyword parameters is deprecated INFO [2021-04-05 18:21:45.56]: ▸ Cloning into ‘/var/folders/26/sfx5pkj17b1dfkhshvbg52640000gn/T/d20210405-55881-rt4qmd’… INFO [2021-04-05 18:21:46.39]: ▸ remote: Enumerating objects: 523, done. INFO [2021-04-05 18:21:46.40]: ▸ remote: Counting objects: 100% (523/523), done. INFO [2021-04-05 18:21:46.45]: ▸ remote: Compressing objects: 100% (513/513), done. INFO [2021-04-05 18:21:47.20]: ▸ remote: Total 523 (delta 6), reused 449 (delta 3), pack-reused 0 INFO [2021-04-05 18:21:47.20]: ▸ Receiving objects: 100% (523/523), 3.85 MiB | 5.16 MiB/s, done. INFO [2021-04-05 18:21:47.20]: ▸ Resolving deltas: 100% (6/6), done. INFO [2021-04-05 18:21:47.30]: $ git --no-pager branch --list origin/master --no-color -r INFO [2021-04-05 18:21:47.30]: ▸ origin/master INFO [2021-04-05 18:21:47.30]: Checking out branch master… INFO [2021-04-05 18:21:47.30]: $ git checkout master INFO [2021-04-05 18:21:47.33]: ▸ Already on ‘master’ INFO [2021-04-05 18:21:47.33]: ▸ Your branch is up to date with ‘origin/master’.

INFO [2021-04-05 18:21:47.52]: 🔓 Successfully decrypted certificates repo INFO [2021-04-05 18:21:47.52]: Verifying that the certificate and profile are still valid on the Dev Portal… Successfully loaded Appfile at path ‘/Users/REDACTED/fastlane/Appfile’

DEBUG [2021-04-05 18:21:52.84]: Certificate ‘K58697M684.cer’ is already installed on this machine

±------------------±------------------------------------------------------+ | Installed Certificate | ±------------------±------------------------------------------------------+ | User ID | 7CX467744C | | Common Name | Apple Distribution: REDACTED (REDACTED) | | Organisation Unit | REDACTED | | Organisation | REDACTED | | Country | US | | Start Datetime | 2020-08-06 15:28:53 UTC | | End Datetime | 2021-08-06 15:28:53 UTC | ±------------------±------------------------------------------------------+

±------------------------------------±----------------------------------+ | Summary for sigh 2.179.0 | ±------------------------------------±----------------------------------+ | app_identifier | com.REDACTED | | force | true | | cert_id | REDACTED | | ignore_profiles_with_different_name | true | | team_id | REDACTED | | template_name | Our Custom Profile Name (Redacted) | | fail_on_name_taken | false | | platform | ios | | adhoc | true | | developer_id | false | | development | false | | skip_install | false | | skip_fetch_profiles | false | | skip_certificate_verification | false | | readonly | false | ±------------------------------------±----------------------------------+

INFO [2021-04-05 18:22:03.69]: $ security list-keychains -d user INFO [2021-04-05 18:22:03.71]: ▸ “/Users/REDACTED” INFO [2021-04-05 18:22:03.71]: ▸ “/Users/REDACTED” INFO [2021-04-05 18:22:03.71]: $ security find-certificate -a -c ‘Apple Worldwide Developer Relations Certification Authority’ /REDACTED INFO [2021-04-05 18:22:03.73]: ▸ keychain: “/Users/REDACTED” INFO [2021-04-05 18:22:03.73]: ▸ version: 512 INFO [2021-04-05 18:22:03.73]: ▸ class: 0x80001000 INFO [2021-04-05 18:22:03.73]: ▸ attributes: INFO [2021-04-05 18:22:03.73]: ▸ “alis”<blob>=“Apple Worldwide Developer Relations Certification Authority” INFO [2021-04-05 18:22:03.73]: ▸ “cenc”<uint32>=0x00000003 INFO [2021-04-05 18:22:03.73]: ▸ “ctyp”<uint32>=0x00000001 INFO [2021-04-05 18:22:03.73]: ▸ “hpky”<blob>=REDACTED “\210’\027\011\251\266\030\213\354\353\272\366GY\305RT\243\267" INFO [2021-04-05 18:22:03.73]: ▸ "issu"<blob>=REDACTED "0b1\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\012\023\012APPLE INC.1&0$\006\003U\004\013\023\035APPLE CERTIFICATION AUTHORITY1\0260\024\006\003U\004\003\023\015APPLE ROOT CA" INFO [2021-04-05 18:22:03.73]: ▸ "labl"<blob>="Apple Worldwide Developer Relations Certification Authority" INFO [2021-04-05 18:22:03.73]: ▸ "skid"<blob>=REDACTED "\210'\027\011\251\266\030\213\354\353\272\366GY\305RT\243\267” INFO [2021-04-05 18:22:03.73]: ▸ “snbr”<blob>=0x01DEBCC4396DA010 “\001\336\274\3049m\240\020” INFO [2021-04-05 18:22:03.73]: ▸ “subj”<blob>=REDACTED “0\201\2261\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\012\014\012Apple Inc.1,0*\006\003U\004\013\014#Apple Worldwide Developer Relations1D0B\006\003U\004\003\014;Apple Worldwide Developer Relations Certification Authority” INFO [2021-04-05 18:22:03.73]: ▸ keychain: “/Users/REDACTED” INFO [2021-04-05 18:22:03.73]: ▸ version: 512 INFO [2021-04-05 18:22:03.73]: ▸ class: 0x80001000 INFO [2021-04-05 18:22:03.73]: ▸ attributes: INFO [2021-04-05 18:22:03.73]: ▸ “alis”<blob>=“Apple Worldwide Developer Relations Certification Authority” INFO [2021-04-05 18:22:03.73]: ▸ “cenc”<uint32>=0x00000003 INFO [2021-04-05 18:22:03.73]: ▸ “ctyp”<uint32>=0x00000001 INFO [2021-04-05 18:22:03.73]: ▸ “hpky”<blob>=0x09FEC01590F9AF640A9212B92628630C97ECA7B2 “\011\376\300\025\220\371\257d\012\222\022\271&(c\014\227\354\247\262” INFO [2021-04-05 18:22:03.73]: ▸ “issu”<blob>=REDACTED “0b1\0130\011\006\003U\004\006\023\002US1\0230\021\006\003U\004\012\023\012APPLE INC.1&0$\006\003U\004\013\023\035APPLE CERTIFICATION AUTHORITY1\0260\024\006\003U\004\003\023\015APPLE ROOT CA” INFO [2021-04-05 18:22:03.73]: ▸ “labl”<blob>=“Apple Worldwide Developer Relations Certification Authority” INFO [2021-04-05 18:22:03.73]: ▸ “skid”<blob>=0x09FEC01590F9AF640A9212B92628630C97ECA7B2 “\011\376\300\025\220\371\257d\012\222\022\271&(c\014\227\354\247\262” INFO [2021-04-05 18:22:03.73]: ▸ “snbr”<blob>=0x7CAF690A25B739FE7B9B447AC178C5EE “|\257i\012%\2679\376{\233Dz\301x\305\356” INFO [2021-04-05 18:22:03.73]: ▸ “subj” WARN [2021-04-05 18:22:04.61]: Downloading provisioning profile… INFO [2021-04-05 18:22:04.61]: Successfully downloaded provisioning profile… INFO [2021-04-05 18:22:04.69]: Installing provisioning profile… /var/folders/26/REDACTED INFO [2021-04-05 18:22:04.77]: Installing provisioning profile… INFO [2021-04-05 18:22:08.24]: 🔒 Successfully encrypted certificates repo INFO [2021-04-05 18:22:08.24]: Pushing changes to remote git repo… INFO [2021-04-05 18:22:08.24]: $ git add /var/folders/REDACTED INFO [2021-04-05 18:22:08.25]: $ git commit -m [fastlane]\ Updated\ adhoc\ and\ platform\ ios INFO [2021-04-05 18:22:08.29]: ▸ [master 0ec8fea] [fastlane] Updated adhoc and platform ios INFO [2021-04-05 18:22:08.29]: ▸ 1 file changed, 227 insertions(+), 227 deletions(-) INFO [2021-04-05 18:22:08.29]: ▸ rewrite profiles/adhoc/AdHoc_com.redacted.mobileprovision (100%) INFO [2021-04-05 18:22:08.29]: $ git push origin master INFO [2021-04-05 18:22:08.65]: ▸ Enumerating objects: 15, done. INFO [2021-04-05 18:22:08.65]: ▸ Counting objects: 100% (15/15), done. INFO [2021-04-05 18:22:08.65]: ▸ Delta compression using up to 12 threads INFO [2021-04-05 18:22:08.65]: ▸ Compressing objects: 100% (5/5), done. INFO [2021-04-05 18:22:08.65]: ▸ Writing objects: 100% (5/5), 10.69 KiB | 10.69 MiB/s, done. INFO [2021-04-05 18:22:08.65]: ▸ Total 5 (delta 2), reused 0 (delta 0) INFO [2021-04-05 18:22:08.93]: ▸ To https://REDACTED INFO [2021-04-05 18:22:08.93]: ▸ 313612d…0ec8fea master -> master INFO [2021-04-05 18:22:08.93]: Finished uploading files to Git Repo [https://REDACTED]

±--------------------±----------------------------------------------------------±--------------------------------------------------------------+ | Installed Provisioning Profile | ±--------------------±----------------------------------------------------------±--------------------------------------------------------------+ | Parameter | Environment Variable | Value | ±--------------------±----------------------------------------------------------±--------------------------------------------------------------+ | App Identifier | | com.REDACTED | | Type | | adhoc | | Platform | | ios | | Profile UUID | sigh_com.REDACTED | REDACTED | | Profile Name | sigh_com.REDACTED | Custom Test Profile | | Profile Path | sigh_com.REDACTED | /Users/REDAACTED/Library/MobileDevice/Provisioning | | | | Profiles/REDACTED.mobileprovision | | Development Team ID | sigh_com.REDACTED | REDACTED | ±--------------------±----------------------------------------------------------±--------------------------------------------------------------+

INFO [2021-04-05 18:22:09.00]: All required keys, certificates and provisioning profiles are installed 🙌 INFO [2021-04-05 18:22:09.00]: Setting Provisioning Profile type to ‘ad-hoc’ INFO [2021-04-05 18:22:09.00]: Successfully generated documentation at path ‘/Users/REDACTED/fastlane/README.md’

±-----±-----------------±------------+ | fastlane summary | ±-----±-----------------±------------+ | Step | Action | Time (in s) | ±-----±-----------------±------------+ | 1 | default_platform | 0 | | 2 | match | 23 | ±-----±-----------------±------------+

DEBUG [2021-04-05 18:22:09.01]: All plugins are up to date INFO [2021-04-05 18:22:09.01]: fastlane.tools finished successfully 🎉 DEBUG [2021-04-05 18:22:09.01]: All plugins are up to date

Environment

 
✅ fastlane environment ✅

Stack

Key Value
OS 10.15.5
Ruby 2.7.0
Bundler? true
Git git version 2.21.0
Installation Source ~/Redacted/vendor/bundle/ruby/2.7.0/bin/fastlane
Host Mac OS X 10.15.5 (19F101)
Ruby Lib Dir ~/.rvm/rubies/ruby-2.7.0/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-11.app/Contents/Developer/
Xcode Version 11.0

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane gems

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

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-appicon 0.16.0 ✅ Up-To-Date
fastlane-plugin-trainer 0.4.1 ✅ Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.4.0
bundler 2.2.1
uri 0.10.0
rake 13.0.3
CFPropertyList 3.0.3
concurrent-ruby 1.1.8
i18n 1.8.10
minitest 5.14.4
thread_safe 0.3.6
tzinfo 1.2.9
activesupport 5.2.5
public_suffix 4.0.6
addressable 2.7.0
httpclient 2.8.3
json 2.1.0
algoliasearch 1.27.5
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.1.1
aws-partitions 1.441.0
aws-sigv4 1.2.3
jmespath 1.4.0
aws-sdk-core 3.113.1
aws-sdk-kms 1.43.0
aws-sdk-s3 1.93.0
babosa 1.0.4
claide 1.0.3
colored2 3.1.2
cork 0.3.0
nap 1.1.0
open4 1.3.4
claide-plugins 0.9.2
clamp 1.3.2
fuzzy_match 2.0.4
netrc 0.11.0
ffi 1.15.0
ethon 0.12.0
typhoeus 1.4.0
cocoapods-core 1.10.1
cocoapods-deintegrate 1.0.4
cocoapods-downloader 1.4.0
cocoapods-plugins 1.0.0
cocoapods-search 1.0.0
cocoapods-trunk 1.5.0
cocoapods-try 1.2.0
escape 0.0.4
fourflusher 2.3.1
gh_inspector 1.1.3
molinillo 0.6.6
ruby-macho 1.4.0
nanaimo 0.3.0
xcodeproj 1.19.0
cocoapods 1.10.1
colored 1.2
highline 1.7.10
commander-fastlane 4.4.6
faraday-net_http 1.0.1
multipart-post 2.0.0
ruby2_keywords 0.0.4
faraday 1.3.0
faraday-http-cache 2.2.0
rchardet 1.8.0
git 1.8.1
rexml 3.2.5
kramdown 2.3.1
kramdown-parser-gfm 1.1.0
no_proxy_fix 0.1.2
sawyer 0.8.2
octokit 4.20.0
unicode-display_width 1.7.0
terminal-table 1.8.0
danger 8.2.3
danger-plugin-api 1.0.0
danger-jazzy 1.1.0
ox 2.14.4
danger-junit 1.0.2
racc 1.5.2
nokogiri 1.11.2
slather 2.7.0
danger-slather 0.0.6
danger-swiftformat 0.8.1
thor 0.20.3
danger-swiftlint 0.26.0
danger-xcode_summary 0.5.2
declarative 0.0.20
declarative-option 0.1.0
digest-crc 0.6.3
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.6
emoji_regex 3.2.2
excon 0.79.0
http-cookie 1.0.3
faraday-cookie_jar 0.0.7
faraday_middleware 1.0.0
fastimage 2.2.3
jwt 2.2.2
memoist 0.16.2
multi_json 1.15.0
os 1.1.1
signet 0.15.0
googleauth 0.16.1
mini_mime 1.1.0
uber 0.1.0
representable 3.0.4
retriable 3.1.2
google-api-client 0.38.0
webrick 1.7.0
google-apis-core 0.3.0
google-apis-iamcredentials_v1 0.3.0
google-apis-storage_v1 0.3.0
google-cloud-env 1.5.0
google-cloud-errors 1.1.0
google-cloud-core 1.6.0
google-cloud-storage 1.31.0
mini_magick 4.11.0
naturally 2.2.1
plist 3.6.0
rubyzip 2.3.0
security 0.1.3
simctl 1.6.8
slack-notifier 2.3.2
terminal-notifier 2.0.0
tty-screen 0.8.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.1
fastlane-plugin-appicon 0.16.0
trainer 0.9.1
fastlane-plugin-trainer 0.4.1
mustache 1.1.1
redcarpet 3.5.1
sassc 2.4.0
sqlite3 1.4.2
liferaft 0.0.6
xcinvoke 0.3.0
jazzy 0.13.6
xcpretty-json-formatter 0.1.1

generated on: 2021-04-05

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17

Most upvoted comments

The match parameter isn’t working for me either. I can edit it manually on the Apple Developer site but this defeats the purpose and I worry that’s just going to break in 12 months time when the certificate expires