Using private, deprecated, or undocumented Apple APIs is an automatic rejection. Sometimes it's your own code, sometimes it's a third-party SDK you didn't realize was doing it. Either way, Apple holds you responsible. This guide shows you how to track them down.
What Apple said
“Your app uses or references the following non-public APIs, which is not permitted: [API name]. The use of non-public APIs is not permissible on the App Store because it can lead to a poor user experience should these APIs change.”
Apple only allows apps to call APIs documented in the official SDK. Private APIs are internal Apple frameworks not meant for third-party use. Using them risks crashes when Apple changes internal implementations, and more immediately, it gets your app rejected. The rejection message usually names the offending API.
While you're at it — Apple also requires these pages for every app.
Fix this rejection, then make sure you're covered on the compliance side too. Apple requires every app to link to a hosted Privacy Policy, Terms of Service, Support page, and Data Deletion page. No link means another rejection — just for a different reason.