2011-11-08 2 views
3

cocos2d-box2d를 기반으로 새 프로젝트를 만들고 CLScoreServerPost.m이라는 두 파일에 항상 4 개의 경고가 있습니다. 를 더 이상 사용되지 않습니다 '고유 식별자'cocos2d-box2d를 기반으로 프로젝트에서 ''uniqueIdentifier '가 사용되지 않습니다.'

[self addValue:[[UIDevice currentDevice] uniqueIdentifier] key:@"cc_device_id"]; 

을 다음과 또 다른 CLScoreServerRequest.m이다, 코드는 경고가 둘 다 같은 경고를 보여

device = [[UIDevice currentDevice] uniqueIdentifier]; 

을 따르고있다그래서 어떻게해야합니까? LearnCocos2D 코멘트에 말했듯이 많은 감사

당신은 예를 들어 사용할 수 있습니다
+0

가능한 중복 - 이제 무엇을해야하는지 ?] (http://stackoverflow.com/questions/6993325/uidevice-uniqueidentifier-deprecated-what-to-do-now) – LearnCocos2D

+0

@ LearnCocos2D 덕분에 많이 – DaPo

답변

4
+(NSString *)GetUUID 
{ 
    CFUUIDRef theUUID = CFUUIDCreate(NULL); 
    CFStringRef string = CFUUIDCreateString(NULL, theUUID); 
    CFRelease(theUUID); 
    return [(NSString *)string autorelease]; 
} 
[UIDevice 고유 식별자 추천하지 않습니다의
관련 문제