Skip to content

Commit db3b1e9

Browse files
[sigh][match] fix issue where unknown attribute template_name is being sent when creating provisioning profiles (fastlane#29591)
* fix(apple deployment): remove template_name since apple seemed to have dropped support for it: https://developer.apple.com/documentation/appstoreconnectapi/profilecreaterequest/data-data.dictionary/attributes-data.dictionary * Mark `template_name` options as deprecated. * Show a warning for users using `template_name`. * Document changes to managed capabilities (fka custom entitlements). --------- Co-authored-by: Roger Oba <rogerluan.oba@gmail.com>
1 parent d7f1ca8 commit db3b1e9

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

fastlane/lib/fastlane/actions/docs/sync_code_signing.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,14 +406,16 @@ If you're not using `Fastfile`, you can also use the `force_for_new_devices` opt
406406
fastlane match adhoc --force_for_new_devices
407407
```
408408

409-
##### Templates (aka: custom entitlements)
409+
##### Managed capabilities
410410

411-
_match_ can generate profiles that contain custom entitlements by passing in the entitlement's name with the `template_name` parameter.
411+
> [!IMPORTANT]
412+
> This feature has been deprecated since May 2025, until Apple provides a new solution. We will update this documentation once we have more information on how to handle managed capabilities in the future.
412413
413-
```
414-
match(type: "development",
415-
template_name: "Apple Pay Pass Suppression Development")
416-
```
414+
Managed capabilities — formerly known as "additional entitlements" or "custom entitlements", enabled via "templates" — are additional capabilities that require Apple's review and approval before they can be distributed.
415+
416+
These capabilities used to be enabled by passing a `template_name` parameter to the _match_ action, which would then generate a provisioning profile with the entitlements specified by the given template. However, this feature was never officially supported by Apple's API (undocumented), and they eventually removed it in May 2025 ([see issue #29498](https://github.com/fastlane/fastlane/issues/29498)). Apple still hasn't provided a replacement for this functionality.
417+
418+
As a result, the `template_name` parameter was deprecated in the _match_ action, and it will not generate provisioning profiles with custom entitlements.
417419

418420
### Setup Xcode project
419421

match/lib/match/options.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ def self.available_options
327327
env_name: "MATCH_PROVISIONING_PROFILE_TEMPLATE_NAME",
328328
description: "The name of provisioning profile template. If the developer account has provisioning profile templates (aka: custom entitlements), the template name can be found by inspecting the Entitlements drop-down while creating/editing a provisioning profile (e.g. \"Apple Pay Pass Suppression Development\")",
329329
optional: true,
330+
deprecated: "Removed since May 2025 on App Store Connect API OpenAPI v3.8.0 - Learn more: https://docs.fastlane.tools/actions/match/#managed-capabilities",
330331
default_value: nil),
331332
FastlaneCore::ConfigItem.new(key: :profile_name,
332333
env_name: "MATCH_PROVISIONING_PROFILE_NAME",

sigh/lib/sigh/options.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def self.available_options
190190
env_name: "SIGH_PROVISIONING_PROFILE_TEMPLATE_NAME",
191191
description: "The name of provisioning profile template. If the developer account has provisioning profile templates (aka: custom entitlements), the template name can be found by inspecting the Entitlements drop-down while creating/editing a provisioning profile (e.g. \"Apple Pay Pass Suppression Development\")",
192192
optional: true,
193+
deprecated: "Removed since May 2025 on App Store Connect API OpenAPI v3.8.0 - Learn more: https://docs.fastlane.tools/actions/match/#managed-capabilities",
193194
default_value: nil),
194195
FastlaneCore::ConfigItem.new(key: :fail_on_name_taken,
195196
env_name: "SIGH_FAIL_ON_NAME_TAKEN",

sigh/lib/sigh/runner.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,16 @@ def create_profile!
174174

175175
UI.important("Creating new provisioning profile for '#{Sigh.config[:app_identifier]}' with name '#{name}' for '#{Sigh.config[:platform]}' platform")
176176

177+
unless Sigh.config[:template_name].nil?
178+
UI.important("Template name is set to '#{Sigh.config[:template_name]}', however, this is not supported by the App Store Connect API anymore, since May 2025. The template name will be ignored. For more information: https://docs.fastlane.tools/actions/match/#managed-capabilities")
179+
end
180+
177181
profile = Spaceship::ConnectAPI::Profile.create(
178182
name: name,
179183
profile_type: profile_type,
180184
bundle_id_id: bundle_id.id,
181185
certificate_ids: certificates_to_use.map(&:id),
182-
device_ids: devices_to_use.map(&:id),
183-
template_name: Sigh.config[:template_name]
186+
device_ids: devices_to_use.map(&:id)
184187
)
185188

186189
profile

spaceship/lib/spaceship/connect_api/models/profile.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,15 @@ def self.all(client: nil, filter: {}, includes: nil, fields: nil, limit: Spacesh
8484
return resps.flat_map(&:to_models)
8585
end
8686

87-
def self.create(client: nil, name: nil, profile_type: nil, bundle_id_id: nil, certificate_ids: nil, device_ids: nil, template_name: nil)
87+
def self.create(client: nil, name: nil, profile_type: nil, bundle_id_id: nil, certificate_ids: nil, device_ids: nil)
8888
client ||= Spaceship::ConnectAPI
8989
resp = client.post_profiles(
9090
bundle_id_id: bundle_id_id,
9191
certificates: certificate_ids,
9292
devices: device_ids,
9393
attributes: {
9494
name: name,
95-
profileType: profile_type,
96-
templateName: template_name
95+
profileType: profile_type
9796
}
9897
)
9998
return resp.to_models.first

0 commit comments

Comments
 (0)