You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When multiple matching code sign identities exist in apple developer, match just picks the first one.
This results in xcode showing the error "Provisioning profile 'match AppStore appID' doesn't include signing certificate 'Apple Distribution: XXX (someID)'.
To work around this, we need to manually change the provisioning profile <> certificate mapping in apple developer.
As the purpose of match is to handle the management of all the signing assets, requiring manual remapping should not be necessary.
Picking the first certificate doesn't seem like a good behaviour. As the command only warns about multiple certificates, how should the developer know that there is an explicit configuration by him necessary to ensure match works well?
Match should manage it.
If match is not able to manage it, fail the command and enforce that the developer specifies the correct certificate in Matchfile. Manually remapping it in apple developer is not verbose & transparent.
If match just picks an arbitrary certificate, then the one with the latest issue date or the latest expiration date seems more reasonable.
Command executed
bundle exec fastlane prep_signing
Fastfile
# 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
default_platform(:ios)
platform :ios do
lane :prep_signing do
# Locally, fetch codesign repo using SSH, online with HTTPS, PAT-authorized.
if is_ci
git_url = "xxx"
else
git_url = "xxx"
end
match(
git_url: git_url,
git_basic_authorization: ENV["MATCH_GIT_BASIC_AUTHORIZATION"],
type: "appstore",
readonly: false,
app_identifier: "xxx",
force: true,
force_for_new_devices: true,
force_for_new_certificates: true,
include_all_certificates: true
)
end
desc "Push a new beta build to TestFlight"
lane :beta do
prep_signing
# clear_derived_data
build_app(workspace: "xxx.xcworkspace", scheme: "prod")
if is_ci
upload
end
end
desc "Uploads binary to TestFlight"
lane :upload do
app_store_connect_api_key(
key_id: "xxx",
# Get from here: https://appstoreconnect.apple.com/access/api
issuer_id: "xxx",
# Ensure key is available, e.g., by export FASTLANE_ITUNES_CONNECT_API_KEY_BASE64=".."
key_content: ENV["FASTLANE_ITUNES_CONNECT_API_KEY_BASE64"],
is_key_content_base64: true,
duration: 500
)
pilot
end
end
Complete output when running fastlane, including the stack trace and command used
[14:35:38]: Successfully logged in
[14:35:38]: Fetching profiles...
[14:35:39]: Found 1 matching profile(s)
[14:35:39]: Recreating the profile
[14:35:40]: Creating new provisioning profile for 'xxx' with name 'match AppStore xxx' for 'ios' platform
[14:35:41]: Found more than one code signing identity. Choosing the first one. Check out `fastlane sigh --help` to see all available options.
[14:35:41]: Available Code Signing Identities for current filters:
[14:35:41]: - Name: xxx - ID: xxx - Expires 2024-02-17
[14:35:41]: - Name: xxx - ID: xxx - Expires 2024-06-22
[14:35:41]: Downloading provisioning profile...
[14:35:41]: Successfully downloaded provisioning profile...
[14:35:41]: Installing provisioning profile...
/var/folders/xxx
[14:35:41]: Installing provisioning profile...
[14:35:42]: 🔒 Successfully encrypted certificates repo
[14:35:42]: Pushing changes to remote git repo...
[14:35:44]: Finished uploading files to Git Repo [ssh://git@github.com/xxx]
+---------------------+------------------------------------------------------------+------------------------------------------------------------+
| Installed Provisioning Profile |
+---------------------+------------------------------------------------------------+------------------------------------------------------------+
| Parameter | Environment Variable | Value |
+---------------------+------------------------------------------------------------+------------------------------------------------------------+
| App Identifier | | xxx |
| Type | | appstore |
| Platform | | ios |
| Profile UUID | xxx | xxx |
| Profile Name | sigh_xxx_appstore_profile-name | match AppStore xxx |
| Profile Path | sigh_xxx_appstore_profile-path | /xxx |
| | | Profiles/xxx |
| | | sion |
| Development Team ID | sigh_com.xxx_appstore_team-id | xxx |
| Certificate Name | sigh_com.xxx_appstore_certificate-nam | Apple Distribution: xxx (xxx) |
| | e | |
+---------------------+------------------------------------------------------------+------------------------------------------------------------+
[14:35:44]: All required keys, certificates and provisioning profiles are installed 🙌
[14:35:44]: Setting Provisioning Profile type to 'app-store'
New Issue Checklist
Issue Description
When multiple matching code sign identities exist in apple developer, match just picks the first one.
This results in xcode showing the error "Provisioning profile 'match AppStore appID' doesn't include signing certificate 'Apple Distribution: XXX (someID)'.
To work around this, we need to manually change the provisioning profile <> certificate mapping in apple developer.
Related issues & content
Expected/Suggested behaviour
Command executed
Fastfile
Complete output when running fastlane, including the stack trace and command used
Environment
fastlane gems
Loaded fastlane plugins:
No plugins Loaded
Loaded gems
The text was updated successfully, but these errors were encountered: