Hello,
I have the following code that I use to setup leaderboards on my game:
public void Setup(Dictionary friendsHashTable)
{
ILeaderboard leaderboard leaderboard = SocialManager.GetSocialPlatform().CreateLeaderboard();
this.friendsHashTable = null == friendsHashTable? this.friendsHashTable : friendsHashTable;
if(!IsCompleted())
{
return;
}
leaderboard.SetUserFilter(GetFriendsFilterList());
leaderboard.LoadScores(OnScoresLoaded);
}
It used to work fine on 4.6.4 and it works fine on Android as well for 5.3.4f1; however when I run it on iOS it crashes with the following error message:
2016-03-29 18:34:46.506 bith[4820:60b] -[GKLeaderboard initWithPlayers:]: unrecognized selector sent to instance 0x16f63af0
2016-03-29 18:34:46.726 bith[4820:60b] Uncaught exception: NSInvalidArgumentException: -[GKLeaderboard initWithPlayers:]: unrecognized selector sent to instance 0x16f63af0
(
0 CoreFoundation 0x2f2a0ee3 + 154
1 libobjc.A.dylib 0x39a3bce7 objc_exception_throw + 38
2 CoreFoundation 0x2f2a47f7 + 202
3 CoreFoundation 0x2f2a30f7 + 706
4 CoreFoundation 0x2f1f2058 _CF_forwarding_prep_0 + 24
5 bith 0x01770608 ___ZN10GameCenter13GcLeaderboard6CreateEP9MonoArray_block_invoke + 432
6 GameCenterFoundation 0x2fe5aca1 + 12
7 libdispatch.dylib 0x39f24d53 + 10
8 libdispatch.dylib 0x39f24d3f + 22
9 libdispatch.dylib 0x39f276c3 _dispatch_main_queue_callback_4CF + 278
10 CoreFoundation 0x2f26b641 + 8
11 CoreFoundation 0x2f269f0d + 1308
12 CoreFoundation 0x2f1d4729 CFRunLoopRunSpecific + 524
13 CoreFoundation 0x2f1d450b CFRunLoopRunInMode + 106
14 GraphicsServices 0x341436d3 GSEventRunModal + 138
15 UIKit 0x31b35871 UIApplicationMain + 1136
16 bith 0x00023d94 main + 164
17 libdyld.dylib 0x39f39ab7 + 2
)
From testing the this seems to be the call that causes the issue:
leaderboard.LoadScores(OnScoresLoaded);
Has anyone come across this before? Or does anyone know what may be causing it?
Thanks.
↧