Skip to content
mmockettPublic

About

Drag audio files onto the dock icon to upload directly to SoundCloud — a small native macOS app.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

SC Drop

A tiny native macOS app that uploads audio files to SoundCloud when you drop them on the dock icon. First-run onboarding handles SoundCloud sign-in, public/private default, and whether to use the original filename or generate a random adjective-noun-NNNN track name.

One-time setup

  1. Register a SoundCloud API app at https://developers.soundcloud.com/ and wait for approval. Set the redirect URI to exactly:

    scdrop://oauth/callback
    
  2. Install XcodeGen (used to generate the Xcode project from project.yml):

    brew install xcodegen
  3. Create a local secrets file from the template and fill in the values from your SoundCloud app:

    cp Secrets.example.xcconfig Secrets.xcconfig

    Then edit Secrets.xcconfig and set:

    • SC_CLIENT_ID
    • SC_CLIENT_SECRET

    Leave SC_REDIRECT_SCHEME and SC_REDIRECT_HOST_PATH at their defaults unless you registered a different redirect URI.

  4. Generate the Xcode project:

    xcodegen
  5. Open and run:

    open "SC Drop.xcodeproj"

    Build & run the ScDrop scheme. On first launch you'll be walked through sign-in and your defaults.

Daily use

  • Drag any audio file onto the SC Drop dock icon. SC Drop will upload it with your saved sharing and naming defaults and post a notification. Clicking the notification opens the track on SoundCloud.
  • You can also drop files directly into the open SC Drop window.
  • Sharing and naming defaults can be changed any time from the main window.
  • "Sign out" in the footer wipes tokens and re-runs onboarding.

How it works

Finder drop on dock icon
  -> AppDelegate.application(_:open:)
  -> UploadCoordinator.enqueue
  -> SoundCloudUploader (multipart POST /tracks, auto-refresh on 401)
  -> UNUserNotification with the resulting track URL

OAuth uses the standard SoundCloud OAuth 2.1 + PKCE authorization code flow via ASWebAuthenticationSession, which presents the sign-in page in a system Safari-managed window. This means popups for federated providers (Apple, Google, etc.) work, and the user's existing SoundCloud cookies are reused. The window size is controlled by the OS and cannot be customised. Access and refresh tokens are stored in the macOS Keychain.

Layout

The on-disk source folder stays named ScDrop/ because the bundle identifier (com.scdrop.ScDrop), Swift class names, and URL scheme (scdrop://) all need to be space-free identifiers. Anything user-visible — display name, window title, prose — uses "SC Drop".

Distribution

Building a notarized .app colleagues can launch without Gatekeeper warnings:

  1. Developer ID Application certificate must be in your login keychain. Create it via Xcode -> Settings -> Accounts -> your Apple ID -> Manage Certificates -> + -> "Developer ID Application".

  2. App-specific password for notarization: https://appleid.apple.com -> Sign-In and Security -> App-Specific Passwords.

  3. Store the notary credentials in the keychain so the script never asks you for the password again:

    xcrun notarytool store-credentials scdrop-notary \
      --apple-id "you@example.com" \
      --team-id YOUR_TEAM_ID \
      --password "abcd-efgh-ijkl-mnop"

    YOUR_TEAM_ID is the same 10-character value you put in Secrets.xcconfig as DEVELOPMENT_TEAM.

  4. Build, sign, notarize, staple, zip in one shot:

    ./scripts/dist.sh

    This produces build/SC Drop.zip. Hand that to a colleague: they unzip, drag SC Drop.app to /Applications, and double-click. No Gatekeeper warning.

The script preflights both the certificate and the keychain profile, so if either is missing it tells you what to fix before doing any work. Override the profile name with NOTARY_PROFILE=other-name ./scripts/dist.sh if you already use a different one.

Notes & caveats

  • Distribution is not configured. The app builds with ad-hoc signing and the Hardened Runtime / App Sandbox are off, which keeps Finder drag-on-icon and network access trivially working for personal use. Add the Hardened Runtime, signing, and notarization before sharing builds outside your machine.
  • Secrets.xcconfig is gitignored and must never be committed.

About

Drag audio files onto the dock icon to upload directly to SoundCloud — a small native macOS app.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages