- Home /
Question by
muto_tea · Dec 30, 2019 at 08:11 AM ·
iosaccesspermissions
How to check camera permission in ios app?
I want to get Camera access in ios app but it not work. I use this code but always return false.(I write this code Start() and Update())
#if UNITY_IOS m_IsPermitedCamera = Application.HasUserAuthorization(UserAuthorization.WebCam); Debug.Log(m_IsPermitedCamera); #endif
When I tap access the camera pop up OK , but return false.
Comment
Answer by Carwashh · Dec 30, 2019 at 08:32 PM
The docs show a Request Auth: https://docs.unity3d.com/ScriptReference/Application.RequestUserAuthorization.html
Have you got this line? Application.RequestUserAuthorization(UserAuthorization.WebCam);