@duckduckgo/content-scope-scripts
    Preparing search index...

    Platform-Specific Build & Troubleshooting Tips

    This document provides platform-specific build instructions, troubleshooting steps, and local development tips for integrating and working with Content Scope Scripts (C-S-S) across iOS, macOS, Android, Windows, and browser extensions.


    • Check Xcode Version:
    • Set up C-S-S or Autofill as a Local Dependency:
      • Drag the folder from Finder into the directory panel in Xcode.
    • Privacy Config Files:
    • If you receive errors related to packages:
      • File > Packages > Reset Package Caches
      • Clean Project with cmd+K
      • Delete all files inside ~/Library/Developer/Xcode/DerivedData
      • If none of that works, ask for help in the Apple Devs Mattermost channel.
    • Override the Privacy Remote Config
      • Ensure the config version is higher than the current version (the app may refuse to update otherwise).
    • Clean Project:
      • Build → 'Clean Project' (clears cache of potentially stale C-S-S file).
      • Uninstall the app from the emulator as well.
    • Linking Local Dependencies:
      • Use npm link @duckduckgo/content-scope-scripts or npm link @duckduckgo/autofill to link to your local checkout.
      • In that directory, also run npm link in the dependency folder.
      • This symlinks to your local dir and acts as if you're pointing to your PR.
      • Run npm build in C-S-S (not run automatically like in the extension).
    • Alternative Android Setup (more reliable):
      • Alter the path of the resources in the appropriate module's build.gradle to an absolute path on your machine.
      • After making this change, click 'sync now' when Gradle prompts.
      • All changes in C-S-S will be picked up every time you restart the app.
      • This works for all JS dependencies (Autofill, Dashboard, C-S-S, etc).