xcode App 中的非公开选择器?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26476776/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Non-public selectors in App?
提问by Cal Stephens
I'm trying to submit an app via iTunes Connect. Xcode is throwing the following error:
我正在尝试通过 iTunes Connect 提交应用程序。Xcode 抛出以下错误:
iTunes Store operation failed.The app referenced non-public selectors in Payload/Inflation Calculator.app/Inflation Calculator: allocBatch:withEntity:count:,allowWithEntity:,
fastIndexForKnownKey:
, indexForKey:
iTunes Store 操作失败。该应用程序在 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?
我不知道non-public selectors
我会使用什么“ ”,因为我的代码非常接近这本书。谁有想法?
Code for the view controller (only .swift
in my app):
https://gist.github.com/Calda/aefc2f19bae5f3cf2e54
视图控制器的代码(仅.swift
在我的应用程序中):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.
编辑:作为未来的参考,我向 iTunes Connect Support 确认这是 iTunes Connect 的问题,而不是我的项目的问题。对于遇到同样问题的任何人,我最好的建议是等待并稍后再试。
采纳答案by coder
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)
1)清理构建文件夹(按住Alt,点击产品->清理)
2) Deleting the Derived Data (Organizer -> Projects -> Select your project -> Delete Derived Data
2)删除派生数据(Organizer -> Projects -> Select your project -> Delete Derived Data
回答by Slyv
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
我有同样的问题。我无法提交我的一些应用程序,因为使用了非公共选择器。我也试过使用 Application Loader,但还是一样的错误信息
To solve the problem I installed Xcode 6.0.1 - it is still available to download here: https://developer.apple.com/downloads/index.action
为了解决这个问题,我安装了 Xcode 6.0.1 - 它仍然可以在这里下载:https: //developer.apple.com/downloads/index.action
Before installing i moved the old Xcode to trash.
在安装之前,我将旧的 Xcode 移到了垃圾箱。
I can now submit any app.
我现在可以提交任何应用程序。
回答by karim
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.
对于同一个应用程序,我今天在 XCode 6.1 上遇到了这个错误。我在 2/3 天前使用 XCode 6.0.1 提交了相同的应用程序(变化很小),没有任何错误!刚刚更新了 XCode 6.1 并被这个错误困住了。
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 dmgfile and rename xcode.app to XCode_6.0.1. So it coexists with XCode 6.1.
我切换回 XCode 6.0.1 并且提交没有任何问题。没有非公共 API 使用错误。我只是下载dmg文件并将 xcode.app 重命名为 XCode_6.0.1。所以它与 XCode 6.1 共存。
回答by seafoxx
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.
API 在 iOS 7 和 iOS 8 之间有所不同。我通过切换到部署目标“8.0”来验证我的应用程序 - 使用 XCode 6.1 构建。这可能不是你们所有人的解决方案,但你可以试一试。
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.
可能发生在我身上,因为我最近开始使用 UIAlertController -> 似乎是一个 iOS-8 功能。在 iOS 7 上,这将是 UIAlertView。因此,如果您使用一些漂亮的新功能,它们可能在以前的 iOS 版本中不可用 - 因此是非公共 API。
回答by senior_russia
I delete all derived data for xcode projects /Users/{user_home_folder}/Library/Developer/Xcode/DerivedData And app was submitted without any problem
我删除了 xcode 项目的所有派生数据 /Users/{user_home_folder}/Library/Developer/Xcode/DerivedData 并且应用程序提交没有任何问题
回答by rudd
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.
我遇到了同样的问题,看起来像是 Apple 端的问题。我昨天提交了相同的应用程序(v 1.0.1),然后拒绝了它,然后今天再次提交了一行代码差异。由于上述原因,今天的提交被拒绝了。
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.
通过更改我的应用程序的版本号(例如 1.0.1 -> 1.0.2),我能够使用所有内容的最新版本解决这个问题。认为这是有效的,因为我之前提交的旧版本已被拒绝,YMMV。