Apple의 운영체제에서는 애플리케이션이 민감한 정보나 기기 기능에 액세스하기 전에 승인을 요청하도록 요구합니다.애플리케이션에서 기기의 카메라, 마이크 또는 위치와 같은 기능에 액세스해야 하는 경우, 해당 기기 사용자가 애플리케이션에 대한 액세스 권한을 부여해야 합니다.
iOS 기기에서 인증 요청에 대한 자세한 내용은 Apple 문서를 참조하십시오.
애플리케이션에 필요한 기기 기능에 액세스하려면 다음을 수행해야 합니다.
기능 사용 설명 또는 목적 문자열은 애플리케이션이 기기의 기능에 액세스하려고 할 때 iOS 시스템에 표시되는 메시지입니다.애플리케이션 액세스 이유를 명시하는 명확한 설명을 추가하는 것이 가장 좋습니다.
플레이어 설정의 Configuration 섹션(메뉴:Edit > Project Settings > Player > Other Settings)에 기능 사용 설명을 입력할 수 있습니다.플레이어 설정에 사용 설명을 추가하면 Unity는 info.plist 파일에 이것을 키-값 페어로도 추가합니다.예를 들어, 애플리케이션에서 기기 카메라에 액세스하려는 경우 플레이어 설정에서 Camera 사용 설명을 추가하십시오.입력한 설명은 info.plist 파일에 NSCameraUsageDescription 키 값으로 자동 표시됩니다.자세한 내용은 Apple 전용 iOS 플레이어 설정을 참조하십시오.
또는 info.plist 파일에 필요한 기능 사용 설명 키-값 페어를 직접 추가할 수도 있습니다.
기능 사용 설명을 추가한 후, Application.RequestUserAuthorization 메서드를 사용하여 카메라 또는 마이크 액세스 요청을 전송합니다.시스템에서 인증 요청을 설명하는 다이얼로그를 표시합니다.
이 API를 사용하는 방법을 보여주는 코드 예제는 Application.RequestUserAuthorization을 참조하십시오.
기기 위치 액세스에 대한 자세한 내용은 LocationService API를 참조하십시오.
요청의 권한 부여 상태는 Application.HasUserAuthorization 메서드를 사용하여 확인할 수 있습니다.
참고:기기 사용자는 언제든지 기기 설정을 통해 기능 권한을 수정할 수 있습니다.Application.HasUserAuthorization 메서드를 사용하여 기능에 액세스하기 전에 해당 기능의 권한 상태를 확인할 수 있습니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.