인증에서는 다음과 같은 부가기능을 제공합니다.

Facebook 친구 목록 가져오기

getProviderFriendsList()는 해당 게임을 하는 Facebook 친구의 PlayerID를 제공합니다.
게임을 하지만 Facebook 연동 이력이 없는 친구는 목록에 나타나지 않으며 게임 연동 이력은 있지만 현재 Facebook이 연동되어 있지 않은 경우 PlayerID -1을 리턴합니다.


Unity®

API Reference: hive.AuthV4.getProviderFriendsList

C++

API Reference: AuthV4::getProviderFriendsList

Kotlin

API Reference: com.hive.AuthV4.getProviderFriendsList

Java

API Reference: com.hive.AuthV4.getProviderFriendsList

Swift

API Reference: AuthV4Interface.getProviderFriendsList

Objective-C

API Reference: HIVEAuthV4:getProviderFriendsList

COPPA 대응

COPPA(Children’s Online Privacy Protection Act)는 13세 미만 어린이의 개인 정보 보호를 목적으로 발효된 미국 법률입니다. Hive는 COPPA 규정에 대응하기 위해 Hive SDK v4.10.0부터 13세 미만 여부를 조회하는 getAgeGateU13() 메서드를 추가합니다. 사용자가 13세 미만일 경우 API가 반환하는 값은 true입니다.

예제 코드
Unity®

API Reference: AuthV4.getAgeGateU13

C++

API Reference: AuthV4::getAgeGateU13

Kotlin

API Reference: AuthV4.getAgeGateU13

Java

API Reference: AuthV4.INSTANCE.getAgeGateU13

Swift

API Reference: AuthV4Interface.getAgeGateU13

Objective-C

API Reference: HIVEAuthV4 getAgeGateU13

동작 변경 사항

ageGateU13() 값이 true일 때 달라지는 동작은 아래와 같습니다.

  • iOS
    • AuthV4.setup()Auth.initialize() 호출 시 푸시 권한 동의 여부를 묻는 팝업이 노출되지 않습니다.
    • 푸시 API가 동작하지 않습니다.
  • Android
    • 종료 팝업 노출 시 더 많은 게임(More Games) 버튼을 표시하지 않습니다.
    • 리모트 푸시가 수신되지 않으며, 푸시 API가 동작하지 않습니다.

OS 권한 다시 요청하기

AndroidManifest.xml 파일에는 게임에 필요 권한 목록이 정리되어 있습니다. 이 중 일부 권한을 해당 API의 String 리스트로 전달하여 사용해보세요. 유저가 특정 권한을 수락했거나 거절했는지 확인할 수 있습니다. 유저가 거절한 권한 중 Dangerous permission에 해당하는 권한이 있다면 OS 권한 동의 팝업으로 유저에게 다시 노출합니다. 그 외 항목은 디바이스 설정 상태에 따라 자동으로 수락 또는 거절 처리됩니다. 권한을 잘못 입력하거나 오타가 있을 경우 AndroidManifest.xml 파일에 선언하지 않은 권한으로 간주하여 거절 처리합니다.

이 기능은 Android 6.0 (API level 23) 이상 버전에서 동작합니다. Android API level이 23 미만이거나 iOS일 경우에는 미지원 ResultAPI를 전달합니다.

예제 코드
Unity®

API Reference: PlatformHelper.requestUserPermissions

C++

API Reference: PlatformHelper::requestUserPermissions

Kotlin

API Reference: PlatformHelper.requestUserPermissions

Java

API Reference: PlatformHelper.INSTANCE.requestUserPermissions

기기 관리 서비스 이용하기

기기 관리 서비스는 Hive 콘솔에서의 설정에 따라 로그인 시 자동으로 동작합니다. 로그인 후 게임에서는 AuthV4 클래스의 showDeviceManagement() 메서드를 호출하여 유저에게 기기 관리 목록을 보여줍니다.
기기 관리 서비스를 사용하는 게임은 기기 인증 실패로 인해 로그인이 해제되면 Result API의 AuthV4NotRegisteredDevice 코드를 처리하여 자동으로 재로그인을 시도하거나 로그아웃해야 합니다. 기기 관리 서비스에 대한 자세한 내용은 운영가이드인 기기 관리 서비스 소개를 참고하세요.

Unity®

API Reference: AuthV4.showDeviceManagement

C++

API Reference: AuthV4::showDeviceManagement

Kotlin

API Reference: AuthV4.showDeviceManagement

Java

API Reference: AuthV4.INSTANCE.showDeviceManagement

Swift

API Reference: AuthV4Interface.showDeviceManagement

Objective-C

API Reference: HIVEAuthV4 showDeviceManagement

Google Play 게임 업적 및 리더보드

Google 피처드 선정을 목적으로 개발한다면 Google Play 게임의 업적과 리더보드 기능을 적용해야 합니다.

