erikdoe / ocmock

Mock objects for Objective-C
http://ocmock.org
Apache License 2.0
2.16k stars 606 forks source link

OCMock not loading for macOS test target #511

Closed guidedways closed 1 year ago

guidedways commented 2 years ago

I'm seeing the following, along with a "Bundle is damaged" prompt when I run a unit test with a host application. Any idea how to fix this?

(dlopen(/.../DerivedData/App/Build/Products/Debug/App.app/Contents/PlugIns/AppTests.xctest/Contents/MacOS/AppTests, 0x0109): Library not loaded: @rpath/OCMock.framework/Versions/A/OCMock
  Referenced from: /.../DerivedData/App/Build/Products/Debug/AppCal.app/Contents/PlugIns/AppCalTests.xctest/Contents/MacOS/AppCalTests
  Reason: tried: '/.../DerivedData/App/Build/Products/Debug/OCMock.framework/Versions/A/OCMock' (code signature in <12DA0F8C-4067-3E24-AFE2-B5F596AFEE72> '/DerivedData/AppMac-dfxaoncuargnurehqwjntcnqwbzd/Build/Products/Debug/OCMock.framework/Versions/A/OCMock' not valid for use in process: library load disallowed by system policy),