Non-public selectors in App?
Asked Answered
R

6

23

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.

Rather answered 20/10, 2014 at 23:52 Comment(7)
It means you using private APIs in your project. It could also be a third party library. Search for the offending method calls and find an alternative solution.Menell
None of those methods appear in my code and I am not using a third part library. I have no clue where this problem could be stemming from.Rather
You should contact Apple. I have seen this happening to other devs who have asked this question here at stackoverflow. They contacted Apple and then Apple gave them the reason. The only concern here is: you should double check you don't use any private API for sure.Pals
What version of iOS are you submitting for? And what version of xcode are you using?Socialminded
possible duplicate of Non-public selectors in Payload/Pengelly
I have the same problem, and I think it might be a server side error because submitting the same file fails first, but consecutive submissions suddenly work. Sometimes it is necessary to Clean and Archive the project again.Cuckoopint
This issue is just a warning for me when uploading a build to itunes connect but successfully uploaded, did you encountered this when sending your build to AppStore Review?Irredeemable
L
2

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

Lubow answered 27/10, 2014 at 16:51 Comment(1)
Organizer -> Projects -> Select your project -> Shows Delete Archive and not Delete Derived Data for me! I am using Xcode 9Archenemy
R
7

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.

Richey answered 21/10, 2014 at 7:25 Comment(3)
Since when did we jump xcode 7? When did we finish with xcode 6? I must be well behind and didn't hear the news that Apple had released xcode 7 and xcode 8.Socialminded
Also would it not be best to move on to xcode 6.1 and not the older version?Socialminded
XCode 6.1 is the problem. Apple, in their continuing streak of Breaking ALL The Things when it comes to iOS 8/XCode 6, has made it so some apps get erroneously rejected if they use XCode 6.1 with a pre-iOS 8 deployment target.Gleeful
T
2

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.

Telesis answered 21/10, 2014 at 10:45 Comment(0)
P
2

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.

Pengelly answered 21/10, 2014 at 23:12 Comment(6)
I did not use UIAlertController. However, my deployment target is 4.3. and I want to go with it :(Telesis
Hey Karim, the UIAlertController was just an example for my case. Maybe you use another API somewhere else that is new (at least newer than 4.3 - do you really have to support iOS 4?). Maybe Apple simply has another problem with XCode 6.1 - with the change described above I was able to keep XCode 6.1 and submit my app.Pengelly
In my case, The very same project, all source code are same, can submit with XCode 6.0.1 but not with XCode 6.1Telesis
Upvoted because I think the UIAlertController is probably what's doing it for me. To be clear, this is still a bug: I use UIAlertController, but wrap it in conditionals for whether the user is running iOS 8. Which, by my understanding, is exactly what you are supposed to do when moving away from a deprecated API. Moral of the story: Ignore deprecation warnings?! Thanks Apple, you are so full of win right now...Gleeful
If you need to support older version of iOS prior to 8 this solution is not valid. Going back to Xcode 6.0.1 solves the problemChitkara
6.0.1 is not able to run under my Mac OS. I'm really hosed now. I removed the duplicate API calls and it still fails saying they're there; even after i deleted DerivedDataAssured
D
2

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

Drees answered 23/10, 2014 at 16:29 Comment(0)
L
2

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

Lubow answered 27/10, 2014 at 16:51 Comment(1)
Organizer -> Projects -> Select your project -> Shows Delete Archive and not Delete Derived Data for me! I am using Xcode 9Archenemy
U
1

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.

Uxorial answered 23/10, 2014 at 13:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.