프로젝트를 하던중 image_picker를 설치하고 빌드를 하자 다음과 같은 오류가 발생했다.
ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Simulator device returned an error for the requested operation.
found nothing to terminate
Underlying error (domain=NSPOSIXErrorDomain, code=3):
The operation couldn’t be completed. found nothing to terminate
found nothing to terminate
ios는 사진 권한이 필요하다는 에러였다.
해결 방법은 <project root>/ios/Runner/Info.plist
파일에 <key>
값을 추가해주면 된다.
<key>NSCameraUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
<key>NSMicrophoneUsageDescription</key>
<string>Used to capture audio for image picker plugin</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to demonstrate image picker plugin</string>
윗 코드를 추가하여 카메라, 마이크, 사진 권한을 줄 수 있다.
잘못된 정보가 있을 수 있습니다. 댓글을 통해 피드백 부탁드립니다!