티스토리 뷰
Fabric 모드를 사용하고 iOS 실기기에서만 Metro에 연결되지 않는 문제가 발생했다.
여러가지 시도를 해봤지만, 해결된 방법은 RCTWebSocketExecutor.mm
파일의 localhost 부분을 본인의 ip로 변경하는 방법이었다.
- (void)setUp
{
if (!_url) {
NSInteger port = [[[_bridge bundleURL] port] integerValue] ?: RCT_METRO_PORT;
NSString *host = [[_bridge bundleURL] host] ?: @"본인의 IP";
NSString *URLString =
[NSString stringWithFormat:@"http://%@:%lld/debugger-proxy?role=client", host, (long long)port];
_url = [RCTConvert NSURL:URLString];
}
...
참고 문서: https://reactnative.dev/docs/other-debugging-methods#debugging-on-a-physical-device
'개발일지 > React-Native' 카테고리의 다른 글
[React-Native] Spotify Search API Android에서 노래 제목이 영어로 나오는 문제 (0) | 2024.11.28 |
---|---|
[React-Native] 지도에서 마지막 위치를 시작 위치로 사용하기 (2) | 2024.11.15 |
[React-Native] React-Navigation과 React-native-safe-area-context의 중복 여백 문제 (1) | 2024.10.17 |
React Navigation - native-stack 뒤로가기 방지 오류 (0) | 2024.09.11 |
react-native-nmap 기능 추가하기 (0) | 2022.04.26 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- next-mdx-remote
- Next.js
- 실전프로젝트
- 항해99
- 백준
- typeScript
- react-native
- site-map
- createAsyncThunk
- 블로그
- 성격유형검사하기
- Infcon2022
- redux-toolkit
- JavaScript
- 스파르타코딩클럽
- 티스토리챌린지
- 알고리즘
- REACT
- 인프콘
- 프로그래머스
- react-native-naver-map
- js
- Python
- MDX
- seobe-dev
- seobe.dev
- spotifyapi
- ios
- 오블완
- next-sitemap
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함