Failed to apply code sign settings for target •••••: failed to get project's target attributes

Hi there. ios-auto-provision-appstoreconnect step failed with the following logs:

| (4) ios-auto-provision-appstoreconnect@0                                     |
+------------------------------------------------------------------------------+
| id: ios-auto-provision-appstoreconnect                                       |
| version: 0.1.0                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2020-07-03T10:22:06Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Config:
- BuildAPIToken: [REDACTED]
- BuildURL: https://app.bitrise.io/build/[redacted]
- ProjectPath: [redacted].xcworkspace
- Scheme: [redacted]-Dev
- Configuration: 
- Distribution: app-store
- MinProfileDaysValid: 0
- CertificateURLList: [REDACTED]
- CertificatePassphraseList: 
- KeychainPath: /Users/vagrant/Library/Keychains/login.keychain
- KeychainPassword: *****
- VerboseLog: false
Creating AppstoreConnectAPI client
the client created for https://api.appstoreconnect.apple.com/
Analyzing project
configuration: Release
project team ID: [redacted]
bundle IDs:
- com.[redacted].ios.dev
platform: iOS
Downloading certificates
1 certificates downloaded:
- Apple Distribution: [redacted], Inc. ([redacted])
ensuring codesigning files for distribution types: [app-store]
Checking app-store provisioning profiles for 1 bundle id(s)
  Checking bundle id: com.[redacted].ios.dev
  capabilities: map[aps-environment:development]
  Bitrise managed profile found: Bitrise iOS app-store - (com.[redacted].ios.dev)
  the profile is not in sync with the project requirements, regenerating ...
  Searching for app ID for bundle ID: com.[redacted].ios.dev
  app ID found: [redacted] iOS App DEV
  app ID capabilities are in sync with the project capabilities
  Creating profile for bundle id: [redacted] iOS App DEV
  profile created: Bitrise iOS app-store - (com.[redacted].ios.dev)
Apply Bitrise managed codesigning on the project
  Target: [redacted]-Dev
  development Team: [redacted], Inc.([redacted])
  provisioning Profile: Bitrise iOS app-store - (com.[redacted].ios.dev)
  certificate: Apple Distribution: [redacted], Inc. ([redacted])
Failed to apply code sign settings for target ([redacted]-Dev): failed to get project's target attributes, error: key: string("TargetAttributes") not found in: serialized.Object(serialized.Object{"LastSwiftUpdateCheck":"1110", "LastUpgradeCheck":"1140", "ORGANIZATIONNAME":"[redacted], Inc."})
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | ios-auto-provision-appstoreconnect@0 (exit code: 1)           | 25.98 sec|
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...se-steplib/steps-ios-auto-provision-appstoreconnect/issues |
| Source: ...thub.com/bitrise-steplib/steps-ios-auto-provision-appstoreconnect |
+---+---------------------------------------------------------------+----------+

When I add the following node into my .pbproj file (into supernode objects / E3E19E12236C4564004FC698 /* Project object */ / attributes), the step works without the issue. But each time I change anything in the project, Xcode automatically removes this node, and the step is failed again.

TargetAttributes = {
  E3E19E43236C75B5004FC698 = {
  };
  E3E19E51236C75BE004FC698 = {
  };
  E3E19E5F236C75C7004FC698 = {
  };
};

This is happen with v2 version of my app, corresponding Xcode project has been created in October 2019, and obviously it uses a bit more modern format, which doesn’t include TargetAttributes node into .pbproj. The old v1 project (which has been created in 2015) does contain this node, and Xcode keeps it on project changes saving (and even keeps some info inside a certain target node, like SystemCapabilities and so on). From my point it looks like the step relies on a project structure which a bit outdated at the moment. Interesting, that once the step is able to find TargetAttributes and target identifier node inside, it thinks that everything is ok, so even empty E3E19E43236C75B5004FC698 subnode works.

Could you please update your step regarding this aspect, or let me know what I could do on my side. Obviously, I do want to use new ios-auto-provision-appstoreconnect step rather than the old one ios-auto-provision. Thanks.

This is happening for us as well. :frowning:

We’re seeing this issue as well.

Same issue

i’m in the same boat.

Same issue here :frowning:

Same problem

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Same issue here!