IT
[react native] {"_U": 0, "_V": 0, "_W": null, "_X": null}
[react native] {"_U": 0, "_V": 0, "_W": null, "_X": null}
2021.01.27디바이스의 wifi mac 정보를 가져오려고 react-native-device-info 를 사용했다. github.com/react-native-device-info/react-native-device-info#react-native-dom react-native-device-info/react-native-device-info Device Information for React Native iOS and Android - react-native-device-info/react-native-device-info github.com 이렇게 사용하세요 ~ 라고 친절하게 사용법도 설명해줬건만 console.log(DeviceInfo.getMacAddress()); 으로 찍어보니까 {"_U": 0, "_V":..
[ios] apple 개발자 계정으로 dropbox 로 ad-hoc(OTA) 배포하기 (2)
[ios] apple 개발자 계정으로 dropbox 로 ad-hoc(OTA) 배포하기 (2)
2021.01.271. 프로젝트 최종본으로 빌드(Archive) 하기 빌드 되면 마지막에 비번 치라고 나오는데 mac 비밀번호 치면 된다. Distribute App 클릭 Ad Hoc 선택 1. App Store -> 앱스토어 / TestFlight 배포용 2. Ad Hoc -> 내부 테스터용 (UUID 로 Device 등록한 대상) 3. Enterprise -> 내부 배포용 (이건 UUID Device 등록 안해도 됨 편함) 4. Development -> 팀에 등록된 개발자들 OTA installation 가능하게 선택 앱 Name 입력 후 App URL, Display Image URL, Full Size Image URL 이 세 개는 아무거나 입력한다. 나중에 수정할거니까 Certificate 가 배포용인지 확인 ..
[ios] apple 개발자 계정으로 dropbox 로 ad-hoc(OTA) 배포하기 (1)
[ios] apple 개발자 계정으로 dropbox 로 ad-hoc(OTA) 배포하기 (1)
2021.01.261. 애플 개발자계정 ($99) 준비완료! 2. Dropbox 계정 만들기 Dropbox 에 ios 설치 파일(IPA) 을 업로드 한 후 URL 을 통해 배포할 예정이니 가입해두록 한다. 기본 2GB 무료! 3. 테스트할 기기의 UUID 등록해놓기 엔터프라이즈 계정($299) 이면 뭐.. 패스해도 된다. 하지만 가난한 개발자계정이니 UUID 를 알아내서 등록하자 2021/01/26 - [IT/react native] - [ios] iPhone UUID windows / mac 에서 간단 확인 방법! [ios] iPhone UUID windows / mac 에서 간단 확인 방법! 1. windows 1-1. USB 와 iPhone을 연결한다 1-2. 제어판 -> 장치관리자에 들어간다. 1-3. 휴대용장치 ..
[ios] iPhone UDID windows / mac 에서 간단 확인 방법!
[ios] iPhone UDID windows / mac 에서 간단 확인 방법!
2021.01.261. windows 1-1. USB 와 iPhone을 연결한다 1-2. 제어판 -> 장치관리자에 들어간다. 1-3. 휴대용장치 -> Apple iPhone 우클릭 -> 속성 1-4. 자세히 -> 속성 -> 장치 인스턴스 경로 -> 값에 빨간색 밑줄친 곳이 UDID 2. mac 1-1. USB 와 iPhone을 연결한다 1-2. Finder 에서 iPhone 메뉴 클릭 후 빨간색 체크 부분 클릭 1-3. 내용이 바뀌는데 UDID 가 뜬다. 이거임!
[react native] textinput 입력 시 글자 유실 textinput lose focus react native
[react native] textinput 입력 시 글자 유실 textinput lose focus react native
2021.01.14export default () => { const [content, setContent] = React.useState(''); const InsertData = () => { return ( setContent(text)} ) } return ( ) } 이렇게 InsertData 라는 component 를 만들고 그 안에서 TextInput 에 텍스트를 입력할 때 마다 계속 쳐지는게 아니라 한글자 치면 focus 가 사라지고;; 또 클릭해서 한글자 치고... 계속 저 InsertData() 가 rendering 되는 것이였다 (한글자 칠때마다) 해결방법은 InsertData 를 따로 컴포넌트로 만들어서 import 해서 사용하자 InsertData.js export default () => { con..
[react native] Invariant Violation: View config getter callback for component `firstView` must be a function (received `undefined`). Make sure to start component names with a capital letter.
[react native] Invariant Violation: View config getter callback for component `firstView` must be a function (received `undefined`). Make sure to start component names with a capital letter.
2021.01.08Invariant Violation: View config getter callback for component `firstView` must be a function (received `undefined`). Make sure to start component names with a capital letter. export default () => { const firstView = () => { return ( hello ); }; return ( FirstView 로 변경 Make sure to start component names with a capital letter. 구성 요소 이름은 대문자로 시작해야합니다.
[react native] react-native-calendars 캘린더에 마킹하기
[react native] react-native-calendars 캘린더에 마킹하기
2021.01.07import { Calendar } from 'react-native-calendars'; export default () => { const [markedDates, setMarkedDates] = React.useState(null); const [dates, setDates] = React.useState(['2021-01-05', '2021-01-20']); function addDates() { let obj = dates.reduce( (c, v) => Object.assign(c, { [v]: { marked: true, dotColor: 'red' }, }), {}, ); console.log(obj); setMarkedDates(obj); } return ( { addDates(); }}..
[react native] Warning: Cannot update a component from inside the function body of a different component.
[react native] Warning: Cannot update a component from inside the function body of a different component.
2021.01.07Warning: Cannot update a component from inside the function body of a different component. App.js const [visible, setVisible] = useState(false); Component.js export default (props) => { return ( /> ) } 부모에서 Modal 을 View 한 후에 (Component.js) Button 을 클릭하면 props 으로 넘어온 부모의 state 를 setvisible(false) 로 modal 을 닫으려 했다 Warning: Cannot update a component from inside the function body of a different comp..
[react native] TypeError: this.setState is not a function.
[react native] TypeError: this.setState is not a function.
2020.12.31TypeError: this.setState is not a function. export default class App extends Component { this.state = { data : '' } ... getItem = () => { return new Promise(function (resolve, reject) { axios .get('https://example.com') .then(function (response){ resolve(response) }) .catch(function (error){ reject(error) }); }; }; loadItem = () => { this.getItem() .then(function (items){ this.setState({ { const..
[node.js] nodejs 자동 재기동하게 만들기
[node.js] nodejs 자동 재기동하게 만들기
2020.12.29예기치 못하게 nodejs가 죽는 일이 발생할 일이 생겼다 (재부팅 등) 그 때 자동으로 재기동 하게 만들어보자 npm 은 당연히 깔려있을테고 npm install -g forever 으로 forever 을 설치하자 그리고 app.js 가 있는 디렉토리로 이동해서 forever start --minUptime 3000 --spinSleepTime 3000 -l app.log -a app.js 이라고 입력하자 자세하게 들여다보면 그냥 forever start app.js 이라고 해도 등록은 되는데 이런 워닝들이 뜬다. 설정을 좀 해달라고 권고하는데 해주자 --minUptime, --spinSleepTime 죽었을 때 다시 올라오는 시간을 설정해달라는 것 같다. 또 -l app.log 는 백그라운드에 app..
[nginx] 재부팅 시 자동으로 시작하게끔 서비스 등록하기 nssm 무중단
[nginx] 재부팅 시 자동으로 시작하게끔 서비스 등록하기 nssm 무중단
2020.12.28서버가 재부팅 될 경우 수동으로 다시 nginx 을 가동시켜야 하는 불편함이 생겼다 이럴 경우 nssm 이라는 서비스 매니저를 사용하면 해결된다 다운로드 링크 ↓ nssm 2.24 설치 하고 nssm-2.24 폴더 안에 win64 폴더로 이동한다 그럼 nssm.exe 가 있는데 cmd 로 해당 경로까지 이동 후 nssm install [서비스명] 그러면 아래와 같은 gui 창이 뜨는데 path 에는 exe 선택하면 directory 에는 자동으로 경로가 지정된다 그리고 아래 install service 누르면 끝 그 다음 services.msc 에서 서비스 실행 시키면 진짜 끝
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default a..
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default a..
2020.12.23Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. 컴포넌트 최근에 추가한 것들 다시한번 살펴보자 나같은 경우 import { AppLoading } from 'expo-app-loading' 으로 썼다 expo-app-loading 에는 default export 로 되어있는데..