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

**URL:** <https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530>\
**Category:** Tooling Issues\
**Tags:** ios-auto-provision\
**Created:** [July 3, 2020, 10:41am UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530 "2020-07-03T10:41:26Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shpuntov](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/shpuntov/32/2378_2.png) [@shpuntov](https://discuss.bitrise.io/u/shpuntov)\
**Post date:** [July 3, 2020, 10:41am UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/1 "2020-07-03T10:41:26Z")

</div>

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

```auto
| (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.

```auto
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.

---

<div class="post-metadata">

**Author:** ![kylebrowning](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/kylebrowning/32/2589_2.png) [@kylebrowning](https://discuss.bitrise.io/u/kylebrowning)\
**Post date:** [July 15, 2020, 6:12pm UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/2 "2020-07-15T18:12:05Z")

</div>

This is happening for us as well. ☹

---

<div class="post-metadata">

**Author:** ![rcain](https://avatars.discourse-cdn.com/v4/letter/r/bc8723/32.png) [@rcain](https://discuss.bitrise.io/u/rcain)\
**Post date:** [July 16, 2020, 6:29pm UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/3 "2020-07-16T18:29:46Z")

</div>

We’re seeing this issue as well.

---

<div class="post-metadata">

**Author:** ![garrettfritz](https://avatars.discourse-cdn.com/v4/letter/g/ba9def/32.png) [@garrettfritz](https://discuss.bitrise.io/u/garrettfritz)\
**Post date:** [July 23, 2020, 12:55pm UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/4 "2020-07-23T12:55:55Z")

</div>

Same issue

---

<div class="post-metadata">

**Author:** ![jeyremy](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@jeyremy](https://discuss.bitrise.io/u/jeyremy)\
**Post date:** [July 30, 2020, 6:14pm UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/5 "2020-07-30T18:14:41Z")

</div>

i’m in the same boat.

---

<div class="post-metadata">

**Author:** ![pgorrindo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/pgorrindo/32/3100_2.png) [@pgorrindo](https://discuss.bitrise.io/u/pgorrindo)\
**Post date:** [August 14, 2020, 1:48pm UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/6 "2020-08-14T13:48:28Z")

</div>

Same issue here ☹

---

<div class="post-metadata">

**Author:** ![blau2](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@blau2](https://discuss.bitrise.io/u/blau2)\
**Post date:** [August 25, 2020, 10:47am UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/7 "2020-08-25T10:47:23Z")

</div>

Same problem

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [September 24, 2020, 10:47am UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/8 "2020-09-24T10:47:27Z")

</div>

Closed on September 24, 2020, 10:47am UTC

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

---

<div class="post-metadata">

**Author:** ![aim-atlas](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@aim-atlas](https://discuss.bitrise.io/u/aim-atlas)\
**Post date:** [September 30, 2020, 7:22am UTC](https://discuss.bitrise.io/t/failed-to-apply-code-sign-settings-for-target-failed-to-get-projects-target-attributes/13530/9 "2020-09-30T07:22:08Z")

</div>

Same issue here!
