Post

Replies

Boosts

Views

Activity

Reply to JavaScriptCore / WkWebView JavaScript engine speed comparison
I think this article on JavaScriptCore vs WKWebView might help: https://www.lucidchart.com/techblog/2019/01/03/javascriptcore-10-months-later/ It's a follow-up on this article exploring JavaScriptCore: https://www.lucidchart.com/techblog/2018/02/14/javascriptcore-the-holy-grail-of-cross-platform/ I can't speak from experience yet, but I'm just getting started on a project where I need to embed some JavaScript in a Swift application, and I'm planning on taking a closer look at WKWebView. For some use cases it appears to have a 10-15x performance advantage over JSC. It sounds like a side effect of the security model on iOS, but that and the tradeoffs between JSC annd WKWebView are discussed in the article linked above. I hope this helps!! 😊
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’23
Reply to The default Safari App Extension created by Xcode does nothing.
I also struggled with this when I got started, but I shipped my first Safari Extension from this template! See: https://themagichighlighter.com ⚡️ The thing that helped me was to edit the manifest.json file "content_scripts": [] configuration. Here's an example: { "...": "...", "content_scripts": [ { "js": [ "common.js", "content.js" ], "css": [ "content.css" ], "exclude_matches": [], "matches": [ "*://*/*" ], "run_at": "document_start", "all_frames": false } ] } Just edit which js and css files are loaded and you should be able to see your code loaded on any/all pages. The Mozilla documentation for manifest.json, content_scripts, and "Matching URL Patterns" were incredibly helpful for me: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#matching_url_patterns I hope this helps!
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’23