File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,10 @@ const RNListener = () => {
11
11
/** react native 환경에서만 가능 */
12
12
const listener = ( event ) => {
13
13
const { data, type } = JSON . parse ( event . data ) ;
14
- console . log ( data ) ;
14
+ if ( type === "RN_TO_YAM_VIEW" ) {
15
+ console . log ( "RN_TO_YAM_VIEW" , data ) ;
16
+ }
17
+
15
18
if ( type === "TOKEN" ) {
16
19
// type이 TOKEN이기 때문에 이곳에 콘솔이 찍히게 됩니다.
17
20
console . log ( data ) ; // xxxxx
@@ -27,7 +30,7 @@ const RNListener = () => {
27
30
window . addEventListener ( "message" , listener ) ;
28
31
} else {
29
32
// 모바일이 아니라면 모바일 아님을 alert로 띄웁니다.
30
- alert ( { message : "모바일이 아님" } ) ;
33
+ console . log ( "모바일이 아님" ) ;
31
34
}
32
35
} ;
33
36
Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ const requestPermission = () => {
17
17
if ( window . ReactNativeWebView ) {
18
18
// 모바일이라면 모바일의 카메라 권한을 물어보는 액션을 전달합니다.
19
19
window . ReactNativeWebView . postMessage (
20
- JSON . stringify ( { type : "REQ_CAMERA_PERMISSION " } )
20
+ JSON . stringify ( { type : "REQ_CAMERA_PERMISSION_HI_HELLO " } )
21
21
) ;
22
22
} else {
23
23
// 모바일이 아니라면 모바일 아님을 alert로 띄웁니다.
24
- alert ( { message : "" } ) ;
24
+ console . log ( "모바일이 아님" ) ;
25
25
}
26
26
} ;
27
27
You can’t perform that action at this time.
0 commit comments