AsadAzam / DiscordX

Xcode Discord Integration works with Xcode 13 and has all the latest icons.
MIT License
105 stars 13 forks source link
discord discord-rich-presence macos swift xcode

DiscordX

GitHub release (latest by date)

GitHub GitHub GitHub GitHub GitHub GitHub All Releases

New Features

  1. Added a simple Status Bar Menu to start, stop or close the App.

TODOs

  1. Keep a log file for time spent on every file

DiscordX adds support for Xcode on Discord, AKA Discord Rich Presence.

DiscordX displays the current file you are working on and the current workspace in use. It uses the same icons which exist in Xcode 12.0.1 (12A7300)

DIscordX adds support for the current application in use too. Other applications do the exact same thing, but none of them I used supported applications or such a wide variety of file types. Also, none of them are updated for Xcode 13.

The following file type extensions are supported:

The following applications are supported:

Dependencies

If you are modifying/ tweaking the application, make sure you change the Team under Signing & Capabilities.

DiscordX uses PKBeam's Fork of Azoy's SwordRPC.

System Requirements

Usage

  1. Download the project, and open it on Xcode.
  2. Go to Signing & Capabilities, choose Team and Select Sign to Run Locally in Signing Certificate.
  3. Build and Run the App.
  4. (Optional) Go to Products under the Navigator, right-click on DiscordX.app, and click on Show in Finder. Copy/Cut - Paste in the Applications folder, and it should be easier to launch next time.

After running it, it will ask for two permissions; one is for controlling Xcode, and the other is for System Events. As the app uses Apple script to perform any operation, it would need access to whatever the script will run on.

Configurable

List of Apple Scripts run:

tell application "Xcode"
  return name of windows
end tell
tell application "Xcode"
  return file of documents
end tell
tell application "Xcode"
  return name of documents
end tell
tell application "Xcode"
  return active workspace document
end tell
tell application "System Events"
  get the name of every application process whose frontmost is true
end tell
tell application (path to frontmost application as Unicode text)
  if name is "Xcode" then
    get version
  end if
end tell

You can verify what permissions DiscordX uses by opening System Preferences and looking in Security & Privacy under Privacy, then Automation. That's it, you're done - DiscordX will now automatically monitor Xcode.

If you like, you can set DiscordX to automatically open on login.

Note

DiscordX is a fork of RPFX. I didn't contribute to the original as I didn't like the name RPFX.