Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ARC-related build failure for OS X Yosemite, XCode 6.1

I have a project that is non-ARC, uses Core Data, and builds just fine when on Mavericks, XCode 6.1. However, when I try to build with XCode 6.1 on Yosemite, I get ARC-related build errors in the Core Data framework. Most errors are:

ARC Semantic Issue - Pointer to non-const type 'id' with no explicit ownership

These occur in NSEntityDescription.h, NSFetchRequest.h, NSManagedObjectModel.h, etc.

I have tried:

  • Removing and re-adding the Core Data framework
  • Quitting and restarting XCode (works for half of my wacky XCode errors...)
  • Running Product --> Clean before building
  • Deleting derived data for the project in the Organizer
  • Checking that "Objective-C Automatic Reference Counting" is set to "No" in Build Settings

Any ideas? Thanks!

like image 790
user1021430 Avatar asked Oct 31 '22 15:10

user1021430


1 Answers

I was able to fix this error by resetting Framework Search Paths in Build Settings.

Steps:

1) Go to Build Settings and find Search Paths

2) In that section, double click on Framework Search Paths. I saw these for my project:

$(inherited)

$(PROJECT_DIR)

$(DEVELOPER_DIR)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks

3) Remove the third one - $(DEVELOPER_DIR)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks

I had to remove and re-add a framework that was acting up, but otherwise, that's all it took.

like image 185
user1021430 Avatar answered Nov 11 '22 15:11

user1021430