string relativeEntitlementFilePath = "Unity-iPhone/amsw.entitlements";
string absoluteEntitlementFilePath = buildPath + "/" + relativeEntitlementFilePath;
PlistDocument tempEntitlements = new PlistDocument();
//iCloud Container
string icloudContainerId= "iCloud.com.apple.bundleid";
PlistElementArray icloudIDsArr = new PlistElementArray();
icloudIDsArr.AddString(icloudContainerId);
PlistElementArray icloudSersArr = new PlistElementArray();
icloudSersArr.AddString("CloudDocuments");
tempEntitlements.root["com.apple.developer.icloud-container-identifiers"] = icloudIDsArr;
tempEntitlements.root["com.apple.developer.icloud-services"] = icloudSersArr;
tempEntitlements.root["com.apple.developer.ubiquity-container-identifiers"] = icloudIDsArr;
pbxProject.AddCapability(targetGUID, PBXCapabilityType.iCloud,relativeEntitlementFilePath);
tempEntitlements.WriteToFile(absoluteEntitlementFilePath);
一定要注意!!!!!!!!!!!!
xcode必须登录苹果开发者账号 && 苹果开发者后台需开启iCloud并生成新的描述文件
以上是在接入5.3.1版本的helpshift时遇到