簡體   English   中英

如何將 web 站點放入移動原生應用程序?

[英]How can I put a web site into a mobile native application?

First, I have a web app made with angular + angular material that looks like a mobile app, now I "ported" this webapp to a native mobile app using capacitor + cordova plugins and works fine, all the features work fine.

我的部署過程是:

Build angular app, sync to android, build android and then publish in play store (same for ios), it works, but, every time I make a change to my web app, I have to repeat this process and you know, the user必須下載新版本的應用程序,安裝和使用,我想避免這種情況。

Since my app is web, located on a site (It can be accesses via web too) I would like to know if there is something that inside my webview opens the url of my site (without exiting the app, I tried making a redirection but它會打開一個 web 瀏覽器),因此,最終用戶不必在每次我進行更改時下載新版本的應用程序,也不必上傳構建來播放商店和應用商店。

我知道可以這樣做,因為我的銀行應用程序會執行類似的操作,但我不知道該怎么做或如何搜索它

我怎樣才能做到這一點?

謝謝和對不起我的英語,我希望我已經解釋了我想做什么

Ionic是適合您的用例的框架。 您可以在 angular 中構建應用程序,離子將其包裝在原生 android 應用程序的 webview 中。 如果您需要訪問本機 android 功能,您也可以與 ionic 一起安裝電容器庫。 Capacitor是一個庫,可通過 javascript 與移動設備的 api(IOS 和 Android)進行交互。

使用 JS 構建本機 android 應用程序的另一種方法是響應式的。 它與離子不同。 您必須熟悉反應語法才能輕松啟動。 React native 不是 webview 應用程序,而是編譯為本機平台代碼。

也查看 flutter。 它使用 dart,但使用 flutter 制作的應用程序執行速度更快,它可以為 android 和 ZBA3F2ADEA47B86B0D408DE3F7E4D2 構建代碼相同的代碼

結論

如果你想留在angular代碼,go用IONIC

“實時更新”是解決此問題的一種方法。 實時更新允許您將補丁發送到您的應用程序,並在一定程度上實際更改應用程序代碼,而無需通過應用程序商店審核。 go 仍需通過應用商店審核進行大更新,但您可以使用實時更新服務“實時”進行大量小更新。

您可以使用 Ionic 進行實時更新。 Ionic 是開源的,但實時更新是 Ionic 團隊的Appflow package 的一部分,這是一項付費服務。 目前 25,000 次更新的起價為 499 美元/月。

在同一空間中,有Capgo ,它更便宜,並且通常與 Capacitor 一起使用(不需要 Ionic)。

更多信息:電容器社區 github repo 中關於此主題的長時間討論

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM