erikdoe / ocmock

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

Xcode 12.5: zerowarnings: silence "Target Integrity" warning - simulator #494

Closed twitterkb closed 3 years ago

twitterkb commented 3 years ago

OCMock is most often used on simulator, and Xcode 12.5 does not support iOS 8 simulators.

so, if the sdk is 14.5 , set the minimum deployment target for iOS to 9.0 to silence the Target Integrity warning.

erikdoe commented 3 years ago

Please do not add specific settings for specific SDK versions. Can you simply bump the minimum deployment target to 9.0? Also, where do you see the setting for iOS 8 in the build config?

twitterkb commented 3 years ago

i think adding specific SDK settings that are related to a particular version of the SDK is an appropriate approach here. it means that anyone still using Xcode11 as a preference can still use the iOS 8 simulators if they prefer, but it silences the warning for those using Xcode12 (i.e. iOS 14 SDK) since they'll never be able to create/use such a simulator. 9 as a minimum for Xcode 12 is correct. and confining it to simulator allows someone still using OCMock on hardware that supports iOS 8 to continue to do their job.

settings can be seen here. it's a project wide-setting that this change is over-riding solely for simulator.

image

erikdoe commented 3 years ago

Adding these specific configurations increases the maintenance overhead. If someone really has a preference to use Xcode 11 then they will have to use an older version of OCMock. (It's not like we're adding tons of features they'd miss out on.)

Regarding the setting, maybe I wasn't clear. I know where to set them, but when I look I see that the deployment target is set to iOS 9 already at the project level (and nothing is set at the "native target" level).

EDIT: The targets are set to iOS 9.0 in line 1774 and 1826 in the project file. So, I'm really unsure why Xcode would show you iOS 8.0 anywhere.

twitterkb commented 3 years ago

set here in the project level settings. and that's the value that gets picked up elsewhere for some other targets.

image

if the community wants to simply make 9 be the min deployment target going forward, i'm ok with that. i just didn't want to force our use on the entire community.

erikdoe commented 3 years ago

This is what I see:

Screenshot 2021-05-03 at 22 48 13

It would also be really odd if 8.0 showed up anywhere because the string "8.0" cannot even be found in the entire project file.

twitterkb commented 3 years ago

ok, i am not on tip of master with the change i started with; my source of confusion is i switched back to do other work, and thus switched my SHA1 back to what it was, which was at a point when this was still 8.0.