在Unity的Editor的目录下,创建文件
Base.entitlements 文件内容
aps-environment development
添加代码
string entitlement = Application.dataPath+ "/Editor/Entitlement/Base.entitlements";
File.Copy(entitlement, path+"/Unity-iPhone/Base.entitlements");
bool result=project.AddCapability (targetGUID, PBXCapabilityType.PushNotifications,"Unity-iPhone/Base.entitlements",true);
Debug.Log("添加推送:"+result);



