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:
.swift
.playground
.storyboard
.xcodeproj
.h
.m
.cpp
.c
.sdef
.plist
.md
.appex
.rcproject
.rtf
.rtfd
.pch
.mm
.xcassets
.iig
.metal
.xib
.arobject
.entitlements
The following applications are supported:
Simulator
Instruments
Accessibility Inspector
FileMerge
Create ML
RealityComposer
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.
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.
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.
DiscordX is a fork of RPFX. I didn't contribute to the original as I didn't like the name RPFX.