DetachGameCenterIdentity
Detach the Game Center identity from the current profile.
Service | Operation |
---|---|
identity | DETACH |
Method Parameters
Parameter | Description |
---|---|
gameCenterId | The player's game center id (use the playerID property from the local GKPlayer object) |
continueAnon | Proceed even if the profile will revert to anonymous? |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string gameCenterId = "someId";
_bc.IdentityService.DetachGameCenterIdentity(
gameCenterId,
true,
SuccessCallback, FailureCallback);
const char * gameCenterId = "someId";
_bc->getIdentityService()->detachGameCenterIdentity(
gameCenterId, false, this);
- (void)detachGameCenterIdentity:(NSString *)gameCenterId
continueAnon:(bool)continueAnon
completionBlock:(BCCompletionBlock)cb
errorCompletionBlock:(BCErrorCompletionBlock)ecb
cbObject:(BCCallbackObject)cbObject;
public void detachGameCenterIdentity(String gameCenterId, boolean continueAnon, IServerCallback callback)
_bc.identity.detachGameCenterIdentity = function(gameCenterId, continueAnon, callback)
var gameCenterId = "someId";
var continueAnon = true;
ServerResponse result = await _bc.identityService.detachGameCenterIdentity(gameCenterId:gameCenterId, continueAnon:continueAnon);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
// N/A
// N/A
JSON Response
{
"status": 200,
"data": null
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40210 | DOWNGRADING_TO_ANONYMOUS_ERROR | Occurs when detaching the last non-anonymous identity from an account with continueAnon set to false. |