GKLocalPlayer.Local.FetchItems() Task Error on Unity

We are using apple unity plugin (gamekit) to authorized player using game center account. To get player the info we run a task from the plugin,

var fetchItemsResponse = await GKLocalPlayer.Local.FetchItems();

But when this code run, there is an error on the xcode application on mac. The error is the following,

Thread 1: EXC_BAD_ACCESS (code=257, address=0x2)

Also running into this. Did you find a solution?

Having the same error.

Same here

Unity 2021.3.4f1

XCode 14.2

AppleCore Unity Package - 1.0.2

AppleGameKit Unity Package - 1.0.3

Crashes when calling FetchItems in Unity

Same here, same error

Had the same issue, there is a few problems and I have a working branch.

The first issue is the public func GLocalPlayer_FetchItems function is missing the first param as a pointer.

However once that was fixed, the callback still didn't work. It seemed to have issues with the string and the struct on the c# side... anyway... there is a branch here that does fix it.

https://github.com/muZZkat/unityplugins/tree/muzzkat/fix-fetch-items

@muzzkat2

I was already about to give up and just use GKLocalPlayer.GamePlayerId as a Custom Identifier to log in to my game until I saw your reply.

Thank you! Will check this out! 🙏

I signed up just now to let you know that using GameKit from the muZZkat fork fixed the issue for me (1.0.3 instead of 1.0.4). Using Unity 2021.3.19f1.

I'm using @muzzkat2 solution and it works fine on iOS. However, the problem arises when I'm building for Android, as the Apple plugins are included in the build and there's no way to successfully apply changes (select/deselect target platforms) in the plugin inspector window.

i try this by muzzat plugin. thanks

you plugin files are not the latest version. com.apple.unityplugin.core-1.0.2.tgz com.apple.unityplugin.gamecenter-1.0.3.tgz these work fine.

com.apple.unityplugin.core-1.0.3.tgz com.apple.unityplugin.gamecenter-1.0.4.tgz these don't work

Hello, I signed up now to let you know that using GameKit from the muZZkat fork fixed the issue for me, I'm using Unity 2021.3.24f1.

Hello, We have the same issue, using these plugins versions: com.apple.unityplugin.core-1.0.3.tgz com.apple.unityplugin.gamecenter-1.0.4.tgz

Is there any plans to fix this please?

I use unity 2022.3.7 and when build I get this issue: Failed to locate path for library: AppleCoreNative.framework. Is there any plans to fix this please?

This issue has been resolved

https://blog.csdn.net/Yj_sail/article/details/135277886?spm=1001.2014.3001.5502

hello, any solutions?

GKLocalPlayer.Local.FetchItems() Task Error on Unity
 
 
Q