Skip to content

Commit ea3e557

Browse files
authored
Release v1.7.0 (#64)
1 parent da2151c commit ea3e557

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

Backtrace.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Pod::Spec.new do |s|
1010

1111
s.name = "Backtrace"
12-
s.version = "1.6.1"
12+
s.version = "1.7.0"
1313
s.summary = "Backtrace's integration with iOS, macOS and tvOS"
1414
s.description = "Reliable crash and hang reporting for iOS, macOS and tvOS."
1515
s.homepage = "https://backtrace.io/"

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Backtrace Cocoa Release Notes
22

3+
## Version 1.7.0
4+
- Simplifies default file attachments API
5+
36
## Version 1.6.1
47
- Allows default file attachments which will be sent for all live reports as well as crash reports
58
- This allows sending file attachments with crash reports

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -336,19 +336,18 @@ Set attributes are attached to each report. You can specify unique set of attrib
336336
## Attachments <a name="documentation-attachments"></a>
337337
### For crash reports/all reports <a name="documentation-attachments-all"></a>
338338
339-
You can specify file attachments to be sent with every report (including crash reports). File attachments are specified as a `Dictonary` where the keys are a `String` containing the filename (including the extension), and the values are a `URL` containing the path to the file.
339+
You can specify file attachments to be sent with every report (including crash reports). File attachments are specified as an `Array` of `URL` containing the path to the file.
340340
- Swift
341341
```swift
342342
guard let libraryDirectoryUrl = try? FileManager.default.url(
343343
for: .libraryDirectory, in: .userDomainMask, appropriateFor: nil, create: true) else {
344344
throw CustomError.runtimeError
345345
}
346346
347-
let fileName = "sample.txt"
348-
let fileUrl = libraryDirectoryUrl.appendingPathComponent(fileName)
347+
let fileUrl = libraryDirectoryUrl.appendingPathComponent("sample.txt")
349348
350349
var crashAttachments = Attachments()
351-
crashAttachments[fileName] = fileUrl
350+
crashAttachments.append(fileUrl)
352351
353352
BacktraceClient.shared?.attachments = crashAttachments
354353
```
@@ -359,12 +358,7 @@ NSURL *libraryUrl = [[[NSFileManager defaultManager] URLsForDirectory:NSLibraryD
359358
inDomains:NSUserDomainMask] lastObject];
360359
NSURL *fileUrl = [libraryUrl URLByAppendingPathComponent:fileName)];
361360

362-
NSArray *attachmentKeys = [NSArray arrayWithObjects:fileName, nil];
363-
NSArray *attachmentObjects = [NSArray arrayWithObjects:fileUrl, nil];
364-
NSDictionary *attachmentDictionary = [NSDictionary dictionaryWithObjects:attachmentObjects
365-
forKeys:attachmentKeys];
366-
367-
BacktraceClient.shared.attachments = attachmentDictionary;
361+
BacktraceClient.shared.attachments = [NSArray arrayWithObjects:fileUrl, nil];
368362
```
369363
370364
### Per Report <a name="documentation-attachments-per-report"></a>

0 commit comments

Comments
 (0)