HomeDocumentationAPI Reference
Getting StartedAPI ReferenceBug ReportingCrash ReportingAPMHelp Center
These docs are for v8.1. Click to read the latest docs for v12.0.0.

Add Extra Attachment

It's possible to manually add an extra attachment to the report by passing a file URL to this method.

let url = fileURL()
Instabug.addFileAttachment(with: url)
NSURL *url = self.fileURL;
[Instabug addFileAttachmentWithURL:url];
Instabug.addFileAttachment(fileUri, "file_name.txt");
Instabug.addFileAttachment(filePath)
cordova.plugins.instabug.addFile(
    'FILE_PATH',
    function () {
        console.log('File added.');
    },
    function (error) {
        console.log('File could not be added - ' + error);
    }
);
//iOS
NSUrl url = new NSUrl(“url”);
Instabug.AddFileAttachmentWithURL(url);

//Android
Instabug.AddFileAttachment(Android.Net.Uri.Parse("sample text attachment"), "extra_text_attachment");