Search Issue Tracker

Fixed in Unity 5.3.4

Votes

1

Found in

5.3.2p2

Issue ID

771597

Regression

No

[iOS] Asset bundles downloaded through LoadFromCacheOrDownload are backed up to iCloud

iOS

-

-

Priority: 2Necessary for shipping a final release

-

Severity: 3Secondary functionality broken

Steps to reproduce:

1. Open the attached project
2. Build the project for iOS
3. Run the project on a device that has iCloud set up
4. Wait a few minutes for all the asset bundles to finish downloading
5. When done, go to Settings/iCloud/Storage & Backup/Manage Storage and click on the current device
6. Notice that the application is taking up to 1GB of backup space

Workaround: Update the UnityUpdateNoBackupFlag function in Filesystem.mm file in Xcode project with this:

extern "C" int UnityUpdateNoBackupFlag(const char* path, int setFlag)
{
NSURL* URL= [NSURL fileURLWithPath: [NSString stringWithUTF8String: path]];
if(![[NSFileManager defaultManager] fileExistsAtPath: [URL path]])
return false;

NSError *error = nil;
BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
forKey: NSURLIsExcludedFromBackupKey error: &error];
if(!success){
NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
}
return success;
}

Comments (5)

  1. 6e56d7845c4933fd6bdcf1eacc351c4e?d=mm

    evan_galxyz

    May 18, 2016 18:00

    For others, the fix is actually in 5.3.4p1 - the first patch release for version 5.3.4

  2. 6e56d7845c4933fd6bdcf1eacc351c4e?d=mm

    evan_galxyz

    May 18, 2016 17:56

    This bug still exists in 5.3.4f1. How do we reopen this issue?

  3. 762d660fe479d73f748fa2f77ccb26bc?d=mm

    valeriy-malevaniy

    May 04, 2016 11:26

    Still reproduce in 5.3.4f1

  4. 25865a37dc0397d55550788005dcfd8a?d=mm

    OxyDev

    May 04, 2016 11:25

    Unity 5.3.4f1: bug is still reproduced. Workaround works, thanks!

  5. 0fd3707fd87030cbe8e9ded4febf6d13?d=mm

    Huacanacha

    Mar 07, 2016 22:20

    This caused us an app rejection (with some critical bug fixes) due to iCloud usage. Severity is quite high as the workaround is kludgy and impractical for automated build systems.

    Thanks to whoever reported the problem and added the workaround ;)

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.