How to Resolve Core Data Composite Attributes Errors in Xcode?

How do I resolve these errors reported in Xcode about using Core Data Composite Attributes feature?

Composite Attributes feature requires tvOS deployment target 17.0 or later

Composite Attributes feature requires watchOS deployment target 10.0 or later

My app is a Cocoa app and targets macOS 14.0+. I do not have an iOS, iPadOS, tvOS nor watchOS targets. So, I don't understand why I am getting these errors.

My Xcode project format is set to Xcode 16.0.

I am on macOS Sequoia 15.2 (24C101) and using Xcode Version 16.2 (16C5032a).

If you create a new Xcode project and choose macOS > App and Storage > Core Data and then Add Composite Type and set an attribute name and type, you will get the errors.

Answered by DTS Engineer in 821532022

I believe this is an Xcode bug, and would suggest that you file a feedback report – If you do so, please share your report ID here.

Interesting enough, I can fix the issue with the following steps:

  1. Run Xcode > Product > Clear All Issues
  2. Run Xcode > Product > Clear Build Folders...
  3. Build again.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I believe this is an Xcode bug, and would suggest that you file a feedback report – If you do so, please share your report ID here.

Interesting enough, I can fix the issue with the following steps:

  1. Run Xcode > Product > Clear All Issues
  2. Run Xcode > Product > Clear Build Folders...
  3. Build again.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I have filed a feedback report, FB16341774.

I tried your steps and it works but the errors come back after a little while, whilst working on the project.

How to Resolve Core Data Composite Attributes Errors in Xcode?
 
 
Q