News for hackers. Stuff that matters.
Re:Apple starts rejecting apps with “hot code push” features by algesten on Wednesday March 08, 2017 @04:05AM (#13819015)
Judging by how sluggish and annoying the HSBC app is, I think it is a web app framed in a thin launcher from the app store.

I.e. it downloads a bunch of javascript/html/css and that executes within a UIWebView/WKWebView. Using caching and localStorage, you can construct such an app to not need to download everything on each launch.

The reason that's allowed is because everything executes within a sandboxed browser environment. No native code is downloaded.

Re:Apple starts rejecting apps with “hot code push” features by mikeash on Wednesday March 08, 2017 @10:09AM (#13820711)
> The reason that's allowed is because everything executes within a sandboxed browser environment. No native code is downloaded.

That's the same thing Rollout does. In fact, iOS apps can't download and run native code. The OS won't let you mark pages as executable unless they're appropriately signed, and only Apple has those keys.

Re:Apple starts rejecting apps with “hot code push” features by orbitur on Wednesday March 08, 2017 @11:06AM (#13821141)
If they're using JSC, then they can definitely download JS and execute native methods. They could subclass any UIKit object and make it conform to JSExport. Done, now they're "running native code."
Re:Apple starts rejecting apps with “hot code push” features by mikeash on Wednesday March 08, 2017 @11:09AM (#13821161)
Sure, and an app displaying a web page using WebView can provide hooks that allow doing that sort of thing too. Neither one is downloading native code.
Re:Apple starts rejecting apps with “hot code push” features by orbitur on Wednesday March 08, 2017 @11:12AM (#13821193)
Only UIWebView, which is going away soon.

But surely you can see the difference between executing limited actions inside a web view, and making available any native method to a web view.

Re:Apple starts rejecting apps with “hot code push” features by mikeash on Wednesday March 08, 2017 @11:18AM (#13821243)
WKWebView allows the app to execute arbitrary JS within the loaded page, and intercept URL loads and other actions made by JS code. That's all you need to build a bridge.

I don't see any fundamental difference here. Both (UI|WK)WebView and JSC allow bridging. Neither one grants full access to JS code automatically, the programmer has to put some effort into it. And even if there is some important difference, neither one is native code which is what I was disputing above.

Re:Apple starts rejecting apps with “hot code push” features by robk on Wednesday March 08, 2017 @05:51AM (#13819417)
Is it possible to do that and use the fingerprint sensor for login in a secure way? I thought the same as you until they enabled Touch login.
Re:Apple starts rejecting apps with “hot code push” features by Klathmon on Wednesday March 08, 2017 @07:40AM (#13819813)
There's no reason why they can't have the native portion do the authentication and just have it return a signed token to the JS portion which forwards it to the server.
Re:Apple starts rejecting apps with “hot code push” features by jinglebells on Wednesday March 08, 2017 @09:23AM (#13820386)