Question by
TigerFish89 · Apr 24, 2019 at 08:57 AM ·
xcodeframework
RemoveFrameworkFromProject is not work
Hi. I should remove CoreLocation FrameWork for IOS policy.(https://forum.unity.com/threads/nslocationwheninuseusagedescription-required-for-unknown-reasons.528654/) So, I tried to use RemoveFrameworkFromProject function but it is not work. My unity project version is 5.6.3p2 and Xcode version 10.1. What am I miss? here is my code.
[PostProcessBuild(102)]
public static void OnPostProcess(BuildTarget in_buildTarget, string in_buildPath)
{
var projPath= PBXProject.GetPBXProjectPath(in_buildPath);
var proj = new PBXProject();
proj.ReadFromFile(projPath);
var targetName = PBXProject.GetUnityTargetName();
var targetGuid = proj.TargetGuidByName(targetName);
proj.RemoveFrameworkFromProject(targetGuid , "CoreLocation");
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612200115im_/https://answers.unity.com/themes/thub/images/avi.jpg)