Xcode 7 warnings: object file was built for newer iOS version than being linked

Jony Thrive picture Jony Thrive · Aug 6, 2015 · Viewed 41k times · Source

I recently integrated Google Cloud Messaging into an app targeting iOS 7 and iOS 8. Just grabbed Xcode 7 beta 4 to get started on iOS 9 support, and now I'm getting an error from the linker:

ld: warning: object file (.../Pods/GoogleInterchangeUtilities/Libraries
/libProtocolBuffers.a(Descriptor.pb.o)) was built for newer iOS version (8.3)
than being linked (7.0)

and a handful more like that all for parts of libProtocolBuffers.a.

Does this mean that iOS 8.3 is required to use the GCM library? If so, why did Xcode 6 happily spit out code that (by all appearances in my testing with iOS 7 devices) delivered push notifications to iOS 7.3 without issue?

Given that they're just warnings, I can still compile fine, however I prefer not to ship code that is wrong.

Edit: I emailed google and they said top people will look into it. In the mean time, if you're reading this and bothered by the warning, maybe also email so they'll be encouraged to deal with it.

Answer

evanescent picture evanescent · Aug 6, 2015

This just means that one of the libraries(Protocol Buffers here) GCM depends on was built for 8.3 although it's compatible with the min sdk version of GCM i.e. 7.0. XCode 7 is just more severe and reports it as a warning but it was always there just not being reported by previous versions.

Overall this is just harmless, everything should work fine. Also there is not much that you can do unless Google patches GCM by building all of it's dependencies with the min sdk version (7.0).