만약 유저가 IdP 중 Google 계정으로 게임에 로그인하면 Play Games Services(PGS)에 자동 로그인되어 업적과 리더보드를 사용할 수 있습니다. 이후 유저가 PGS 설정 화면에서 로그아웃할 경우, 게임 내 로그아웃 버튼과 동일하게 동작해 게임에서 로그아웃됩니다. Google Play 게임의 기능에 대한 자세한 설명은 Google Play Games Services 가이드를 참고하세요.

PlayerID 전달

Google Play 게임에 PlayerID를 요청하려면 ProviderGoogle 클래스의 getGooglePlayerId() 메서드를 호출해야 합니다. 이 메서드를 호출하면 Google Play 게임의 PlayerID뿐 아니라 유효성을 검증하는 AuthCode도 함께 전달됩니다.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderGoogle.getGooglePlayerId

C++

API Reference: ProviderGoogle::getGooglePlayerId

Android

API Reference: com.hive.ProviderGoogle.getGooglePlayerId

업적

Hive를 이용해 Google Play 게임의 업적(Achievement) 기능을 사용하기 위해서는 ProviderGoogle 클래스를 사용하면 됩니다.

Google Play 게임의 숨겨진 업적 공개

Google Play 게임의 숨겨진 업적 공개 기능을 사용하기 위해서는 achievementsReveal() 메서드를 호출하세요. achievementsReveal() 사용 시 업적이 0% 로 공개만 될 뿐 달성되지는 않습니다.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderGoogle.achievementsReveal

C++

API Reference: ProviderGoogle::achievementsReveal

Kotlin

API Reference: ProviderGoogle.achievementsReveal

Java

API Reference: ProviderGoogle.INSTANCE.achievementsReveal

Google Play 게임의 업적 달성 완료 요청

Google Play 게임의 업적 달성 완료 요청 기능을 사용하기 위해서는 achievementsUnlock() 메서드를 호출하세요. achievementsUnlock() 사용 시 업적의 공개 여부와 상관없이 업적이 100%로 달성됩니다.

다음은 예제 코드입니다.

Unity®

API Reference: ProviderGoogle.achievementsUnlock

C++

API Reference: ProviderGoogle::achievementsUnlock

Kotlin

API Reference: ProviderGoogle.achievementsUnlock

Java

API Reference: ProviderGoogle.INSTANCE.achievementsUnlock

Google Play 게임의 업적 수치 증가 요청

Google Play 게임의 업적 수치 증가 요청 기능을 사용하기 위해서는 업적 수치를 파라미터로 설정하여 achievementsIncrement() 메서드를 호출하세요. 업적 수치는 해당 API가 호출되었을 시 설정된 value 값의 합산이며 총 합산이 Max가 될 경우 자동으로 업적이 달성됩니다.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderGoogle.achievementsIncrement

C++

API Reference: ProviderGoogle::achievementsIncrement

Kotlin

API Reference: ProviderGoogle.achievementsIncrement

Java

API Reference: ProviderGoogle.INSTANCE.achievementsIncrement

Google Play 게임의 업적 목록 요청 (Helper)

Google Play 게임의 업적 목록을 요청하기 위해서는 showAchievements() 메서드를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: AuthV4.Helper.showAchievements

C++

API Reference: AuthV4::Helper::showAchievements

Kotlin

API Reference: AuthV4.Helper.showAchievements

Java

API Reference: AuthV4.Helper.INSTANCE.showAchievements

 

Google Play 게임의 업적 목록 요청 (Auth v4)

Google Play 게임의 업적 목록을 요청하기 위해서는 showAchievements() 메서드를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: ProviderGoogle.showAchievements

C++

API Reference: ProviderGoogle::showAchievements

Kotlin

API Reference: ProviderGoogle.showAchievements

Java

API Reference: ProviderGoogle.INSTANCE.showAchievements

 

리더보드

Hive를 이용해 Google Play 게임의 리더보드 (Leaderboard) 기능을 사용하기 위해서는 ProviderGoogle 클래스를 사용하면 됩니다.

Google Play 게임의 리더보드 점수 갱신 요청

Google Play 게임의 리더보드 점수 갱신 요청을 하기 위해서는 leaderboardsSubmitScore() 메서드를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderGoogle.leaderboardsSubmitScore

C++

API Reference: ProviderGoogle::leaderboardsSubmitScore

Kotlin

API Reference: ProviderGoogle.leaderboardsSubmitScore

Java

API Reference: com.hive.ProviderGoogle.leaderboardsSubmitScore

Google Play 게임의 리더보드 목록 요청 (Helper)

Google Play 게임의 리더보드 목록을 요청하기 위해서는 showLeaderboards() 메서드를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.AuthV4.Helper.showLeaderboard

C++

API Reference: com.hive.AuthV4.Helper.showLeaderboard

Kotlin

API Reference: Helper.showLeaderboard

Java

API Reference: AuthV4.Helper.INSTANCE.showLeaderboard

 

Google Play 게임의 리더보드 목록 요청 (Auth v4)

