iOS Privacy – Camera Usage Description 카메라 권한 사용에 대한 설명 추가하기

카메라 사용을 위해서 Info.plist에 아래 항목이 추가되어있어야한다.

Privacy - Camera Usage Description

Info.plist 파일에 항목을 추가하고 Key 입력 필드에 “NSCameraUsageDescription” 입력 후 Value 입력 필드에 카메라 권한이 왜 필요한지 어디에 사용되는지 등 권한에 대한 설명을 작성한다.

없으면 카메라 기능에 액세스할 때 아래와 같은 오류가 발생하고 앱은 비정상 종료된다.

2021-12-06 10:38:43.405974+0900 example[25586:8408389] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

“Debug Navigator”에서는 아래와 같은 오류가 발생했다고 표시된다.

Thread 17: signal SIGABRT
libsystem_kernel.dylib`__abort_with_payload:
    0x1ae885a9c <+0>:  mov    x16, #0x209
    0x1ae885aa0 <+4>:  svc    #0x80
->  0x1ae885aa4 <+8>:  b.lo   0x1ae885ac4               ; <+40>
    0x1ae885aa8 <+12>: pacibsp 
    0x1ae885aac <+16>: stp    x29, x30, [sp, #-0x10]!
    0x1ae885ab0 <+20>: mov    x29, sp
    0x1ae885ab4 <+24>: bl     0x1ae862e28               ; cerror_nocancel
    0x1ae885ab8 <+28>: mov    sp, x29
    0x1ae885abc <+32>: ldp    x29, x30, [sp], #0x10
    0x1ae885ac0 <+36>: retab  
    0x1ae885ac4 <+40>: ret    

Join the Conversation

1 Comment

  1. Greetings, I believe your web site might be
    having web browser compatibility problems. Whenever I take a look at your site in Safari,
    it looks fine however when opening in Internet Explorer,
    it has some overlapping issues. I just wanted to give you a quick heads up!

    Aside from that, excellent website!

Leave a comment

Your email address will not be published.