Re:Apple starts rejecting apps with “hot code push” features
by jameside on Wednesday March 08, 2017 @12:50PM
(#13821963)
Apple has been fine with WebViews in apps since the beginning of the App Store, including WebViews that make calls to native code, like in the Quip app. WKWebView even has APIs for native and web code to communicate. It's OK for a WebView to call out to your native code that saves data to disk, registers for push notifications, plays a sound, and so on.
React Native is very much like a WebView except it calls out to one more native API (UIKit) for views and animations instead of using HTML.
What neither WebViews nor React Native do is expose the ability to dynamically call any native method at runtime. You write regular Objective-C methods that are statically analyzed by Xcode and Apple and it's no easier to call unauthorized, private APIs.
With Expo all of the native modules are safe to use and don't expose arbitrary access to native APIs. Apps made with Expo are set up to be good citizens in the React Native and Apple ecosystems.
Re:Apple starts rejecting apps with “hot code push” features
by iOSGuy on Wednesday March 08, 2017 @01:40PM
(#13822480)
Well, let's be clear here. I use React Native, and it would take me about 30m to write a bridged React Native method that could execute ObjC code dynamically, including accessing all the private APIs you could want.
Re:Apple starts rejecting apps with “hot code push” features
by jameside on Wednesday March 08, 2017 @02:27PM
(#13822905)
Yeah. Objective-C is definitely really flexible. From my reading of the warning, the important thing is not to execute Objective-C dynamically or access private APIs regardless of whether you're using React Native, Cordova, a WebView, or even a bare iOS app.
Re:Apple starts rejecting apps with “hot code push” features
by t1amat on Wednesday March 08, 2017 @02:07PM
(#13822697)
It may already exist: https://github.com/wix/react-native-invoke
Re:Apple starts rejecting apps with “hot code push” features
by jahewson on Wednesday March 08, 2017 @03:49AM
(#13818941)
Simple: JIT compilers are banned and so that excludes any modern browser's JavaScript implementation from iOS. But anyone using Apple's JavaScriptCore has nothing to fear.
Re:Apple starts rejecting apps with “hot code push” features
by kalleboo on Wednesday March 08, 2017 @05:01AM
(#13819209)
The rules explicitly forbid any HTML renderer or JS interpreter aside from WebKit, JIT or no JIT. I believe all the popular third party browsers today still use the non-JIT UIWebView rather than WKWebView because the former gives you more control over the request cycle
Re:Apple starts rejecting apps with “hot code push” features
by Operyl on Wednesday March 08, 2017 @07:32AM
(#13819779)
Except, apparently, Chrome
https://blog.chromium.org/2016/01/a-faster-more-stable-chrom...
Re:Apple starts rejecting apps with “hot code push” features
by Xylakant on Wednesday March 08, 2017 @08:53AM
(#13820209)
Chrome uses WKWebView on iOS, so it's basically safari with a different UI (so does firefox on iOS)
Re:Apple starts rejecting apps with “hot code push” features
by Operyl on Wednesday March 08, 2017 @11:03AM
(#13821116)
Yes, I know. I was saying the OP of this thread was wrong because it's not UIWebView, it's WKWebView with a JIT :).
Re:Apple starts rejecting apps with “hot code push” features
by je42 on Wednesday March 08, 2017 @02:19PM
(#13822814)
WKWebView has JIT. In executes the JS in a different process than the hosted app; there the JIT lives, this special process is whitelisted to do JIT magic.
Re:Apple starts rejecting apps with “hot code push” features
by Operyl on Thursday March 09, 2017 @02:38PM
(#13832564)
I understand that, the original OP was stating that none of the "browser skins" had JIT because they all used UIWebView, which isn't the case with the link I posted :p.
Re:Apple starts rejecting apps with “hot code push” features
by dikaiosune on Wednesday March 08, 2017 @12:56PM
(#13822031)
Webkit is the only acceptable browser engine on iOS. Firefox and Chrome both use webkit on iOS.
Since they're not, I wouldn't have _too much_ faith in other things not being rejected.