openfeint 解锁成就调用的选择器无法识别
我按照预期使用该调用,但它会导致崩溃。
//someId is a correct achievement ID
[OFAchievementService unlockAchievement:@"someId"];
我收到以下错误
由于未捕获的异常“NSInvalidArgumentException”而终止应用程序,原因:“+[OFAchievementServiceunlockAchievement:]:无法识别的选择器发送到类 0x26f1c8”
我还收到警告
警告:“OFAchievementService”可能不会响应“+unlockAchievement:”
应该如何调用此函数?根据示例,这看起来是正确的。
I use the call as it is supposed to be used, but it causes a crash.
//someId is a correct achievement ID
[OFAchievementService unlockAchievement:@"someId"];
and I get the following error
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[OFAchievementService unlockAchievement:]: unrecognized selector sent to class 0x26f1c8'
I also get a warning
warning: 'OFAchievementService' may not respond to '+unlockAchievement:'
How is one supposed to call this function? This looks correct according to examples.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试:
实例方法以
-
开头,类级别方法以+
开头。使用 OpenFeint SDK 2.7+ 尝试:
Try:
instance methods begin with
-
class level methods begin with+
.With OpenFeint SDK 2.7+ try:
以下行对我来说效果很好(在
OpenFeint SDK
版本 2.10i 中):The following line just worked well enough for me (in
OpenFeint SDK
version 2.10i):