Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison to PWABuilder #1

Open
maiconcarraro opened this issue Oct 12, 2024 · 0 comments
Open

Comparison to PWABuilder #1

maiconcarraro opened this issue Oct 12, 2024 · 0 comments

Comments

@maiconcarraro
Copy link

maiconcarraro commented Oct 12, 2024

First of all, awesome project and thanks for the explanations in the README, 100% agree on PWA downsides here: https://github.com/RobSchilderr/nextjs-native-trpc?tab=readme-ov-file#why-not-make-a-pwa-instead

I'll start this issue only for discussion and maybe to help other devs if they have the same question, for reference PWABuilder is a tool from Microsoft to generate the native apps based on your PWA application.

  • For Android it's going to use bubblewrap which launches a TWA, and you can still have access to the android source code, and customize push notifications (example)
  • For iOS it's experimental, but it's basically a native swift wrapper that is going to load the website w/ WKWebView and allow some features like push notification using window listeners events + js evaluation (example1 and example2) and the Apple Login + Next-auth seems to work fine under this approach (saw a warning about this in the readme w/ universal links redirect).

The strong benefit of this approach is to write a single web project, since it's going to work as TWA for android and webview for iOS, push notifications that are usually the blocker against PWA (mainly related to iOS) is solved and it will be available in Google and Apple stores,

The CONS I'm facing is mainly related to the TWA that will use a specific browser depending on the device, so if you have a samsung device it's very likely going to use Samsung internet and their TWA support is not the best, so I'm looking for new solutions that can make it stable, or at least consistent across all Androids.

Now about this project Next.js + Capacitor, it's looking closer to create-t3-turbo (Next.js + Expo) where you write "twice" the web and ~native layout, when I was checking this tutorial https://galaxies.dev/nextjs-and-capacitor (also mentioned in the README) I thought the idea would be to have the same Next.js folder exporting to capacitor and also deploying it for the web usage, only different build commands but still same codebase... is it not possible? I probably misunderstood, but I want to discuss to get some ideas/approaches.

I don't have experience using Capacitor, so I'm assuming that APIs like Share will work fine for both build flows, since it provides Shared Web API for web environment. Lmk if I misunderstood, I'm going to explore the project and plugins, but started this discussion in case you can share some thoughts around these ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant