1

My unit tests run fine when the target is set to 6.1, and the code itself is fine when I walk through the features in the simulator.

I think the problem is that the unit tests are expecting the 6.1 SDK to be there, but it's actually using the 5.1 SDK.

Here's the error:

dyld: Symbol not found: _objc_setProperty_nonatomic_copy
  Referenced from: /Users/{my username}/Library/Developer/Xcode/DerivedData/{my app name}/Build/Products/Debug-Live-iphonesimulator/AgrianUnitTest.octest/AgrianUnitTest
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation

My first thought was to change the Base SDK in my Unit Tests target, but I don't have any options other than Latest and 6.1 (manually entering 5.1 results in "SDK not found").

Luke The Obscure
  • 1,524
  • 2
  • 20
  • 35

1 Answers1

0

Your Xcode location may not be up-to-date after some upgrade before. Try fixing the location. Run this in the terminal:

sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/
export DEVELOPER_DIR=/Applications/Xcode.app
graver
  • 15,183
  • 4
  • 46
  • 62