8 ms·
I man don't get me wrong, I love the idea of PWAs but this dude is out to lunch. It's so painful making anything complex work cross browser/cross platform. On i
by thot_experiment 2y ago
I man don't get me wrong, I love the idea of PWAs but this dude is out to lunch. It's so painful making anything complex work cross browser/cross platform. On iOS iirc they don't even support adding PWAs to the homescreen? You definitely can't Bluetooth outside of Chrome (probably only on Android and Windows too because nothing fun is ever allowed on Macs).
Multiplayer games you kind of need UDP. You cannot UDP in the browser (WebRTC data channels technically use UDP but that stack is an abomination wrapped in SCTP and DTLS)
This is by no means an exhaustive list, just issues I've dealt with recently. It's better than it was with WebGPU and WASM, some of the gap between a native app and a website is surmountable, but unless you're doing something extremely boring surmounting the gap is hard fucking work.
- coip 2y agoI have several PWAs on my home screen on a iPhone that open in a window that doesn’t appear as a browser.
- tshaddox 2y ago> On iOS iirc they don't even support adding PWAs to the homescreen? You've been able to add websites to the home screen going back at least to the iPhone 5 in 2012. Is it the "PWA" part you're questioning? iOS definitely does have PWA support, although with a few notable limitations that may be deal-breakers for certain apps. Oh, and apparently Apple recently disabled PWAs entirely in the EU.
- xeromal 2y agoOne big missing piece is the inability for me to put an "Install" button like I can on android. I don't want to have to teach old people how to add to desktop
- below43 2y agoYes, even Windows (Edge) prompts to install the PWA on the desktop. The "Add to Home Screen" process works well, but is obscure.
- Anechoic 2y agoOh, and apparently Apple recently disabled PWAs entirely in the EU Apple reversed that decision back in March [0] (expand "Why don't users in the EU have access to Home Screen web apps?") [0] https://developer.apple.com/support/dma-and-apps-in-the-eu https://developer.apple.com/support/dma-and-apps-in-the-eu
- moffkalast 2y ago> The need to remove the capability was informed by the complex security and privacy concerns associated with web apps to support alternative browser engines that would require building a new integration architecture that does not currently exist in iOS and iPadOS. This rationalization makes zero sense, it's just opening a standalone browser window from a convenient icon shortcut. They could even ignore the manifest.json entirely like Android does half the time anyway cause the implementation is buggy as all hell. I think the real reason was some kind of retaliation worthy of a baby insanity wolf meme because they were forced to stop reskinning Safari for all other browsers on iOS which was absolutely ridiculous in the first place.
- brookst 2y agoShows why guessing and gut feel are bad basis for opinions. In fact, Apple’s problem was that the PWA serviceworker runs as root, a bad decision made years ago. Enabling Chrome-hosted PWAs means Google gets root on those peoples’ phones. We can still lambast Apple and go all ad hom, but let’s stay factual?
- moffkalast 2y agoOk running something like that as root by design is enough of a self own from Apple that I really don't need to say anything more, hahaha
- andrewflnr 2y agoFactual ad hom indeed.
- panic 2y agoIn fact, home-screen web apps on iPhone OS predate third-party apps on the platform. Originally all third-party software was going to be installed this way.
- madeofpalk 2y ago> Originally all third-party software was going to be installed this way. It's off topic, but I don't think this was true once the HTML Weather and Stocks 'widgets' failed on iOS. Anything Apple said publicly was just saving face until their SDK was ready for public consumption.
- reaperducer 2y agoIt was true. I developed iPhone OS web apps during that time.
- deleted 2y ago[deleted]
- voxic11 2y agoWebTransport is now supported in most common browsers (just missing safari support) and provides a nice API for sending/receiving messages via UDP. https://developer.mozilla.org/en-US/docs/Web/API/WebTransportDatagramDuplexStream https://developer.mozilla.org/en-US/docs/Web/API/WebTranspor...
- thot_experiment 2y agoThanks for pointing this out! I wasn't aware this had more or less landed. (though I think my broader point about cross platform support unfortunately still stands, I personally don't care about supporting iOS on my side projects and I'm excited to mess with this)
- chris_pie 2y agoSupport is getting there on the browsers' side, but you need a backend that supports HTTP3+WebTransport - barely any out there
- thot_experiment 2y agoYup, as I have found out over the last 5 hours. I managed to get a handshake but it's nowhere near the convenience of something like WebSockets. The security circus you have to go through to get even a handshake working is absolutely absurd, all sorts of extremely poorly documented certificate requirements and you'll be lucky to get an error message that helps you in any way. I'm getting ready to give up for the day, I will definitely make a top level HN post if I get a solution working and documented. Meanwhile https://github.com/achingbrain/webtransport-echo-server https://github.com/achingbrain/webtransport-echo-server this is the best we have for a minimal working node example.
- chris_pie 2y agoSurprisingly, socket.io supports WebTransport: https://socket.io/get-started/webtransport https://socket.io/get-started/webtransport The guys at Colyseus (a JS library for multiplayer games netcode) also added support, in a preview version for now.
- pjmlp 2y agoMost of the time a PWA isn't needed at all, a mobile Web friendly website suffices.
- brookst 2y agoFor offline use?
- pjmlp 2y agoDepends on the application, naturally. Most of them, even if native don't really work without the API based backend. If we take out the garbage apps, copycats, and games without DLCs, most stuff is some variation of form over data. And those that are really special, needing native APIs, working offline by default, can probably be reduced to about 10% of apps.
- rejhgadellaa 2y agoA website can work offline, too. Service workers are a feature that any website (installed or not) can use to (pre)cache assets, etc. On iOS, that data will get evicted if the user doesn't visit the site at least every 7 days, though. Other platforms keep the data for a lot longer, but will evict at some point, too.
- codazoda 2y agoYou can add PWAs to the Home Screen on iOS; Share, Add to Home Screen. This is how I build apps to scratch my own itches. Edit: Err, sorry to pile on. I see others have already mentioned this.
- hot_gril 2y agoiPhones support PWAs on homescreen. However, there's no way to trigger the "install the PWA?" prompt. The user has to do it, which very few know about, and maybe that's what you were thinking of.
- CharlesW 2y agoI haven't looked at this lately and so don't have a specific recommendation, but there are small libraries for helping iOS learn how to add PWAs using the standard Share → Add to Home Screen mechanism. https://github.com/khmyznikov/pwa-install https://github.com/khmyznikov/pwa-install (Try on device: https://khmyznikov.com/pwa-install/ https://khmyznikov.com/pwa-install/)
- hot_gril 2y agoI've seen guides like this before. Would be nice if they showed what the share button looks like, cause that's not obvious to some people. Or, some file sharing websites show an arrow pointing to the downloads button in desktop Safari.
- deleted 2y ago[deleted]
- leptons 2y agoApple is currently being sued by the DOJ for a variety of abusive business practices, including forcing all web browser apps on iOS to use the Safari browser engine, which limits the usefuleness of all web browsers on iOS, so that developers are forced to develop an app which Apple can then take a 30% cut of all revenue generated by the app. It's a pure money-grab by Apple, and they deserve this legal action against them.
- bdangubic 2y agobuy android
- acheron 2y agoIs the only alternative still Google? Yeah I’m good with Apple, thanks.
- wat10000 2y agoThat’s all the more reason good regulation is essential. If there were a dozen viable competitors then you could just step back and let the market decide.
- steelframe 2y agoPoint taken about preferring Apple over Google. I buy Pixel phones and immediately install GrapheneOS, which does a pretty good job of keeping Google at arms' length. So I guess the answer to your question is that there is another alternative.
- paxys 2y agoI can't say about gaming, but a huge chunk of popular apps out there are PWAs with a native wrapper. If built well people aren't even going to notice.
- lurking_swe 2y agooh i notice. But im a picky user. You’re probably right that _well designed_ apps are indistinguishable to most users.
- segfaltnh 2y agoI think the part where he calls out airline apps is spot on though. They don't need any of that tech.
- brookst 2y agoAs a frequent user of both web and phone airline apps, the phone apps are just nicer. UI idioms that are appropriate for the platform, etc.
- urbandw311er 2y agoOnly if they’re designed that way. Many aren’t.
- wruza 2y agoReady to use (or buy/download) controls in appdev usually pack some ui wisdom into themselves for free, borrowing most of it from the base system. Webdev is constant reinvention of a wheel in all sorts of wrong ways, with “components” on the same level of ui quality. Many apps are just electron apps or vb-like (x,y,w,h) forms slapped together by someone barely familiar with a platform IDE. But the rest is absolutely superior to the “web”.
- rejhgadellaa 2y agoPart of the problem is that the websites need to "share" budget with the teams that build 2 separate native apps (or maybe they use something like React Native, but that still costs money that could've been used for a better mobile website). Also, if a company has a mobile app, a bad mobile website is less of a problem. Take Takeaway.com. Their mobile site is terrible. But they have a pretty good mobile app, so why would they need to pour money into making the site any better? But yes, (mobile) web also just needs to do better.
- debarshri 2y agoPoint the author is trying to make is that there are certain usecases you really don't need to deliver it via app, it is cheaper and better to serve via web. For eg. The Itaki app mentioned in the article. Of course there are use cases that you mentioned are better served via native app. For eg. Apps that need compute or location. That's not the argument author is making. The downside of delivering everything via app is your device ends up with app sprawl that eats up the resources.
- Aaargh20318 2y ago> On iOS iirc they don't even support adding PWAs to the homescreen? They literally supported this since iPhone OS 1.0 (it wasn’t even called iOS yet). In fact, it was supposed to be the only way to add apps to the iPhone until people complained and started jailbreaking to install their own apps. Apple didn’t release the App Store and the iOS SDK until iPhone OS 2.0
- larusso 2y agoI don’t think parent means the same or maybe he does. On chrome and edge on macOS one can choose to install the PWA as a native app. It gets an app icon and everything. It’s similar to a web bookmark on the HomeScreen. But it’s a sandboxed app. Don’t know if this is the exact same behavior though. PWAs are also a bit different to normal websites. They have a manifest and what not to describe the app in a standardized way.
- deleted 2y ago[deleted]
- codetrotter 2y agoPWAs on iOS get their own local storage, for example. And deleting the PWA from your Home Screen will delete its data, just like deleting an app would delete the data of the app. I got a basic offline-capable TODO list (the hello world of web apps) working as a PWA for my iPhone. Almost all of it handed to me by ChatGPT. https://ctsrc.github.io/todo/ https://ctsrc.github.io/todo/ If I exit the PWA, turn off WiFi and open the PWA again, the PWA still works. The only annoying thing is that the way you add a PWA to your Home Screen on iOS is too convoluted to realistically get most people to do it, if you were to make a PWA that you actually wanted people to “install”. Although the JS solution that someone else posted ITT with a small pop-over that explains the steps is pretty near to ok. Certainly helps the situation a bit at least.
- nox101 2y agoDo you need UDP? I see lots of multiplayer browser games. Here's a few https://browsergames.gg/ https://browsergames.gg/ Google shows me a bunch of RPGs https://www.google.com/search?q=browser+based+rpg https://www.google.com/search?q=browser+based+rpg FPSes here https://poki.com/en/shooting https://poki.com/en/shooting or maybe better a video showing some https://www.youtube.com/watch?v=9ad5jcXPbNw https://www.youtube.com/watch?v=9ad5jcXPbNw I know none of them are Edlin Ring, Skyrim, or Call of Duty. One issue with Web games is users's expect them to start quickly so no downloading 80gig of assets like 102gig for CoD Black Ops 6
- joshribakoff 2y agoYes and no. UDP objectively performs better because it prioritizes sending relevant (in the context of real time application) data rather than retrying no longer relevant data (and all the overhead that entails).
- thot_experiment 2y agoNo you don't need UDP to make a game, but for the sorts of games that I enjoy playing you need UDP.
- p2detar 2y agohttps://nightpoint.io https://nightpoint.io has been around for a long time, it's a fast-paced 2D shooter, uses web sockets and it does quite good actually. I think the same dev created https://battledudes.io https://battledudes.io later on, again based on web sockets. It has/had (haven't played recently) a pretty big player community.
- Intermernet 2y agoI know it was a typo, but I want to play edlin ring. The most frustrating text mode adventure ever.
- felbane 2y agoAnd its sequel, Vimborne.
- theK 2y agoAgreed. But I would like to add that there are also numerous UX pitfalls that apps fall into that are trivially solvable on the web. Broadly: - deeplinking (while technically doable it is still a pita to set up cross platform and require just way too much engineering in the long run) - branching out UX (it is interesting how many seemingly straightforward processes turn out to be better if you can branch out into something like a tab)
- paulddraper 2y agoAuthor needs to show not tell. Theory falls down hard.
- BeardScript 2y agoIn my defense, I always skip lunch.