본문 바로가기

개발16

firebase의 dynamic link를 react-natvie에서 수신 push 관련 firebase 는 적용되어 있는 상황 https://rnfirebase.io/dynamic-links/usage 참고 google firebase의 dynamic link는 https://~~~.page.link/로 하겠다. 1. react native % npm @react-native-firebase/app % npm @react-native-firebase/dynamic-links App.js import dynamicLinks from '@react-native-firebase/dynamic-links'; ... useEffect(() => { // background dynamicLinks() .getInitialLink() .then(link => { if(link != nul.. 2022. 9. 29.
git private repository 생성하고 공유하기 1. github에서 "Create a new repository" "Private"로 생성 "Add a README file"을 체크하여 "main" branch까지 생성하는게 편하다 2. 생성한 repository의 settings에서 "Collaborators" 메뉴 진입 "Add people"에 메일 계정 입력하여 추가 3. 해당 메일에서 git invitation accept 4. git 연결 4.1. git clone https://github.com/{repository}.git 수행시 "Repository not found" 에러 발생 4.2. git clone https://공유받는계정이름@github.com/{repository}.git 수행하고 패스워드 입력시 " Support for.. 2022. 9. 2.
react-native WebView내 window.close(); 웹에서의 window.close() 사용을 잡아채 postMessage로 앱에 전달한다. const INJECTEDJAVASCRIPT = 'const { close: _close } = window; window.close = function() { window.ReactNativeWebView.postMessage("closeWebview"); _close();};'; ... const handleMessage = async (e) => { const strEvent = e.nativeEvent.data; //console.log('@#@#', strEvent); switch(strEvent) { case 'closeWebview': handleClose();// 웹뷰 close 할 함수 만들어서 호출.. 2022. 8. 22.
diff_match_patch를 이용한 파일 sync string의 변경된 부분을 비교 해주는 google의 diff-match-patch library 사용(언어별로 제공) https://github.com/google/diff-match-patch 시작은 eclipse의 svn team synchronize처럼 파일 비교를 하기 위해 diff_prettyHtml을 수정하였으나 스크롤 문제가 어려워서 Visual Studio Code의 파일 비교 처럼 수정된 영역을 꽂아넣어 text 높이를 맞추어 스크롤을 동일하게 수정하였다. 완벽하지는 않지만.. HTML 삽입 미리보기할 수 없는 소스 2022. 8. 22.