erikdoe / ocmock

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

Building for iOS, but the linked framework "'OCMock." framework' was built for iOS Simulator. XCode 12 and iPhone OS 14 #468

Closed anuragfluke closed 3 years ago

anuragfluke commented 3 years ago

Hi,

We have some issue to run app on simulator and now we arre trying to run Unit test suit on iPhone device but We are getting following error - "Building for iOS, but the linked framework "'OCMock." framework' was built for iOS Simulator."

Using - XCode 12, iOS 14 and iPhone 8

Please let us know if you have any solution of this.

dmaclach commented 3 years ago

This sounds like a question that is more appropriate for stack overflow as opposed to the issues list as it sounds like an Xcode project configuration problem vs a problem with OCMock itself. I would recommend asking on stack overflow with significantly more details about how you set up your project and it's dependencies (i.e. cocoapods? carthage? by hand?) and giving an idea of the build settings that are being applied such as framework paths etc. Debugging why Xcode is linking in a wrong framework can be a pain as there is a variety of ways it can happen.