Closed RythenGlyth closed 3 years ago
I'm afraid there are some technical issues to supporting UWP. These are fragments of conservations in the Discord Developers server (https://discord.gg/discord-developers):
https://canary.discord.com/channels/613425648685547541/613425918748131338/639173198591819821
UWP apps on Windows, for example, don't let you do local sockets IIRC? So the IPC protocol just doesn't work
https://canary.discord.com/channels/613425648685547541/613425918748131338/730157267961381014
the sdk will never work in UWP because the SDK DLL targets the desktop platform, it can't be loaded in a UWP app you'd need a
runFullTrust
component doing the rich presence
I believe it also has to do with UMP apps being Sandboxed from Windows. So IPC wouldn't work. Refer to here: https://discordapp.com/channels/613425648685547541/613425918748131338/639203539054231593
The restriction to sockets on UWP is documented on https://docs.microsoft.com/en-us/windows/uwp/networking/sockets (see the Note)
Then that resolves this issue since you are now aware of the restriction. EDIT: didn't realize, vkuhlmann, your not the original author of this issue.
Ok so as I understand it, it can't work with the concept of UWP.
For others who have the same issue, i am now using Windows UI Library 3 - Project Reunion 0.5
, which uses the new mordern Windows UI style but inside a normal
Windows Desktop Application with all the rights you need
The SDK doesn't use sockets on Windows, it uses named pipes. However, low IL processes (UWP processes) cannot connect to named pipes from medium IL processes (Win32 apps) without the ACL allowing this to happen (by default it doesn't).
Describe the bug When trying to connect to Discord, as explained in the docs by using
discord = new Discord.Discord(CLIENT_ID, (UInt64)Discord.CreateFlags.Default);
, theDiscordCreate
method fails, resulting in a crash, with the messageSteps to reproduce
DiscordGameSDK
folderdiscord_game_sdk.dll
by drag and drop into the projectCopy to Output Directory
discord = new Discord.Discord(CLIENT_ID, (UInt64)Discord.CreateFlags.Default);
to the Constructor of the MainPage.xaml.csExpected behavior
Screenshots
Implementation specifics
Additional context When i use
Windows.System.Launcher.LaunchUriAsync(new Uri("discord:///CLIENT_ID/launch"));
, discord opens, as it's supposed to