프론트엔드
IOS input 태그 take a photo 클릭시 앱 꺼지는 이슈
대구 올빼미
2022. 2. 15. 16:53
React native 안에서 React로 만들어진 웹으로 앱을 운영 중이다.
앱 소개 페이지 : https://app.ggongsul.net/intropage
술집 갈 땐 잊지 말고, 꽁술!
서울 600여개 제휴점에서 방문할 때마다 술 1병 공짜!
app.ggongsul.net
사진을 올리기 위해 React 에서 input 태그를 사용하고 있는데,
이상하게 IOS 기기에서만 take a photo를 클릭하면 앱이 꺼지는 이슈가 발생하였다.
(Android 는 발생하지 않는다.)
찾아보고 나니, IOS에서 take a photo를 클릭하면 앱 권한을 요청하는 info.plist가 빠져있었다.
<key>NSCameraUsageDescription</key>
<string>게시글 등록을 위한 사진 촬영을 허용합니다</string>
info.plist에 해당 내용을 입력해주면 정상적으로 작동한다.
참고한 문서 :
HTML File input causes crash in iOS if "Take Photo or Video" option is selected · Issue #214 · react-native-webview/react-native-webview
HTML File input causes crash in iOS if "Take Photo or Video" option is selected · Issue #214 · react-native-webview/react-nati
I have a webview where I have a file input option as below: <input type="file" name="attach_file" title="" multiple="multiple"> Here, if I click on the...
github.com