Instabug/Instabug-iOS

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

jonasman opened this issue · 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

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
        }