Xcode 11 - "error: Relocation out of range"

Getting this weird error when building an existing working project using XCode 11. It builds fine in XCode 10.1.


The error is received when building to iPhone X running iOS 12.1, as well as an iPad running latest 13 beta. (It is also using the XCode11 tools).


error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
error: Relocation out of range
fatal error: too many errors emitted, stopping now [-ferror-limit=]



just some regular run of the mill warnings directly above. Each time I fix one of those, this does not go away. I can't find anything on the web regarding this, and I have never seen it before. Any idea are appreciated. Thanks!

Replies

Ok, here's what happened. To open the project in XCode 11 I had to convert Swift from 3.x to 4.x. When I made some manual changes to add the @objc tag, I errantly added it to a few private functions in the code. I'm guessing the 'out of range' message meant 'hey, we can't see those functions you *****".


I removed it and now builds fine on all devices & ios versions.


Hopefully this helps someone in he future...

Great and thanks for feedback.


Don't forget to close the thread by marking your own answer as correct.