ElectraJailbreak / cydia

Cydia modified for iOS 11/Electra
GNU General Public License v3.0
117 stars 38 forks source link

Use WKWebView instead of UIWebView #4

Open coolstar opened 6 years ago

coolstar commented 6 years ago

UIWebView is not optimal on iOS 11 as we can't enable JIT when Cydia is outside the container:

Sandbox: Cydia(14974) System Policy: deny(1) dynamic-code-generation
Cydia(14974) System Policy: MAP_JIT requires sandboxing

The obvious fixes are to either disable JIT (too slow), or have Cydia use WKWebView (preferred solution).

Would be a good idea to have the change be compilable in a separate dylib so we don't have to recompile the main Cydia app ourselves and can just edit the binary load commands.

Detrodus commented 6 years ago

I am really new to this, please help. I know little about this or any coding. I am very interested in this but have no idea where to start.

nullpixel commented 6 years ago

please guys, you should know better than hijacking issues

eilpx commented 6 years ago

Would it be a bad idea to recompile the whole Cydia?

kirb commented 6 years ago

This is probably a bigger undertaking than you'd expect due to how tightly Cydia is integrated with WebKit. It'd partly be a downgrade as the cydia API exposed to JavaScript would no longer be directly calling native code, instead it has to use postMessage() to communicate.

jlippold commented 6 years ago

I'm noticing a 30 second lag when first injecting content into cydia's webviews with my tweak https://github.com/jlippold/tweakCompatible and I assume it is related to this issue?

Is there any workaround, or any ideas how to speed it up? Maybe I shouldn't be using the [webView performSelectorOnMainThread] method as seen here? https://github.com/jlippold/tweakCompatible/blob/master/Tweak.xm#L334

Thanks for the help