Skip to content

Commit 5bcb145

Browse files
authored
Adds support for uploading minidumps in UWP (#27)
* Adds support for uploading minidumps in UWP * Updates README.md with UWP information
1 parent 621fc07 commit 5bcb145

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,39 @@ Once you've posted an exception or a minidump to BugSplat click the link in the
121121

122122
![BugSplat crash page](https://bugsplat-public.s3.amazonaws.com/unity/my-unity-crasher.png)
123123

124+
## UWP
125+
126+
In order to use BugSplat in a Universal Windows Platform application you will need to add some capabilities to the `Package.appxmanifest` file in the solution directory that Unity generates at build time.
127+
128+
### Exceptions and Log Files
129+
130+
In order to report exceptions and upload log files you will need to add the `Internet (Client)` capability.
131+
132+
### Windows Minidumps
133+
134+
To upload minidumps created on Windows you will need to add the `Internet (Client)` capability.
135+
136+
Additionally, we found there were some restricted capabilities that were required in order to generate minidumps. Please see this Microsoft [document](https://docs.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps) that describes how to configure your system to generate minidumps for UWP native crashes.
137+
138+
To upload minidumps from `%LOCALAPPDATA%\CrashDumps` you will also need to add the `broadFileSystemAccess` restricted capability. To add access to the file system you will need to add the following to your `Package.appxmanifest`:
139+
140+
```xml
141+
<Package xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" ... >
142+
```
143+
144+
Under the `Capabilities` section add the `broadFileSystemAccess` capability:
145+
146+
```xml
147+
<Capabilities>
148+
<rescap:Capability Name="broadFileSystemAccess" />
149+
</Capabilities>
150+
```
151+
152+
Finally, ensure that your application has access to the file system. The following is a snippet illustrating where this is set for our [my-unity-crasher](https://github.com/BugSplat-Git/my-unity-crasher) sample:
153+
154+
![Unity file system access](https://bugsplat-public.s3.amazonaws.com/unity/unity-file-system-access.png)
155+
156+
124157
## Contributing
125158

126159
BugSplat ❤️s open source! If you feel that this integration can be improved, please open an [Issue](https://github.com/BugSplat-Git/bugsplat-unity/issues). If you have an awesome new feature you'd like to implement, we'd love to merge your [Pull Request](https://github.com/BugSplat-Git/bugsplat-unity/pulls). You can also reach out to us via an email to support@bugsplat.com or the in-app chat on bugsplat.com.

Runtime/BugSplat.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,9 @@ private byte[] CaptureInMemoryPngScreenshot()
438438
}
439439
}
440440

441-
private IEnumerator Post(FileInfo minidump, MinidumpPostOptions options = null, Action<HttpResponseMessage> callback = null)
441+
public IEnumerator Post(FileInfo minidump, MinidumpPostOptions options = null, Action<HttpResponseMessage> callback = null)
442442
{
443-
#if UNITY_STANDALONE_WIN
443+
#if UNITY_STANDALONE_WIN || UNITY_WSA
444444
yield return Task.Run(
445445
async () =>
446446
{

0 commit comments

Comments
 (0)