So I have a SwiftUI app and this worked until this week when I got a new work computer and then my CI setup suddenly broke.
<work_dir>/AppName.xcodeproj: error: Provisioning profile "match AppStore APP_ID" doesn't include signing certificate "Apple Development: Personal Name (PERSONAL_TEAM_ID)". (in target 'AppName' from project 'AppName')
what's odd is fastlane match is pulling the correct provisions profile in the previous step.
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Installed Provisioning Profile |
+---------------------+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| Parameter | Environment Variable | Value |
+---------------------+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
| App Identifier | | APP_ID |
| Type | | appstore |
| Platform | | ios |
| Profile UUID | sigh_APP_ID_appstore | UUID |
| Profile Name | sigh_APP_ID_appstore_profile-name | match AppStore APP_ID |
| Profile Path | sigh_APP_ID_appstore_profile-path | /Users/runner/Library/MobileDevice/Provisioning Profiles/UUID.mobileprovision |
| Development Team ID | sigh_APP_ID_appstore_team-id | WORK_TEAM_ID |
| Certificate Name | sigh_APP_ID_appstore_certificate-name | Apple Distribution: Company Name (WORK_TEAM_ID) |
+---------------------+-------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+
I can't figure out why it's not using the profile that is clearly installed.
Fastlane
lane :beta do
setup_ci if ENV['CI']
api_key = app_store_connect_api_key(
key_id: ENV["ASCAPI_KEY_ID"],
issuer_id: ENV["ASCAPI_ISSUER_ID"],
key_content: ENV["ASCAPI_KEY"],
is_key_content_base64: true
)
increment_build_number(
xcodeproj: "AppName.xcodeproj",
build_number: ENV['BUILD_NUMBER']
)
match(type: "appstore", readonly: true)
update_code_signing_settings(
bundle_identifier: "app_id",
use_automatic_signing: false,
team_id: "WORK_TEAM_ID",
targets: ["AppName"],
profile_name: "match AppStore app_id"
)
update_code_signing_settings(
bundle_identifier: "app_idTests",
use_automatic_signing: false,
team_id: "WORK_TEAM_ID",
targets: ["appNameTests"],
profile_name: "match AppStore app_idTests"
)
build_app(
scheme: "app_name",
export_method: "app-store",
export_options: {
provisioningProfiles: {
"app_id" => "match AppStore app_id",
"app_idTests" => "match AppStore app_idTests"
}
}
)
upload_to_testflight(
api_key: api_key,
skip_waiting_for_build_processing: true
)
end
end
I've tried deleting the profiles locally, nuking them from fastlane, restarting my computer, and regenerating them, and that didn't get me any where either.
I've checked that the provisioning profile in xcode locally is set to the correct app store profile, and it shows as valid, and looking for my work profile.
I have no idea where it's getting my personal provisioning profile from.