Skip to content

Instantly share code, notes, and snippets.

@FrankNine
Created June 25, 2017 10:27
Show Gist options
  • Save FrankNine/5eadd1c0f374b773ce83c201cdbe7633 to your computer and use it in GitHub Desktop.
Save FrankNine/5eadd1c0f374b773ce83c201cdbe7633 to your computer and use it in GitHub Desktop.
static void _AddFrameWork(string pathToBuiltProject)
{
string pbxProjectPath = Path.Combine (pathToBuiltProject, "./Unity-iPhone.xcodeproj/project.pbxproj");
PBXProject pbxProject = new PBXProject ();
pbxProject.ReadFromFile (pbxProjectPath);
string targetGUID = pbxProject.TargetGuidByName ("Unity-iPhone");
pbxProject.AddFrameworkToProject (targetGUID, "CoreData.framework", weak:false);
pbxProject.AddFrameworkToProject (targetGUID, "Social.framework", weak:false);
File.WriteAllText(pbxProjectPath,pbxProject.WriteToString ());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment