简体   繁体   中英

AppStore error Non-public API usage

I am submitting my app to AppStore it gives me an error

Status : Invalid Binary and gives reason as follows,

The app contains or inherits from non-public classes in MyApp: UIProgressHUD

Any Help will be Apreciated ...

Well UIProgressHUD is a private class and you are not allowed to use it. If you create the UIProgressHUD your self just rename it to some thins like MYProgressHUD .

I don't really agree with rckoenes answer. It's also a little unclear - I assume by 'rename' you mean create the class dynamically using NSClassFromString - Apple run static analysis on the code you submit, so if you use private classes you need to do so in such a way that bypasses that (ie, creating classes dynamically from strings, etc). But you really shouldn't be using private classes, because there's no guarantee they will behave the same way in future OS releases. Indeed, in iOS 5 Apple made a number of architectural changes to undocumented classes that broke custom UI behaviour in some apps.

The better option is to use an established alternative library to UIProgressHUD - this one is particularly good: https://github.com/jdg/MBProgressHUD

Often, the alternative classes available offer more functionality than the private one you were trying to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM