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 8652973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:25:52+00:00 2026-06-12T14:25:52+00:00

Firstly, I am fairly new to objective c / xcode dev so there is

  • 0

Firstly,

I am fairly new to objective c / xcode dev so there is a good chance i am being a muppet. I have written a few simple apps to try things and my most recent one has been testing the gamecentre classes / functionality.

i have linked ok to leaderboards and achievements – but i can’t get challenges working.

I have added the following code…. which is in my .m

         GKLeaderboard *query = [[GKLeaderboard alloc] init];
          query.category = LoadLeaderboard;
          query.playerScope = GKLeaderboardPlayerScopeFriendsOnly;
          query.range = NSMakeRange(1,100);

          [query loadScoresWithCompletionHandler:^(NSArray *scores, NSError *error)
           {NSPredicate *filter = [NSPredicate predicateWithFormat:@"value < %qi", scoreint];
                NSArray *lesserScores = [scores filteredArrayUsingPredicate:filter];

               [self presentChallengeWithPreselectedScores: lesserScores];

           }
           ];

this code is basically taken from apple, just replacing the variable names….
this however gives an error on
[self presentChallengeWithPreselectedScores: lesserScores];

error Implicit conversion of an Objective-C pointer to ‘int64_t *’ (aka ‘long long *’) is disallowed with ARC

LoadLeaderboard is defined as a string
scoreint is defined as integer, thought this may be issue as not int64_t but that does not seem to make a difference.

I am sure for someone who has any kind of a clue this is a straightforward fix. But i am struggling at the moment. So if anyone can be kind and help a fool in need it would be most appreciated

Thanks,
Matt

  • 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-06-12T14:25:53+00:00Added an answer on June 12, 2026 at 2:25 pm

    welcome to Stack Overflow. I don’t know your implementation of presentChallengeWithPreselectedScores method so I can’t tell (although it looks like the method is taking a 64 bit integer and you’re trying to feed it an array).

    There are two ways to issue challenges:

    1 – This is the easier way – if you’ve successfully implemented leader boards and score posting to game center, the challenges work out of the box in iOS6, the user can always view the leader board – select a submitted score (or a completed achievement) and select “Challenge Friend”.

    2 – The second way is to build a friend picker and let the user issue challenges within your game. But considering you’re new to objective-c and game center, it’s not so easy. But for your reference here is how you do it:

    when you submit a GKScore object for the leaderboards – you can retain and use that GKScore object (call it myScoreObject) like this:

    [myScoreObject issueChallengeToPlayers:selectedFriends message:yourMessage];
    

    where selectedFriends is an NSArray (the friend picker should generate this) – the message is optional and can be used only if you want to send a message to challenged friends.

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

Sidebar

Related Questions

I am fairly new so firstly please excuse me if I am doing anything
Firstly, the title was the best I could come up with. I have written
Firstly my maths is limited, so this question may have a simple answer. So,
I have a couple of fairly simple javascript functions which animate the transition of
Firstly, is there a command for getting help and parameters for each sos command
Firstly some background,.. IVe started a new job as PHP developer with a company
I have a fairly complex scenario and I need to ensure items I have
Firstly I'd like to say my knowledge on Excel is fairly limited, and I'm
Firstly, I've never used threads, but have found lots of examples on the internet
I have a dynamically generated CSS file. It's fairly large, and has different content

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.