Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6862759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:42:01+00:00 2026-05-27T02:42:01+00:00

I have searched the web for the answer and have found quite a few

  • 0

I have searched the web for the answer and have found quite a few solutions but have to admit i do not really understand, as i am pretty new, how to apply the answer, one example is: UIDevice uniqueIdentifier Deprecated – What To Do Now?

I would really appreciate if someone could show me an example how to apply the solution to the problem in the code below as the following line is deprecated (uniqueIdentifier), the code line is from Cocos2d CLScoreServerRequest.m but comes up in a few others as well:

device = [[UIDevice currentDevice] uniqueIdentifier];

The function looks like:

-(BOOL) requestScores:(tQueryType)type
            limit:(int)limit
           offset:(int)offset
            flags:(tQueryFlags)flags
         category:(NSString*)category
{
// create the request   
[receivedData setLength:0];

// it's not a call for rank
reqRankOnly = NO;

NSString *device = @"";
if( flags & kQueryFlagByDevice )
    device = [[UIDevice currentDevice] uniqueIdentifier];

// arguments:
//  query: type of query
//  limit: how many scores are being requested. Default is 25. Maximun is 100
//  offset: offset of the scores
//  flags: bring only country scores, world scores, etc.
//  category: string user defined string used to filter
NSString *url= [NSString stringWithFormat:@"%@?gamename=%@&querytype=%d&offset=%d&limit=%d&flags=%d&category=%@&device=%@",
                SCORE_SERVER_REQUEST_URL,
                gameName,
                type,
                offset,
                limit,
                flags,
                [category stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding],
                device
                ];

//  NSLog(@"%@", url);

NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:url]
                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                   timeoutInterval:10.0];

// create the connection with the request
// and start loading the data
self.connection=[NSURLConnection connectionWithRequest:request delegate:self];
if (! connection_)
    return NO;

return YES;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:42:01+00:00Added an answer on May 27, 2026 at 2:42 am

    Here’s the quick and simple solution:

    Change your project’s (or target’s) deployment target to iOS 4.x or lower. In that case the compiler will still issue a warning but it will be just a warning. Only if your deployment target it iOS 5.0 or newer will the compiler generate an error about the deprecated method.

    As for the warnings within the Cocos2D source code, ignore those warnings until the next Cocos2D official release fixes that issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched the web but could not find an answer. how do I
I have searched the forums and all over the web and have not really
I have searched this web looking for an answer, but it seems that this
I searched the web but haven't found a real good answer for this question..
I have searched the web for the correct answer, but I've been failing to
I searched across the web but I didn't find any satisfying answer. I have
I've searched the entire web for a clear answer but haven't found one yet.
I have few very simple question. I searched a web for them, but I
I have searched the Web for this, but with no luck. Any idea? Thanks.
I want to install rsync on windows xp. I have searched the web, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.