openforge / capacitor-game-services

A capacitor plugin for both Apple Game Center and Google Play Game Services libraries.
MIT License
22 stars 5 forks source link

err: GameServices does not have web implementation. #19

Open SimpleDm opened 3 years ago

SimpleDm commented 3 years ago

Whatever I do, I meet "GameServices does not have web implementation.", Can you tell me what it might be?

(I don't use ionic if that's important.)

import { Plugins } from '@capacitor/core';
import '@openforge/capacitor-game-services';
import { GameServicesPlugin } from '@openforge/capacitor-game-services';

const GameServices = Plugins.GameServices as GameServicesPlugin;
GameServices.signIn();
hscheuerle commented 3 years ago

Capacitor is a bridge for native android and ios apis. You can use Capacitor without ionic, but Apple game center and Google play services are not available for web, so this only works in one of those two environments.

maximnara commented 3 years ago

I have same issue when trying use GameServicesPlugin without @capacitor/core Plugin.

On android import { Plugins } from '@capacitor/core'; const { GameServices } = Plugins; works fine, but on ios it seems not working. There is error 'a.singIn' is not function of non object.

It seems i misconfig in apple connect. Any idea how to fix it? My game table has bot published status, everything else seems to be fine.

SimpleDm commented 3 years ago

For Android i fix "GameServices does not have web implementation." when add right connect "GameServices" in Initializes the Bridge (MainActivity.java)

import io.openforge.gameservices.GameServices;

public void onCreate(Bundle savedInstanceState) { ... this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{ add(GameServices.class); ... }} }

Perhaps someone will help. (ionic was not required)

maximnara commented 3 years ago

@SimpleDm for android there is full instruction, the main problem for me was to do the actions in goole play console to register an app.

iOS have no such instruction. Where i need to put score table id for iOS?

jedihacks commented 1 year ago

@Ricardo385 can you comment?