LibGDX and Google Play Game Services Bindings

LibGDX and Google Play Game Services Bindings

I have my LibGDX game running with MOE and am now trying to add Google Play Game Services support.

Now I have created .jars with the "Link third party framework to Xcode" action for GoogleOpenSource, GoogleSignIn and gpg, hooking up the bundle files when necessary. These .jars are now in /lib in my /ios-moe project and I have "compile fileTree(dir: 'lib', include: '*.jar')" in the root gradle file.

Now I can call "((GPGManager)GPGManager.sharedInstance()).signIn();" to try and sign in in my ios app. There are no errors in the editor or when I build, however when I run the game I get a crash with the following:

"/teamcity/workdir/moe_repo_build/moe_repo/migeran/natj/src/main/native/natj/ObjCRuntime.mm:1231 FAILURE: Binding class refers to class GPGManager, but it can not be found."

Any ideas? 

edit: LibGDX 1.9.3
Multi OS Engine 1.0.702 on OSX
Android Studio 2.1.1

Play Games C++ SDK Version 2.1 https://developers.google.com/games/services/downloads/gpg-cpp-sdk.v2.1.zip
Google Sign-In SDK 4.0.0 https://developers.google.com/identity/sign-in/ios/sdk/google_signin_sdk...
GoogleOpenSource from Google Plus iOS SDK 1.7.1 http://goo.gl/9cTqyZ

 

16 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Has anyone managed to get this working?

i get same problem :(

Does anyone have any ideas? I'm really stuck on this and it's preventing me from publishing my app.

i got the same problem, but with another class.

It's likely that some problems have occurred with Intel's NatJ generator or natj runtime libraries.

here is my error:

/teamcity/workdir/moe_repo_build/moe_repo/migeran/natj/src/main/native/natj/ObjCRuntime.mm:1231 FAILURE: Binding class refers to class MFMailComposeViewController, but it can not be found.

this is not a custom binding class, it's default available binding in MOE sdk

intel-moe-ios.jar --> package: ios.messageui

how it could be happen,  what's wrong ?

 

Has anyone got Google Play Game Services or Firebase Ads running?

This is preventing me from publishing my game and is becoming extremely frustrating.

Hi Giles,

Would you share your project to reproduce this issue via a private message? You can send me a link to the project using "Send Author A Message" button on the forum.

Thanks,
Alexey

Sent,

Thanks Alexey

Hi,

we are looking into this.

Best Regards,
Gergely

Thanks Gergely,

Let me know if there's anything further you wanted me to test.

Dear All,

if you have issues with missing binding classes, please make sure that the necessary Google Play frameworks are included in the Xcode project (added as a framework dependency).

We are working on a full sample and tutorial on using the Google Play frameworks with MOE, please stay tuned.

Best Regards,
Gergely

 

Been watching this thread with interest.  I will definitely be excited to see the full sample/tutorial when complete.  Thanks everyone!

Paul

Quote:

Gergely Kis - Migeran Ltd wrote:

Dear All,

if you have issues with missing binding classes, please make sure that the necessary Google Play frameworks are included in the Xcode project (added as a framework dependency).

We are working on a full sample and tutorial on using the Google Play frameworks with MOE, please stay tuned.

Best Regards,
Gergely

Thanks Gergely,

How do I do this? Is it "Linked Frameworks and Libraries"?

In the fixed project you sent me the frameworks here linked to .framework files inside "intel-moe/build/lib". Were they manually placed there?

The workflow still isn't clear to me.

Dear Giles,

In order to get this working, you need to link all of the frameworks and some additional. This is a complete list of frameworks I linked:

AddressBook, AssetsLibrary, CoreGraphics, CoreLocation, CoreMedia, CoreMotion, CoreTelephony, CoreText, Foundation, GoogleAppUtilities, GoogleAuthUtilities, GoogleNetworkingUtilities, GoogleOpenSource, GooglePlus, GoogleSignIn, GoogleSymbolUtilities, GoogleUtilities, gpg, libz, MediaPlayer, MOE, QuartzCore, SafariServices, Security, SystemConfiguration, UIKit

Here's what I did:
- Created a new MOE project
- Right clicked on the ios module > Multi-OS Engine Actions > Link third party framework to Xcode
    - Added gpg, GoogleOpenSource and GooglePlus frameworks one-by-one like this
    - Don't forget to specify the "Copy bundle resources" tab where applicable
- I created a run configuration and tried to run the project (I did this so an Xcode project would be generated, it's not a problem if the build fails)
- Now I went into the build.gradle file and added

    moe {
        xcode {
            generateProject false
        }
    }

- I opened the Xcode project and added the remaining Google frameworks and bundles by simply dragging the frameworks to the "Link Binary With Libraries" list and the bundle to the "Copy Bundle Resources" list.
- Then I added all the remaining frameworks from the list above to the "Link Binary With Libraries" by pressing the "+" sign in the list's bottom left.

    AddressBook, AssetsLibrary, CoreGraphics, CoreLocation, CoreMedia, CoreMotion, CoreTelephony, CoreText, Foundation, libz, MediaPlayer, MOE, QuartzCore, SafariServices, Security, SystemConfiguration, UIKit

- Now you can either run the application from Xcode or Android Studio.

Best Regards,
Kristóf

I have the same problem trying to link with CocoaPods. 

I generate the .jar and add it as a library. 

When I run the project in a iOS 9.3 simulator, I get the error

 "Binding class refers to class GAI, but it can not be found." (In this case I was using GoogleAnalytics pod)

Am I missing any step of CocoaPod configuration?

 

LibGDX 1.9.3

Multi-OS Engine 1.0.702

Android Studio 2.1.2

Mac OS X 10.11.6

 

 

I have this working now, thanks Kristoff.

With LibGDX the xcode project generation is already off, so I needed to go and all those frameworks manually.

Leave a Comment

Please sign in to add a comment. Not a member? Join today