Ios 无法识别的选择器发送到类运行时错误
我使用的是一个第三方框架,其中包含NSData上的一个类别,并且有一个静态方法Ios 无法识别的选择器发送到类运行时错误,ios,objective-c,xcode,objective-c-category,Ios,Objective C,Xcode,Objective C Category,我使用的是一个第三方框架,其中包含NSData上的一个类别,并且有一个静态方法dataUsingBase64String:。 框架链接良好,代码构建成功。但调用此方法时,我将无法识别的选择器发送到类运行时错误 我还尝试在XCode的其他链接器\u标志中添加-ObjC,-all\u load标志,但运气不佳。我猜您的库是静态链接的。这方面的一个常见问题是未包含或链接类别。此外,还需要将-all_load添加到正在使用静态库的目标的其他链接器标志中 同时检查以下与您的问题类似的答案 答复1- 答复2
dataUsingBase64String:
。
框架链接良好,代码构建成功。但调用此方法时,我将无法识别的选择器发送到类
运行时错误
我还尝试在XCode的
其他链接器\u标志中添加-ObjC
,-all\u load
标志,但运气不佳。我猜您的库是静态链接的。这方面的一个常见问题是未包含或链接类别。此外,还需要将-all_load添加到正在使用静态库的目标的其他链接器标志中
同时检查以下与您的问题类似的答案
答复1-
答复2-
答复3-
我希望这会有所帮助。注意:我需要以这种方式添加框架
在这里,即使在添加了-Objc
或-all\u load
之后,框架还是没有加载
最后,其他链接器标记中的-framework
帮了我一把
从主页上看到一些关于它的信息
-framework name[,suffix]
This option tells the linker to search for `name.frame-
work/name' the framework search path. If the optional suffix
is specified the framework is first searched for the name
with the suffix and then without (e.g. look for `name.frame-
work/name_suffix' first, if not there try `name.frame-
work/name').