[Help] GameCenter

Ug… I am totally stuck. Just trying to put together a basic app with GameCenter on iOS.

Here’s what I have done:

  • installed GameCenter Haxelib
  • ran haxelib run lime rebuild gamecenter ios
  • added this to project.xml <ndll name="gamecenter" if="ios" /> <dependency name="GameKit.framework" if="ios" />

In the end I get this error.

openfl test ios
Error: Source path “libgamecenter.iphoneos.a” does not exist

What am I missing?

Also… if I try this:

<ndll name="gamecenter" haxelib="gamecenter" if="ios" />

I get this error instead:

Undefined symbols for architecture armv7:
"_gamecenter_register_prims", referenced from:
_main in Main.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Try the “haxelib” tag ( http://www.openfl.org/documentation/projects/project-files/xml-format/ )

Thx for idea but I have haxelib in project.xml.

I created a generic sample app on openfl-gamecenter-sample on GitHub.

I just tried the following, seemed to work:

git clone https://github.com/openfl/gamecenter
haxelib dev gamecenter gamecenter
lime rebuild gamecenter ios

Then in a project file:

<haxelib name="gamecenter" />

You should not use the NDLL tag, or other tags like that, directly. Including the “gamecenter” haxelib triggers it’s “include.xml” in order to reference any additional files. First, though, you must run “lime rebuild” for it to compile the native library file, otherwise, it will be missing

1 Like

Thanks Joshua, I was able to get this running the other night not long after you pushed 1.0.2.