警告““uniqueIdentifier””已弃用”在基于cocos2d-box2d的项目中
我基于cocos2d-box2d创建一个新项目,两个文件中总是有4个警告,一个是CLScoreServerPost.m,代码有警告在下面
[self addValue:[[UIDevice currentDevice] uniqueIdentifier] key:@"cc_device_id"];
,另一个是CLScoreServerRequest.m,代码有警告在
device = [[UIDevice currentDevice] uniqueIdentifier];
他们两个都显示同样的警告:“uniqueIdentifier”已被弃用,
所以我该怎么办?非常感谢
I create a new project based on cocos2d-box2d, and there are always 4 warning in two files, one is CLScoreServerPost.m, the code has warning is following
[self addValue:[[UIDevice currentDevice] uniqueIdentifier] key:@"cc_device_id"];
and another is CLScoreServerRequest.m, the code has warning is following
device = [[UIDevice currentDevice] uniqueIdentifier];
both of them show the same warning: 'uniqueIdentifier' is deprecated
so what should I do? many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
例如,您可以使用 OpenUDID https://github.com/ylechelle/OpenUDID
正如 LearnCocos2D 在评论里还有一个关于SOF的话题:UIDevice uniqueIdentifier 已弃用 - 现在该怎么办?
You can use for example OpenUDID https://github.com/ylechelle/OpenUDID
As LearnCocos2D told in a comment there is also a topic on SOF : UIDevice uniqueIdentifier Deprecated - What To Do Now?