"object file was built for newer iOS version"

After upgrading to Xcode 7.0, one of our projects is giving a boatload of linker warnings like this:


ld: warning: object file (...) was built for newer iOS version (5.1.1) than being linked (5.1)


The thing is, the deployment target of the project is 5.1.1, not 5.1. I can't find a "5.1" anywhere in the project (and I have searched all the files that exist in the project.) I have absolutely no idea where that "5.1" is coming from.


Even if it were coming from one of the third-party precompiled libraries, why should that matter? I'm not trying to build for 5.1. I'm trying to build for 5.1.1. Why would Xcode try to link for 5.1, when the deployment target of the project is 5.1.1?


When I look at the linker command, printed in the issues window, I can't see a "5.1" anywhere there either. (The only thing I see is "export IPHONEOS_DEPLOYMENT_TARGET=5.1.1".)


This started happening only after the upgrade to Xcode 7.0. Nothing else has changed in the project.


What is causing this, and how do I fix it? (And yes, I want to build for 5.1.1.)

I'm seeing the same issue. I'm building with a target of 5.1.1, and there are no references to iOS 5.1 anywhere in the project. Yet I get this warning on every .o file being linked. I have not found a solution yet.

Somebody on stackoverflow had this to say:


"It is an Xcode 7.0 and 7.1 issue when linking to patch versions of iOS. When using

-miphoneos-version-min=5.1.1
with linker, it will only respect major+minor parts (5.1) of the version."


And another person on the same thread said: "This appears to be a known bug in Xcode 7.0 and 7.1B1 (bug #21813082)." (He provided no actual link to the bug report, however.)


The problem still appears in Xcode 7.2. It seems that Apple doesn't feel like this is a high-priority issue. It's extremely annoying, though.

"object file was built for newer iOS version"
 
 
Q