User attachments

It is possible to add a custom attachment to the report. The attachment will be available for download right from the issue viewer. Currently both the amount of attachments and their size is limited. Max of 3 attachments, 1M each.

Your class should implement BugseeDelegate protocol and it must set itself as the delegate for Bugsee.

Objective-C

-(NSArray<BugseeAttachment *> *)bugseeAttachmentsForReport:(BugseeReport *)report
{
    // Only if it's a blocker and on every crash
    if ((report.severity == BugseeSeverityBlocker) ||
        ([report.type isEqualToString:BugseeReportTypeCrash])) {

        BugseeAttachment * att = [BugseeAttachment attachmentWithName:@"internal app db" filename:@"custom.db" data:[NSData dataWithContentsOfFile:pathToMyFile]];

        // Return array with one attachment
        return @[att];
    }

    return @[];
}

// ..somewhere within the class
[Bugsee sharedInstance].delegate = self;

Swift

func bugseeAttachments(for report: BugseeReport) -> [BugseeAttachment] {
    // Only if it's a blocker and on every crash
    if (report.severity == BugseeSeverityBlocker ||
        report.type == BugseeReportTypeCrash) {

        if let att = BugseeAttachment(name:"internal app db", filename:"custom.db", data:NSData(contentsOfFile:pathToMyFile)) {
            // Return array with one attachment
            return [att]
        }
    }

    return []
}

// ..somewhere within the class
Bugsee.sharedInstance()?.delegate = self;