SDKBOC gpc Google Play Service & Socket connection

Hello
After importing the sdkbox gpc, we are facing issue with socket connection.(Before installing sdkbox gpc working fine)
it will crash at lws_create_context

Thanks
P.Shunmugam

what’s the gpc?

what’s the gpc?
Google Play service
I imported the google play service using “sdkbox import gpg”

Thanks

would u plz show the crash log ?

I am getting error on this line
__wsContext = lws_create_context(&creationInfo); in WebSocket.cpp

Thanks

but seems not error here:

After Executing
__wsContext = lws_create_context(&creationInfo); in WebSocket.cpp (We are getting error EXC BAD Access)

would u like share a test case in GitHub ?

I added a websocket test case with sdkbox-sample-gpg here

works on iOS and Android platform.

Hello yinjimmy
Thanks for your reply

In KCServer.h

#include “extensions/cocos-ext.h”
#include “network/SocketIO.h”

using namespace cocos2d::ui;
USING_NS_CC;
using namespace cocos2d::network;
using namespace rapidjson;

class KCServer : public cocos2d::Ref, public cocos2d::network::WebSocket::Delegate

in KCServer.cpp
void KCServer::createAndInitializeSocketServer()
{

WebSocket *_ws = new network::WebSocket();
_ws->init(*this, “ws://echo.websocket.org”);
}

and i am getting error in Websocket.cpp

lws_context_creation_info creationInfo = convertToContextCreationInfo(__defaultProtocols, true);
__wsContext = lws_create_context(&creationInfo);

android build working fine for me, but iOS not working

Thanks for your valuable time
P.Shunmugam

I want to know which cocos2d-x version and sdkbox version.

cocos2dx version : 3.16
SDKBOX_VERSION_STR “sdkbox V2.3.17.9”

OK, I reproduced this issue. BUT when I removed SDKBox GPG plugin, WebSocket still crash there ;(

UPDATE: I confirm the issue framework: gpg.framework from Google .

UPDATE2: https://developers.google.com/games/services/cpp/gettingStartedIOS

Google Play games services for iOS is deprecated, and is not likely to function as expected. Do not use Google Play games services for iOS in new apps. See the deprecation announcement blog post for more details.

UPDATE3: tried update libwebsockets.a, no luck.

Maybe you can try pre-version libwebsockets library Or do not use gpg in iOS platform.

May I ask what function do you need with gpg?

Thanks yinjimmy

I tried but no luck

I want to implement GameCenter login in my project

you can use sdkboxplay plugin, thanks.

Thanks yinjimmy

It is working for me