Skip to content

fetch.progress config isn't working on IOS #433

@qusaieilouti99

Description

@qusaieilouti99

I'm trying to reduce the amount of progress event because its blocking my JS thread, but with no luck, tried the cound and the interval, non of them seem to work.

My usage is:

// Download with react-native-blob-util
        const downloadResult = await ReactNativeBlobUtil.config({
            // Tell blob-util to save the file to the specified path
            path: downloadPath,
        })
            .fetch("GET", url, {
                ...headers, // Spread your custom headers
                // Additional headers can be added here
            })
            // Progress tracking -
            .progress({ count: 10, interval: 2000 }, (received, total) => {
                console.log('progress', received, total, new Date().toISOString());
                const totalBytes = Number(total) || 0;
                const currentBytes = Number(received) || 0;
                updateFileProgress(ProgressType.Downloading, totalBytes, currentBytes);
            });

The logs shows:

progress 15388672 16489264 2025-08-24T14:55:25.740Z
download.ts:76 progress 15446016 16489264 2025-08-24T14:55:25.773Z
download.ts:76 progress 15478784 16489264 2025-08-24T14:55:25.806Z
download.ts:76 progress 15511552 16489264 2025-08-24T14:55:25.839Z
download.ts:76 progress 15544320 16489264 2025-08-24T14:55:25.873Z
download.ts:76 progress 15585280 16489264 2025-08-24T14:55:25.908Z
download.ts:76 progress 15622144 16489264 2025-08-24T14:55:25.942Z
download.ts:76 progress 15654912 16489264 2025-08-24T14:55:25.975Z
download.ts:76 progress 15704064 16489264 2025-08-24T14:55:26.008Z
download.ts:76 progress 15736832 16489264 2025-08-24T14:55:26.042Z
download.ts:76 progress 15785984 16489264 2025-08-24T14:55:26.076Z
download.ts:76 progress 15847424 16489264 2025-08-24T14:55:26.109Z
download.ts:76 progress 15880192 16489264 2025-08-24T14:55:26.142Z
download.ts:76 progress 15884288 16489264 2025-08-24T14:55:26.179Z
download.ts:76 progress 15917056 16489264 2025-08-24T14:55:26.212Z
download.ts:76 progress 15945728 16489264 2025-08-24T14:55:26.248Z
download.ts:76 progress 15978496 16489264 2025-08-24T14:55:26.281Z
download.ts:76 progress 16011264 16489264 2025-08-24T14:55:26.314Z
download.ts:76 progress 16027648 16489264 2025-08-24T14:55:26.347Z
download.ts:76 progress 16060416 16489264 2025-08-24T14:55:26.380Z
download.ts:76 progress 16105472 16489264 2025-08-24T14:55:26.413Z
download.ts:76 progress 16138240 16489264 2025-08-24T14:55:26.446Z
download.ts:76 progress 16146432 16489264 2025-08-24T14:55:26.479Z
download.ts:76 progress 16179200 16489264 2025-08-24T14:55:26.514Z
download.ts:76 progress 16236544 16489264 2025-08-24T14:55:26.547Z
download.ts:76 progress 16269312 16489264 2025-08-24T14:55:26.584Z
download.ts:76 progress 16281600 16489264 2025-08-24T14:55:26.619Z
download.ts:76 progress 16347136 16489264 2025-08-24T14:55:26.652Z
download.ts:76 progress 16404480 16489264 2025-08-24T14:55:26.687Z
download.ts:76 progress 16412672 16489264 2025-08-24T14:55:26.721Z
download.ts:76 progress 16449536 16489264 2025-08-24T14:55:26.755Z
download.ts:76 progress 16489264 16489264 2025-08-24T14:55:26.789Z

versions:

  "react-native": "0.79.5",
  "react-native-blob-util": "0.22.2",
 
 And testing on IOS 18 simulator

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions