Skip to content

getGameInformationWithGameID:language:completion: ​

Get Game Information ​

The getGameInformationWithGameID method retrieves detailed information for a specified game. You can pass a BCP 47 language tag or use the overload without the language parameter.


Prerequisite ​

Call initializeWithConfiguration:completion: and wait for the SDK to initialize successfully before calling this method.


Method Declarations ​

objectivec
+ (void)getGameInformationWithGameID:(nonnull NSString *)gameID
                            language:(nonnull NSString *)language
                          completion:(nullable void(^)(SUDOPGameInformation *_Nullable gameInformation,
                                                       NSError *_Nullable error))completion;

+ (void)getGameInformationWithGameID:(nonnull NSString *)gameID
                          completion:(nullable void(^)(SUDOPGameInformation *_Nullable gameInformation,
                                                       NSError *_Nullable error))completion;

Use the overload without language when you do not need to select a language. The SDK prefers the system's first preferred language and falls back to en when no preferred language is available.


Parameters ​

ParameterTypeRequiredDescription
gameIDNSString *YesThe unique game identifier. Must not be nil.
languageNSString *YesA BCP 47 language tag, such as zh-CN or en-US. Use the overload without this parameter when no language needs to be specified.
completionBlockNoCalled when the request finishes. On success, it returns gameInformation; on failure, it returns error. The callback runs on the main thread.

SUDOPGameInformation Result Model ​

FieldTypeDescription
gameIDNSString *Game ID.
gameNameNSDictionary<NSString *, NSString *> *Localized game names.
gameIconNSString *Game icon URL.
iconNSDictionary<NSString *, NSString *> *Localized game icon URLs.
gameIntroductionNSDictionary<NSString *, NSString *> *Localized game introductions.
gameDescriptionNSDictionary<NSString *, NSString *> *Localized game descriptions.
categoryNSIntegerGame category: 1-RPG, 2-strategy and management, 3-casual and puzzle, 4-action and adventure, 5-shooter, 6-sports and racing, 7-card and board, 8-music and dance.
servicePhoneNSString *Customer service phone number.
serviceEmailNSString *Customer service email address.
subjectTypeNSIntegerSubject type: 0-individual, 1-enterprise.
subjectNameNSString *Full enterprise name or individual name.
privacyPolicyUrlNSString *Privacy policy URL.
privacyPolicyNSDictionary<NSString *, NSString *> *Localized privacy policy URLs.
packageMd5NSString *MD5 checksum of the game package.
versionNSString *Game version.
updateTimelong longLast update timestamp in milliseconds.

Each localized dictionary contains at least a default key whose value is the default content. Other keys are BCP 47 language tags. If the requested language is unavailable, read the value for default.


Example ​

objectivec
NSString *gameID = @"game_101";
NSString *language = @"zh-CN";

[SUDOP getGameInformationWithGameID:gameID
                           language:language
                         completion:^(SUDOPGameInformation * _Nullable gameInformation,
                                      NSError * _Nullable error) {
    if (error) {
        NSLog(@"Failed to get game information: %@", error.localizedDescription);
        return;
    }

    NSString *gameName = gameInformation.gameName[language]
        ?: gameInformation.gameName[@"default"];
    NSLog(@"Game name: %@", gameName);
}];

// Omit the language to use the system's preferred language
[SUDOP getGameInformationWithGameID:gameID completion:nil];

Notes ​

  • gameID is required. Do not pass nil or an empty string.
  • This method performs a network request. Handle the result asynchronously in completion.
  • When specifying language, pass a valid BCP 47 language tag.
  • If error is returned, check the network, game ID, and the game's console configuration.