I am currently on Unity 5.3.6 and I am trying to mark files with the nobackupflag so that they are not backed up into icloud. My project downloads assets into the persistentDataPath and then saves the file by using System.IO.File.WriteAllBytes. After writing the bytes I call SetNoBackupFlag with the same path that was used to save the file. The problem is that it seems that all of the files still appear as they are going to be backed up into icloud.
My code looks like the following
string savePath = System.IO.Path.Combine(UnityEngine.Application.persistentDataPath, filePath);
System.IO.File.WriteAllBytes(savePath, m_www.bytes);
UnityEngine.iOS.Device.SetNoBackupFlag(savePath);
Any Idea on why the files still want to be backed up?