Instabug-iOS icon indicating copy to clipboard operation
Instabug-iOS copied to clipboard

Instabug.addFileAttachment(with: URL) does not work as documented

Open jonasman opened this issue 1 year ago • 1 comments

Steps to Reproduce the Problem

Create Instabug instance use Instabug.addFileAttachment(with: URL) change the file, flush, close, whatever Create a bug report

Expected Behavior

The file contains the latest data

Actual Behavior

The file contains the data when the addFile command was executed.

Instabug integration code

Instabug.start(withToken: instabugToken, invocationEvents: [.shake, .screenshot])
            Instabug.setLocale(.english)
            Instabug.setValue("XXXX", forStringWithKey: kIBGEmailFieldPlaceholderStringName)
            Instabug.setValue("YYYY", forStringWithKey: kIBGCommentFieldPlaceholderForBugReportStringName)

            Instabug.welcomeMessageMode = IBGWelcomeMessageMode.disabled

            Instabug.addFileAttachment(with: fileUrl)

SDK Version

12.2.0

iOS Version

17.4.0

Device Model

iPhone 14 Pro

[Optional] Project That Reproduces the Issue

private

jonasman avatar Mar 06 '24 11:03 jonasman

Hello @jonasman, Thank you for reporting this. We're checking it. Meanwhile, can you check if the following code will unblock you?

Instabug.willSendReportHandler = { report in
            report.addFileAttachment(with: fileUrl)
            return report
        }

ahmedsalah196 avatar Mar 12 '24 12:03 ahmedsalah196