feat: fix resource bundle crash and integrate uBlock Origin with sett…#160
Open
shantanunautiyal wants to merge 18 commits intosozercan:mainfrom
Open
feat: fix resource bundle crash and integrate uBlock Origin with sett…#160shantanunautiyal wants to merge 18 commits intosozercan:mainfrom
shantanunautiyal wants to merge 18 commits intosozercan:mainfrom
Conversation
…ings UI - Fix resource bundle accessor crash when packaged as .app by using robust PackageResourceLookup helper\n- Integrate uBlock Origin web extension in WebKitManager\n- Add Content Blocking status and version to GeneralSettingsView\n- Modernize localizations with xcstrings\n- Add uBlock Origin integration documentation\n- Improve diagnostics logging and UI test configuration
Owner
|
@shantanunautiyal thanks for the PR! instead of bundling ublock directly, can you introduce an extensions manager where users can bring their own extensions? |
Author
|
@sozercan , Will definetely proceed in this side. Thanks for your suggestion. |
- Removed hardcoded uBlock Origin from WebKitManager. - Created ExtensionsManager to dynamically load user-managed extensions. - Added 'Extensions' tab to Settings UI for users to add/remove their own extensions. - Configured NSOpenPanel to handle safe directory imports. - Added required App Sandbox file access enhancements `com.apple.security.files.user-selected.read-only` and `com.apple.security.files.bookmarks.app-scope` to support persistent WebKit extension access. - Updated documentation and added ADR 0013. - Bumped app version to 1.1.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Sertac Ozercan <sozercan@gmail.com> # Conflicts: # Sources/Kaset/Resources/Localizable.xcstrings # Sources/Kaset/Resources/ar.lproj/Localizable.strings # Sources/Kaset/Resources/en.lproj/Localizable.strings # Sources/Kaset/Resources/tr.lproj/Localizable.strings
Author
…ring & dynamic path resolution - Implemented manifest.json parsing for automatic dashboard path discovery - Resolved Code -1008 navigation error by sharing WKProcessPool across all webviews - Bypassed sandbox permission blocks by implementing containerized storage in Application Support - Linked shared Extension Controller to Options/Popup windows - Reverted to folder selection to ensure valid sandbox scoping for extension bundles
- Add .gitkeep to Sources/Kaset/Extensions/ so git tracks the empty directory (fixes 'missing inputs' build error on CI) - Fix SwiftFormat: sorted imports, trailing spaces, redundant @ViewBuilder, self-insertion, unused args, andOperator, indentation in #if blocks, preferKeyPath, consecutiveBlankLines, wrapPropertyBodies - Fix ExtensionsManager.removeExtension() using wrong directory name ('Extensions' → 'ManagedExtensions') and remove unused variable
This reverts commit 0a7191b.
- ToastView: .regularMaterial → .glassEffect(.regular) for floating toast - WhatsNewView: .thinMaterial badge → .glassEffect(.regular, in: .capsule) - WhatsNewView: .borderedProminent → .buttonStyle(.glassProminent) for the Continue button (system glass prominent style)
This standardizes multiple views in Kaset to use the new Liquid Glass button style in replace of older flat `.borderedProminent` forms, including: - OnboardingView - PlaylistDetailView - LikedMusicView - ArtistDetailView - PodcastsView - ErrorView
…cement for YouTube Music player
…ocalization tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


feat: Fix Resource Bundle Crash and Integrate uBlock Origin
This PR resolves a critical startup crash in packaged app bundles and integrates the uBlock Origin web extension to provide native ad-blocking and privacy protection for Kaset.
Description
The main objective of this PR was to fix a crash occurring when the app is packaged as a
.appbundle (due toBundle.modulelimitations in SwiftPM executable targets) and to enhance the YouTube Music experience by integrating an industry-standard ad-blocker directly into the WebKit view.AI Prompt (Optional)
🤖 AI Prompt Used
AI Tool: Antigravity (Google Deepmind)
Type of Change
Related Issues
Fixes the immediate
EXC_BREAKPOINTcrash on app launch when bundled.Changes Made
Bundle.modulewith a customPackageResourceLookuphelper that correctly identifies the resource bundle insideContents/Resources/in a packaged.app.WebKitManagerto load the extension viaWKWebExtensionController.GeneralSettingsView..stringslocalizations to the modern.xcstringsformat.DiagnosticsLoggerfor better troubleshooting of WebKit and App lifecycle events.docs/ublock-origin.mdwith detailed integration info and update guides.Testing
music.youtube.comChecklist
Screenshots
The new Content Blocking section can be found under Settings > General:
Additional Notes
The resource bundle relocation fix is crucial for any SPM-based macOS executable that targets an
.appbundle distribution while using the standardBundle.modulepattern for localized strings or assets.