Google Play 게임의 리더보드 목록을 요청하기 위해서는 showLeaderboards() 메서드를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderGoogle.showLeaderboards

C++

API Reference: ProviderGoogle::showLeaderboards

Kotlin

API Reference: ProviderGoogle.showLeaderboards

Java

API Reference: com.hive.ProviderGoogle.showLeaderboards

 

Apple Game Center 게임 업적 및 리더보드

Apple 피쳐드 선정을 위해서는 Apple Game Center의 업적과 리더보드 기능 적용이 필요합니다.

Hive가 제공하는 Apple Game Center의 업적과 리더보드 기능은 유저 인증 상태와는 무관합니다. 즉, Apple Game Center의 업적과 리더보드 기능을 이용하는데 사용된 Apple Game Center 계정이 Hive 로그인 된 계정에 연동되어 있지 않거나 실제로 연동된 계정과 다를 수 있습니다.

Apple Game Center의 기능에 대한 자세한 설명은 Apple Game Center 가이드를 참고하세요.

업적 (Achievement)

Hive를 이용해 Apple Game Center의 업적(Achievement) 기능을 사용하기 위해서는 ProviderApple 클래스를 사용하면 됩니다.

Game Center 업적 목록 요청

Apple Game Center의 업적 목록 요청 기능을 사용하기 위해서는 loadAchievements() 함수를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderApple.loadAchievements

C++

API Reference: ProviderApple::loadAchievements

iOS

API Reference: HIVEProviderApple::loadAchievements:

Game Center 업적 전송 요청

Apple Game Center의 업적 전송 요청 기능을 사용하기 위해서는 업적 달성률업적 성공 시 상단 배너 노출 여부를 파라미터로 설정하여 reportAchievement() 함수를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderApple.reportAchievement

C++

API Reference: ProviderApple::reportAchievement

Swift

API Reference: ProviderApple.reportAchievement

Objective-C

API Reference: HIVEProviderApple reportAchievement

Game Center 업적 UI 요청(Helper)

Apple Game Center의 업적 UI를 요청하기 위해서는 showAchievements() 함수를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.AuthV4.Helper.showAchievements

C++

API Reference: AuthV4::Helper::showAchievements

Swift

API Reference: AuthV4Interface.helper().showAchievements

Objective-C

API Reference: [HIVEAuthV4 helper] showAchievements

Game Center 업적 UI 요청

Apple Game Center의 업적 UI를 요청하기 위해서는 showAchievements() 함수를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: ProviderApple.showAchievements

C++

API Reference: ProviderApple::showAchievements

Swift

API Reference: ProviderApple.showAchievements

Objective-C

API Reference: HIVEProviderApple showAchievements

Game Center 업적 초기화

Apple Game Center의 업적 초기화를 요청하기 위해서는 resetAchievements() 함수를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderApple.resetAchievements

C++

API Reference: ProviderApple::resetAchievements

Swift

API Reference: resetAchievements(_:)

Objective-C

API Reference: HIVEProviderApple::resetAchievements:

리더보드 (Leaderboard)

Hive를 이용해 Apple Game Center의 리더보드 (Leaderboard) 기능을 사용하기 위해서는 ProviderApple 클래스를 사용하면 됩니다.

Game Center 리더보드 정보 전송

Apple Game Center에 리더보드 정보 전송을 위해서는 reportScore() 함수를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderApple.reportScore

C++

API Reference: ProviderApple::reportScore

Swift

API Reference: HIVEProviderApple::reportScore:leaderboardIdentifier:handler:

Objective-C

API Reference: HIVEProviderApple::reportScore:leaderboardIdentifier:handler:

Game Center 리더보드 UI 요청(Helper)

Apple Game Cente에 리더보드 UI 요청을 위해서는 showLeaderboard() 함수를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.AuthV4.Helper.showLeaderboard

C++

API Reference: AuthV4::Helper::showLeaderboard

Swift

API Reference: showLeaderboard(_:)

Objective-C

API Reference: HIVEProviderApple::showLeaderboard:

Game Center 리더보드 UI 요청

Apple Game Cente에 리더보드 UI 요청을 위해서는 showLeaderboard() 함수를 호출하세요.

다음은 예제 코드입니다.

Unity®

API Reference: hive.ProviderApple.showLeaderboard

C++

API Reference: ProviderApple::showLeaderboard

Swift

API Reference: showLeaderboard(_:)

Objective-C

API Reference: HIVEProviderApple::showLeaderboard:

사진첩 포스팅

게임에서 기기의 사진첩을 호출하고, 페이스북에 사진을 게시할 수 있습니다. 다음은 예제 코드입니다.

Unity®

API Reference: SocialV4.sharePhoto

C++

API Reference: SocialV4::sharePhoto

Kotlin

API Reference: SocialV4.sharePhoto

Java

API Reference: SocialV4.INSTANCE.sharePhoto

Swift

API Reference: SocialV4Interface.sharePhoto

Objective-C

API Reference: HIVESocialV4 sharePhoto