Nativescript + iOS webview + local files

痴心易碎 提交于 2019-12-05 14:11:50

It's a known bug for local pages, it's not able to determine what ~ means in terms of filesystem you need to change the src in your code and figure out what ~refers to.

using :

import * as fs from "tns-core-modules/file-system";
public webViewSRC: string = encodeURI(`${fs.knownFolders.currentApp().path}/www/index.html`); 

See this issue :

https://github.com/NativeScript/NativeScript/issues/4443

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!