Skip to content

getRuntimeDescription ​

Get Runtime Description ​

getRuntimeDescription is a class method of the SUDRT protocol, used to obtain the descriptive string of the current game engine (Runtime). It typically returns the engine's kernel name or identifier, making it easy to distinguish between different runtime environments in logs or monitoring systems.


Method Declaration ​

objectivec
/**
 * Gets the description information of the current Runtime.
 * @return A description string, such as "SudMidasRuntime-V8".
 */
+ (NSString *)getRuntimeDescription;

Runtime Behavior ​

  1. Static invocation: As a class method, you can call it directly through the class name that implements the protocol, without creating an instance.
  2. Environment identification: When integrating multiple SDKs or performing grayscale testing, the information output by this method can be used to confirm the underlying rendering kernel currently active.
  3. Information dimension: It provides an "identity marker", mainly used for display and statistics, rather than version logic judgment.

Code Example ​

Record environment information when the App launches or the engine initializes:

objectivec
// Example: print the engine identity in the log
NSString *engineDesc = [SudRuntimeImpl getRuntimeDescription];
NSLog(@"[SUD_SDK] Currently loaded engine description: %@", engineDesc);

// Expected output example:
// [SUD_SDK] Currently loaded engine description: SudMidasRuntime(Native-Core)

Notes ​

  • Distinguish from version number: If you need to obtain the specific numeric version (such as 1.2.5), use getRuntimeVersion.
  • Logging convention: It is recommended to include this description information when reporting error logs (Crash Log) to the server, so that the server can cluster issues by engine type.
  • Immutability: Within the same SDK version, this description is typically a hard-coded static string.