{"id":2416,"date":"2024-10-31T17:16:47","date_gmt":"2024-10-31T08:16:47","guid":{"rendered":"http:\/\/blog.moramcnt.com\/?p=2416"},"modified":"2024-10-31T17:16:47","modified_gmt":"2024-10-31T08:16:47","slug":"react-native-%ec%b9%b4%eb%a9%94%eb%9d%bc-%eb%b0%94%ec%bd%94%eb%93%9c-%ec%8a%a4%ec%ba%90%eb%84%88","status":"publish","type":"post","link":"http:\/\/blog.moramcnt.com\/?p=2416","title":{"rendered":"React Native \uce74\uba54\ub77c \ubc14\ucf54\ub4dc \uc2a4\uce90\ub108"},"content":{"rendered":"<p><strong>I. \ubaa9\ud45c<\/strong><\/p>\n<p>\uc6f9\ubdf0 \uae30\ubc18\uc758 \ud558\uc774\ube0c\ub9ac\ub4dc \uc571\uc5d0\uc11c\ub294 \uce74\uba54\ub77c\ub97c \uc774\uc6a9\ud558\uc5ec \ubc14\ucf54\ub4dc\ub97c \uc2a4\uce94\ud560\uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uc5f0\uad6c\ud55c\ub2e4.<\/p>\n<p><b>II. \uc5f0\uad6c<\/b> <b>\ubc0f<\/b> <b>\uac1c\ubc1c\ub0b4\uc6a9<\/b><\/p>\n<p>1. \ub77c\uc774\ube0c\ub7ec\ub9ac \uc124\uce58<\/p>\n<table style=\"width: 100%; margin-left: 20px; border-collapse: collapse; border-style: solid; border-color: #eeeeee; background-color: #ebebeb;\">\n<tbody>\n<tr>\n<td>npm install react-native-camera-kit &#8211;save<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>IOS\uc758 \uacbd\uc6b0 \ucd94\uac00\uc801\uc73c\ub85c pod\ub97c \uc124\uce58\ud574\uc57c \ud55c\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<table style=\"width: 100%; margin-left: 20px; border-collapse: collapse; border-style: solid; border-color: #eeeeee; background-color: #ebebeb;\">\n<tbody>\n<tr>\n<td>cd ios<\/p>\n<p>pod install<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>2. \uce74\uba54\ub77c \uad8c\ud55c<\/p>\n<p style=\"padding-left: 40px;\">\uac00. \uc548\ub4dc\ub85c\uc774\ub4dc<\/p>\n<p style=\"padding-left: 80px;\">.\/android\/app\/src\/AndroidManifest.xml\ud30c\uc77c\uc5d0 \uc544\ub798\uc640 \uac19\uc774 \uad8c\ud55c \ucd94\uac00<\/p>\n<table style=\"width: 100%; margin-left: 80px; border-collapse: collapse; border-style: solid; border-color: #eeeeee; background-color: #ebebeb;\">\n<tbody>\n<tr>\n<td>&lt;uses-permission android:name=&#8221;android.permission.CAMERA&#8221; \/&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"padding-left: 40px;\">\ub098. IOS<\/p>\n<p style=\"padding-left: 80px;\">.\/ios\/npc\/Info.plist \ud30c\uc77c\uc5d0 \uc544\ub798\ud0a4\ub97c \ucd94\uac00\ud55c\ub2e4.<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Key \u00a0: Privacy &#8211; Camera Usage Description<\/li>\n<li>Value : \uce74\uba54\ub77c\ub294 QR \ucf54\ub4dc \ub9ac\ub354\uc5d0 \ud65c\uc6a9\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p style=\"padding-left: 120px;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-2417\" src=\"http:\/\/blog.moramcnt.com\/wp-content\/uploads\/2024\/10\/\uc2a4\uce90\ub108-300x162.png\" alt=\"\" width=\"500\" height=\"270\" srcset=\"http:\/\/blog.moramcnt.com\/wp-content\/uploads\/2024\/10\/\uc2a4\uce90\ub108-300x162.png 300w, http:\/\/blog.moramcnt.com\/wp-content\/uploads\/2024\/10\/\uc2a4\uce90\ub108-1024x554.png 1024w, http:\/\/blog.moramcnt.com\/wp-content\/uploads\/2024\/10\/\uc2a4\uce90\ub108-768x415.png 768w, http:\/\/blog.moramcnt.com\/wp-content\/uploads\/2024\/10\/\uc2a4\uce90\ub108-1536x831.png 1536w, http:\/\/blog.moramcnt.com\/wp-content\/uploads\/2024\/10\/\uc2a4\uce90\ub108-2048x1108.png 2048w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>3. \uad6c\ud604<\/p>\n<table style=\"width: 100%; margin-left: 20px; border-collapse: collapse; border-style: solid; border-color: #eeeeee; background-color: #ebebeb;\">\n<tbody>\n<tr>\n<td>import { Camera, CameraType } from &#8216;react-native-camera-kit&#8217;;<\/p>\n<p>&nbsp;<\/p>\n<p>onBarcodeRead = (event) =&gt; {<\/p>\n<p>console.log(&#8220;*BarcodeDialog.onBarcodeRead()&#8221;);<\/p>\n<p>var strData = event.nativeEvent.codeStringValue;<\/p>\n<p>if(strData != null)<\/p>\n<p>{<\/p>\n<p>console.log(&#8221; -Data : &#8220;, strData +&#8221;,\uccab\uae00\uc790:&#8221;, strData.substring(0, 1));<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>&lt;Camera\u00a0\u00a0 style={styles.camera}<\/p>\n<p>cameraType={CameraType.Back}<\/p>\n<p>scanBarcode={true}<\/p>\n<p>showFrame={true}<\/p>\n<p>laserColor=&#8221;#ff0000&#8243;<\/p>\n<p>frameColor=&#8221;#ffffff&#8221;<\/p>\n<p>torchMode=&#8221;off&#8221;<\/p>\n<p>onReadCode={this.onBarcodeRead}&gt;<\/p>\n<p>&lt;\/Camera&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><b>III. \uacb0\ub860<\/b><\/p>\n<p>\uce74\uba54\ub77c\ub97c \ud1b5\ud574 \uc2a4\uce94\ub418\uba74 onReadCode \uc774\ubca4\ud2b8\ub97c\u00a0 \ud1b5\ud574 \ubc14\ucf54\ub4dc \uc815\ubcf4\uac00 \uc62c\ub77c\uc624\ub294\uac83\uc744 \ud655\uc778\ud558\uc600\ub2e4..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I. \ubaa9\ud45c \uc6f9\ubdf0 \uae30\ubc18\uc758 \ud558\uc774\ube0c\ub9ac\ub4dc \uc571\uc5d0\uc11c\ub294 \uce74\uba54\ub77c\ub97c \uc774\uc6a9\ud558\uc5ec \ubc14\ucf54\ub4dc\ub97c \uc2a4\uce94\ud560\uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uc5f0\uad6c\ud55c\ub2e4. II. \uc5f0\uad6c \ubc0f \uac1c\ubc1c\ub0b4\uc6a9 1. \ub77c\uc774\ube0c\ub7ec\ub9ac \uc124\uce58 npm install react-native-camera-kit &#8211;save &nbsp; IOS\uc758 \uacbd\uc6b0 \ucd94\uac00\uc801\uc73c\ub85c pod\ub97c \uc124\uce58\ud574\uc57c \ud55c\ub2e4. cd ios pod install &nbsp; 2. \uce74\uba54\ub77c \uad8c\ud55c \uac00. \uc548\ub4dc\ub85c\uc774\ub4dc .\/android\/app\/src\/AndroidManifest.xml\ud30c\uc77c\uc5d0 \uc544\ub798\uc640 \uac19\uc774 \uad8c\ud55c \ucd94\uac00 &lt;uses-permission android:name=&#8221;android.permission.CAMERA&#8221; \/&gt; \ub098. IOS .\/ios\/npc\/Info.plist \ud30c\uc77c\uc5d0 \uc544\ub798\ud0a4\ub97c \ucd94\uac00\ud55c\ub2e4. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[21],"tags":[259,298,299],"class_list":["post-2416","post","type-post","status-publish","format-standard","hentry","category-mobile","tag-react-native","tag-298","tag-299"],"_links":{"self":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/2416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2416"}],"version-history":[{"count":1,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/2416\/revisions"}],"predecessor-version":[{"id":2418,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=\/wp\/v2\/posts\/2416\/revisions\/2418"}],"wp:attachment":[{"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2416"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.moramcnt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}