Hacker News new | ask | show | jobs
by osrec 3004 days ago
Why not just PWAs? I think the browser has come a long way, and a great number of things can now be accomplished in the browser without any additional frameworks. We built Bx (https://usebx.com) without any frameworks and it feels much like a native app on a phone or tablet when added to the home screen.
6 comments

We built a PWA with vanilla javascript that does a lot of augmented reality work with the camera. The main issue is the lack of iOS support. Apple recently updated iOS to include support for the service worker (literally like this week) but it still lacks a huge number of features that chrome on Android has and basically every desktop browser has.

You do get access to a lot of the core sensors on the device but the inconsistencies on iOS just really make life a lot harder. Hopefully this will change over the next year but I'm not sure how quickly it will happen. So basically yes, you should build PWAs but until apple gets completely on board you can't really leverage them to their full extent like you can with chrome on android.

ios supports PWAs (service workers) now doesn't it?
Yeah they added it in the most recent version of iOS (11.3) but progressive web apps have a very loose definition the most basic of which is, as you correctly stated, using a service worker. However service workers are just the ground floor of a much bigger building of features that should be able to be leveraged cross browsers.
Yes, just released in 11.3
As soon as you like to access any sensors on the device, the PWA sadly isnt an option anymore.
It depends on the sensors you need access to. An iOS PWA has access to Geolocation, Magnetometer, Accelerometer, Gyroscope, Camera, Audio, Apple Pay, etc.
Assuming the audio happens after user interaction within what iOS consiters "one event" and/or the camera is used within a safari tab and NOT "added to home screen" (once you do that getUserMedia does not work any more).

Until iOS gets their shit together and makes it so that adding a glorified bookmark doesn't remove features, it's not a real viable option.

Also bluetooth on Chrome.
That may be, but I tend to see soo many apps now days that just need basic rendering. I almost wish there was a revolution to go back to when the IOS app store just installed links to URLs. It's so terrible inside phonegap apps such that apps simply can't save my f-ing password! Instead of building out more mobile features to complete the progress made by HTML5 we keep going back to native apps for no reason. Yes I get that there is a certain class of apps that MUST be native, but I would argue the bulk of apps don't need this.
You're not wrong, but I see this becoming a smaller issue as time progresses. Browsers are adding features all the time and I can see this one being resolved soon as lots of devs are asking for it!
Yes, but half the apps just need to maintain state without logging in.
I think there's a lot of instances you need more than is currently exposed for PWAs, especially on iOS. Push notifications is a big one. And the home screen installation on iOS (even with 11.3) leaves a lot to be desired compared to Android.

P.S. Bx looks pretty awesome :)

>And the home screen installation on iOS (even with 11.3) leaves a lot to be desired compared to Android.

Can you elaborate on this? I recently added a web site to the home screen of an iPhone 6 and a Galaxy S7 and they look the same to me. Is there additional functionality in the Android home page icon of which I'm unaware? (Not an Android expert by any stretch of the imagination.)

You're right, but I see it coming soon. Service workers have just appeared in Safari, so I can expect push notifs to be there soon as well.

Also, thanks! You should check Bx in a month when we roll out the next major release which (we think) makes it even better :)

PWAs are awesome, but we don’t see it as either or. If your app needs access to proprietary native SDKs then you need a native app. Capacitor gives you optionality to do both with the same code.
I think that's a fair point. I had a more detailed look at your proposed deliverables, and it all looks pretty cool. Wish you all the best with the launch :)
Instead of this madness device manufacturers could work together with HTML5 cons... to make a set of APIs that access native things, and for not-so-standardized features they could use prefixes kinda like we did in CSS. The websites accessing these HTML5 APIs would simply check for their existence first, then start using them. Usage of the APIs would then kick of device specific permission prompts, etc... Think about the integrations too, we would no longer have to set up application forwarding URLs like twitter:// to route to our app, everything would work from any device!

Even if manufacturers don't work together, if they at least provided JS API access built into their native browsers - then we can build shims on top of them.

I don't think we need manufacturers to cooperate as much as we need the major browser developers to cooperate! Prefixes are not great either - it sets you up for incompatibilities later on. The point is we want collaboration across Google/Apple etc to create one truly cross-platform platform with a standardised API. For all its shortcomings, the browser IS slowly moving towards that goal.
I fully support PWAs, but it's not just a matter of doing what's practical, it's also a matter of user expectations. It's become standard business strategy that you need an app store presence whether or not it's an effective way to deliver functionality. Plenty of users (iPhone users in particular) just expect it.
Android webviews is a total turtle (even with hacks and crosswalk).