I used this example:
http://forum.unity3d.com/threads/how-can-you-add-items-to-the-xcode-project-targets-info-plist-using-the-xcodeapi.330574/
To successfully add a new element array to info.plist when building to iOS. Hurrah.
I want to now add a bool element to the info.plist but I can not figure it out. I wish the unity documentation had examples.
Here's my failed attempt, how can I fix it? I get all kinds of type conversion errors
// WORKING:
// Get plist
string plistPath = pathToBuiltProject + "/Info.plist";
PlistDocument plist = new PlistDocument();
plist.ReadFromString(File.ReadAllText(plistPath));
// Get root
PlistElementDict rootDict = plist.root;
// NOT WORKING:
// add iTunes write to file permissions
PlistElementBoolean iTunesFileSupport = rootDict.CreateArray("Application supports iTunes file sharing");
iTunesFileSupport.AsBoolean(true);
↧