How to use GSGameCenterConnectRequest function from GameSparks?

I am trying to use GSGameCenterConnectRequest function in Unreal Engine 4.14. The error message tells me that I need to pass the variables “publicKeyURL”, “salt”, “signature”, “timestamp” and “externalPlayerId”. It also says that those variables can be accessed from GKLocalPlayer.generateIdentityVerificationSignatureWithCompletionHandler. Then, I tried to use that function, but it was not accessible in UE4. So I create a function in C++ and tried to use that. I imported GameKit, but it was not able to use that function because it is Objective-C. So I created an Objective-C file, but somehow, I cannot compile it. The file appears to be “red” in Xcode. What should I do?

Hi,

Does your Build.Cs file have the following:
PublicDependencyModuleNames.AddRange(new string[] { “Core”, “CoreUObject”, “Engine”, “InputCore”, “GameSparks”, “OnlineSubsystem” });

I’m with GameSparks support. We have answered the ticket you opened in our support system.

Thanks

Replied you in the ticket. The problem is still unsolved.
https://support.gamesparks.net/support/tickets/3733

Thank you.

Hi Omar,

Thank you for your help, I tried your method, but it does not work. The .m file in my Xcode is still “red” and when I build the project, it says:

[2/4] Compile IOSInfo.cpp
[3/4] Compile helper.m
[1/4] Compile AngryBall.generated.cpp
error: invalid argument ‘-std=c++11’ not allowed with ‘C/ObjC’

I just need to use the function [GKLocalPlayer generateIdentityVerificationSignatureWithCompletionHandler] in my project, but when I created GKLocalPlayer in my C++ file, it cannot access that function. Could you help me with it? Here is the temporary project that I created to learn this:
https://drive.google.com/a/uci.edu/file/d/0Bw35VsGxM4mIMTJjTHZiQVhYY2M/view?usp=sharing

Thank you,