objective-c 应用程序引用 Payload/<Appname>.app/<App name> 中的非公开选择器:解码器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19378484/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 21:06:44  来源:igfitidea点击:

The app references non-public selectors in Payload/<Appname>.app/<App name>: decoder

objective-cfacebook-graph-apiios7socket.ioxcode5

提问by Akshay Aher

I am getting this warning while submitting app to the Apps store through organizer.

我在通过组织者将应用程序提交到应用程序商店时收到此警告。

The app references non-public selectors in Payload/.app/: decoder

该应用程序在 Payload/.app/: 解码器中引用了非公共选择器

i know we get this warning if we use any Third Party API in our application. I have used SOCKETIO-ObjClibrary for chat functionality in application. Also used facebook iOS sdk for fb implementation.So i am not getting exactly what causes this warning.! Please find attached ScreenShotfor better understanding

我知道如果我们在应用程序中使用任何第三方 API,我们会收到此警告。我在应用程序中使用了SOCKETIO-ObjC库来实现聊天功能。还使用 facebook iOS sdk 进行 fb 实现。所以我不知道是什么导致了这个警告。!请找到随附的屏幕截图以便更好地理解

回答by Anders Johansen

You may get this warning just for using a selector in your own code or third party code that has the same name as some selector that is marked as non-public. Happens to me all the time. Never got rejected for it.

您可能会因为在您自己的代码或第三方代码中使用与某些标记为非公开的选择器同名的选择器而收到此警告。一直发生在我身上。从来没有被拒绝过。

By "same name" i mean just something as simple as you having an object with this selector:

通过“同名”,我的意思是像您拥有带有此选择器的对象一样简单:

-(id) XYZKMyClass doSomethingFancy:(id) toThis

...and there being a selector like this for an internal Apple functionality

...并且有一个这样的选择器用于内部 Apple 功能

-(id) ApplesClass  doSomethingFancy:(id) toSomething

So: What it seems they are looking for is the signature -(id) doSomethingFancy:(id). You can see how it's very easy to accidentally bump up against this.

所以:看起来他们正在寻找的是签名 -(id) doSomethingFancy:(id)。你可以看到很容易不小心碰到这个。

Presumably they perform a deeper check at the App Store Police HQ, and determine that the flagged selector is in your code, and hence OK.

据推测,他们在 App Store Police HQ 进行了更深入的检查,并确定标记的选择器在您的代码中,因此可以。

回答by Marcos Alessandro Fonseca

This can help you:

这可以帮助您:

Before:

前:

#import "SocketIOJSONSerialization.h"

extern NSString * const SocketIOException;

// covers the methods in SBJson and JSONKit
@interface NSObject (SocketIOJSONSerialization)

// used by both JSONKit and SBJson
- (id) objectWithData:(NSData *)data;

// Use by JSONKit serialization
- (NSString *) JSONString;
**- (id) decoder;**

// Used by SBJsonWriter
- (NSString *) stringWithObject:(id)object;

@end

After:

后:

#import "SocketIOJSONSerialization.h"

extern NSString * const SocketIOException;

// covers the methods in SBJson and JSONKit
@interface NSObject (SocketIOJSONSerialization)

// used by both JSONKit and SBJson
- (id) objectWithData:(NSData *)data;

// Use by JSONKit serialization
- (NSString *) JSONString;
**- (id) jsonDecoder;**

// Used by SBJsonWriter
- (NSString *) stringWithObject:(id)object;

@end

I get in this link: http://blog.csdn.net/erica_sadun/article/details/12188083

我进入这个链接:http: //blog.csdn.net/erica_sadun/article/details/12188083

回答by Petr Syrov

Check your Target Membershipfor all classes used in project. In some cases when you create or copy your target the warning may appears without link error.

检查项目中使用的所有类的目标成员资格。在某些情况下,当您创建或复制目标时,警告可能会出现而没有链接错误。