Non-public selectors in App?

2019-02-02 09:09发布

问题:

I'm trying to submit an app via iTunes Connect. Xcode is throwing the following error:

iTunes Store operation failed. The app referenced non-public selectors in Payload/Inflation Calculator.app/Inflation Calculator: allocBatch:withEntity:count:,allowWithEntity:, fastIndexForKnownKey:, indexForKey:

I have no idea what "non-public selectors" I would be using, because I stuck pretty close to the book with my code. Anyone have any ideas?

Code for the view controller (only .swift in my app): https://gist.github.com/Calda/aefc2f19bae5f3cf2e54

EDIT: As a reference for the future, I confirmed with iTunes Connect Support that this was an issue with iTunes Connect and not a problem with my project. For anyone experiencing this same problem, my best advice would be to wait and try again later.

回答1:

I solved this by doing the following:

edit: I don't think the first step is needed

1) Cleaning the build folder (Hold Alt, Click Product -> Clean)

2) Deleting the Derived Data (Organizer -> Projects -> Select your project -> Delete Derived Data



回答2:

I had the same problem. I could not submit some of my apps because using non-public selectors. I also tried using Application Loader, but still the same error message

To solve the problem I installed Xcode 6.0.1 - it is still available to download here: https://developer.apple.com/downloads/index.action

Before installing i moved the old Xcode to trash.

I can now submit any app.



回答3:

The API differs between iOS 7 and iOS 8. I got my App validated by switching to Deployment Target "8.0" - built with XCode 6.1. It might not be the solution to all you guys but you could give it a try.

Might have happened to me because I recently started using UIAlertController -> seems to be an iOS-8-Feature. On iOS 7 this would be UIAlertView. So if you use some nifty new features they might not have been available with previous iOS versions - thus non-public API.



回答4:

For the same app, I got this error today on XCode 6.1. I submit the same app (little variation) 2/3 days ago with XCode 6.0.1 without any error! Just updated XCode 6.1 and trapped with this error.

I switched back to XCode 6.0.1 and it do not have any problem with the submission. No non-public API usage error. I just download the dmg file and rename xcode.app to XCode_6.0.1. So it coexists with XCode 6.1.



回答5:

I delete all derived data for xcode projects /Users/{user_home_folder}/Library/Developer/Xcode/DerivedData And app was submitted without any problem



回答6:

I was running into the same issue that looked like an issue on Apple's end. I submitted the same app (v 1.0.1) yesterday, then rejected it, then submitted again today with a one-line code difference. Today's submission got rejected for the reason mentioned above.

I was able to solve this, using the latest versions of everything, by changing the version # of my app (e.g. 1.0.1 -> 1.0.2). Think this worked as I had a previous submission sitting in the queue for my older version that I had rejected, YMMV.