Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Center plugin linker error with iOS export using Godot 4.3 #70

Open
RocketRonz opened this issue Aug 5, 2024 · 6 comments
Open
Labels

Comments

@RocketRonz
Copy link

After upgrading to Godot 4.3.rc2, the iOS export fails when I include the Game Center plugin:

Undefined symbols for architecture arm64:
  "Object::get_argument_options(StringName const&, int, List<String, DefaultAllocator>*) const", referenced from:
      vtable for GameCenter in gamecenter-device.debug.a[arm64][3](game_center.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** ARCHIVE FAILED **

The same project exports fine with the plugin using Godot 4.2.2

My guess is that I need to checkout the Godot 4.3 submodule before building the libraries but there is no 4.3 branch available in GitHub yet. Is this just a case of waiting until a stable version of 4.3 is released? Thanks for any help.

@Calinou Calinou added the bug label Aug 5, 2024
@owlnewworlds
Copy link

You can checkout the commit of any release, I'm trying myself to make the Game Center plugin work and I passed through that stage by doing a checkout of the Godot source code 4.3 RC 3.

Now, when I call the authenticate function, it returns a null result and it doesn't work. If by any case, you happen to make a successfull authenticate call, let me know ^^'

@RocketRonz
Copy link
Author

The easiest solution for me was to revert my Godot project and code back to the latest stable version (4.2.2) as I need to focus my efforts on creating a game. The plugin might still need some work to support 4.3 as it is still a preview build, seems to work fine with 4.2.2 though.

@RocketRonz
Copy link
Author

Ok, so uploading a 4.2.2 build to TestFlight doesn't work (ITMS-90426 error), so I've gone back to 4.3 RC3. Now there is a 4.3 branch available for the Godot submodule so I've rebuilt the plugin libraries and the export now works.

When running on my phone from Godot, the Game Center authenticate call did nothing but there were no obvious console errors. I opened the Xcode project file and ran my app from there and the following error appeared in the Xcode console:

Could not load services for GameKit. This likely means your game is missing the com.apple.developer.game-center entitlement...

Click on the Signing & Capabilities tab, then +Capability and double click on "Game Center" to create a new entitlements file. This fixed the Game Center authenticate call for me but I'm getting a not yet live message when I try and view my leaderboard. Hope this helps.

@owlnewworlds
Copy link

Ok, so uploading a 4.2.2 build to TestFlight doesn't work (ITMS-90426 error), so I've gone back to 4.3 RC3. Now there is a 4.3 branch available for the Godot submodule so I've rebuilt the plugin libraries and the export now works.

When running on my phone from Godot, the Game Center authenticate call did nothing but there were no obvious console errors. I opened the Xcode project file and ran my app from there and the following error appeared in the Xcode console:

Could not load services for GameKit. This likely means your game is missing the com.apple.developer.game-center entitlement...

Click on the Signing & Capabilities tab, then +Capability and double click on "Game Center" to create a new entitlements file. This fixed the Game Center authenticate call for me but I'm getting a not yet live message when I try and view my leaderboard. Hope this helps.

Yes it works like that. And if you try a post_score call you will see its working too despite the not live yet warnings ^^

@nrgbypass
Copy link

nrgbypass commented Aug 25, 2024

Hi guys, I'm a bit late to the party but I have the same issue and I'm pretty blocked and desperate to get it working .
Do you mind sharing the steps of what made it work for you ? The more details the better.
Thank you so much in advance.
@owlnewworlds @RocketRonz

@RocketRonz
Copy link
Author

I pretty much followed these guides but checked out the Godot 4.3 branch when building the plugin:

https://www.peanuts-code.com/en/tutorials/gd0021_game_center_plugin/
https://www.peanuts-code.com/en/tutorials/gd0022_implement_game_center/

  • Run the iOS export from Godot to generate the .ipa file (I could only get this working with "Export With Debug" checked)
  • When the export completes, there should be a .xcodeproj file in the releases folder, open this in Xcode.
  • Click on the Signing & Capabilities tab, then +Capability and double click on "Game Center" to create a new entitlements file.
  • You should be able to run the app on a connected device via Xcode and use the Game Center plugin functionality.

It's a bit convoluted but does the job. Would be great to run directly from Godot but I couldn't get the plugin to work without manually adding it in Xcode. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants