init static method

void init({
  1. String? nativeAppKey,
  2. String? javaScriptAppKey,
  3. String? customScheme,
  4. ServerHosts? serviceHosts,
  5. PlatformSupport? platformSupport,
  6. bool? loggingEnabled,
})

KO: Kakao SDK 초기화
앱별 커스텀 URL 스킴은 customScheme으로 등록
loggingEnabled로 Kakao SDK 내부 로그 기능 활성화 여부 설정

EN: Initializes Kakao SDK
Register custom URL scheme for each app as customScheme
Set Whether to enable the internal log of the Kakao SDK with loggingEnabled

Implementation

static void init({
  String? nativeAppKey,
  String? javaScriptAppKey,
  String? customScheme,
  ServerHosts? serviceHosts,
  PlatformSupport? platformSupport,
  bool? loggingEnabled,
}) {
  if (nativeAppKey == null && javaScriptAppKey == null) {
    throw KakaoClientException(
      ClientErrorCause.badParameter,
      "A Native App Key or JavaScript App Key is required",
    );
  }

  _nativeKey = nativeAppKey ?? "";
  _jsKey = javaScriptAppKey ?? "";
  _customScheme = customScheme ?? "kakao$appKey";
  hosts = serviceHosts ?? ServerHosts();
  platforms = platformSupport ?? PlatformSupport();
  logging = loggingEnabled ?? false;
}