기본 콘텐츠로 건너뛰기

짧은 Crosswalk 사용기

HTML5 + js 를 UI로 사용하는 앱을 만들때 제일 당혹스러운 점은 크로스플랫폼으로 사용하기 위해 같은 기준인 UI 렌더러를 쓰는 목적이었는데도 불구하고 파편화가 매우 심각하다는 점이다.
해상도 같은 건 논외로 치고 공통으로 사용하는 WebView 시스템 컴포넌트가 똑같은 "Modern Browser"가 아니라는 점이다.
심지어 같은 OS라고 해도 버전별로 다르다는 건 문제가 크다.
그래서 canvas만 가지고 떼어내서 만들까 어쩔까하고 고민하면서 검색 중 https://crosswalk-project.org/ 프로젝트를 발견.
webRTC(https://github.com/alongubkin/phonertc)나 webAudio(https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/PlayingandSynthesizingSounds/PlayingandSynthesizingSounds.html)같은 것들도 있지만 가장 큰 관심사는 iOS에서 safari가 아니라 chrome 일지가 첫번째.

첫번째 시도.

cordova platform add ios
cordova run ios

Safari에서 확인. 기존 mobile safari임.

cordova add cordova plugin add cordova-plugin-crosswalk-webview

소스 확인.
역시 WKWebView는 없음. 없다고 했는데 확인사살.

이렇게 소스코드를 아예 받아서 해볼 수 밖에 없다.
git clone https://github.com/crosswalk-project/crosswalk-ios.git
cd crosswalk-ios/
git submodule update --init --recursive

third-party/GCDWebServer 라는 게 눈에 띤다.

sample app을 XCode 에서 실행해보니
target을 변경해야함

일단은 잘된다.
iOS Simulator를 띄운채로 Safari browser를 보니 여전히 Safari에서 잡힘.
내용을 찾아보니 기존 UIWebView 대신 iOS 8부터(???) WKWebView를 지원한다고 한다.
아아 내가 원한 건 이게 아니야.

WKWebView에 대한 자세한 내용.

기존 cordova에서도 wkWebView를 얹을 수 있다곤 한다.
아예 platform에서부터 갈아치우는구나;;

여기를 보면 appCache도 지원 안하고 file/camera도 지원 안한다.
wkWebView도 결국 safari라서 기존 UIWebView보단 소폭 성능개선은 있겠지만 결국 문제는 해결되지 않았다.
후우 짧은 꿈을 꾸었구나.

댓글

이 블로그의 인기 게시물

세상 간단한 https(+secured websocket): Caddy

nginx, apache2 같은 걸로 매번 certbot 연동을 통해 https 하는게 지겨워서 알아보니 Caddy라는게 있더라. 설치법은 강하게 크기 위해 알아서 해본다. # cat /etc/caddy/Caddyfile your.shitty.site:8123 {   proxy / localhost:9123 {     websocket     transparent   } } 이건 외부에서 8123으로 들어오는 걸 내부적으로 9123로 맞춰서 https 맞춰주는 reverse proxy. 만일 port를 생략하면 # cat /etc/caddy/Caddyfile your.shitty.site {   proxy / localhost:9123 {     websocket     transparent   } } 기본포트인 443으로 되어 https://your.shitty.site 로 접속이 된다. 요새 말썽이던 cloudflare 버리고 netlify domain이랑 caddy를 쓰니까 앓던 이가 빠진 느낌. 이 조합은 당분간 계속 써야겠다 싶다.

저지연 오디오 생성 LLVC 사용기

https://github.com/KoeAI/LLVC 써봄 CUDA 11.8 버전 쓰고 있어 pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 VC 없어서 설치 https://wikidocs.net/168848 참조 FAIRSEQ 관련 오류 https://github.com/facebookresearch/fairseq/issues/2908 pip install editdistance  설치 No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8' 오류 멀쩡하게 있는데 안됨. pip install torch==2.1.0+cu118 torchvision==0.16.0+cu118 torchaudio==2.1.0+cu118 --extra-index-url https://download.pytorch.org/whl/cu118 다시 설치 set DISTUTILS_USE_SDK=1 이게 문젠가 설정하고 재도전 Using cached ruamel.yaml.clib-0.2.8-cp311-cp311-win_amd64.whl (118 kB) Building wheels for collected packages: fairseq   Building wheel for fairseq (pyproject.toml) ... error   error: subprocess-exited-with-error   × Building wheel for fairseq (pyproject.toml) did not run successfully.   │ exit code: 1   ╰─> [1829 lines of output]       No CUDA runtime is found, usi...