有没有办法在Google Play上提交reactjs PWA? [英] Is there a way to submit a reactjs PWA on Google Play?

查看:99
本文介绍了有没有办法在Google Play上提交reactjs PWA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用写一次,到处运行"

I want to use the "Write once, run everywhere"

所以我用create-react-app在reactjs中创建了一个PWA.

So I created a PWA in reactjs with create-react-app.

我的应用程序运行良好,可以从网站上将其放在手机的主屏幕上. 但是,我也希望在移动商店中也能看到(从Google Play开始).

My app works greatly, and I can put it on the home screen of my mobile from the website. However, I want to be visible on mobile stores too (starting with Google Play).

我尝试过:

  • Microsoft pwaBuilder 似乎不起作用(下载的捆绑软件无法被Google Play识别)
  • 在Cordova中打包我的应用程序(通过复制在www中构建的reactjs文件),但是我像其他人一样被困在白色屏幕上( Reactjs with cordova )
  • Microsoft pwaBuilder which doesn't seems to work (the downloaded bundle is not recognized by Google play)
  • Packaging my app in Cordova (by copying files of the reactjs build in www) but I'm stuck with a white screen like some other people (publishing PWA on app stores : google play and ios itunes, Reactjs with cordova)

今天有没有办法在商店上部署reactjs PWA应用程序? 那将实现我关于渐进式Web应用程序的伟大梦想:)

Is there a way today to deploy a reactjs PWA app on a store? That would realize my great dream about progressive web apps :)

推荐答案

问题与未填充的create-react-app PUBLIC_URL环境变量有关.

The problem was about the create-react-app PUBLIC_URL environment variable which was unfilled.

使用cordova run browser似乎一切正常,因为浏览器在路径分辨率上似乎更为宽松. 我有一个/favicon.ico

With a cordova run browser, all seems to be ok as browser seems to be more permissive in the path resolution. I had as example a /favicon.ico

但是当我在做cordova run android时,在运行时找不到路径.

But when i was doing cordova run android, path were not found at runtime.

通过创建一个新文件.env并将其放入:

By creating a new file .env and put in it:

PUBLIC_URL=.

解决了路径错误,该应用程序现在可以正常运行了!

resolved the path error and the application works now well!

Sergio在镀铬chrome://inspect设备上运行的建议对我有很大帮助

The advice of Sergio running on device with chrome chrome://inspect helped me a lot

这篇关于有没有办法在Google Play上提交reactjs PWA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