Skip to content

Can't access iOS file #14

@LukasRoper

Description

@LukasRoper

Hi,

Can you provide more details on how to access the final downloaded file on iOS please?

I'm able to complete the download but it seems the file isn't actually being copied from the temp directory to the final directory.

I added a boolean value to determine if the replaceItemAtURL operation completes and it returns false.

[code=CSharp] NSFileManager* fileManager;
NSURL* destUri = GetDestinationUri(downloadTask.taskDescription, &fileManager);
[fileManager replaceItemAtURL: destUri withItemAtURL: location backupItemName: nil options: NSFileManagerItemReplacementUsingNewMetadataOnly resultingItemURL: nil error: nil];
UnityBackgroundDownload* download = [backgroundDownloads objectForKey: downloadTask];
download.status = kStatusDone;[/code]

Hoping someone who's familiar with iOS might have an idea about what is wrong?

I'm using Unity 2019.1.14f.

Thanks,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions