Skip to content

Commit 3662bb0

Browse files
fix for system frameworks
1 parent 36ff58c commit 3662bb0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ofxProjectGenerator/src/projects/xcodeProject.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,10 @@ void xcodeProject::addFramework(string name, string path, string folder){
598598

599599
// we add the second to a final build phase for copying the framework into app. we need to make sure we *don't* do this for system frameworks
600600

601-
if (folder.size() != 0){
601+
602+
603+
if (folder.size() != 0 && !ofIsStringInString(path, "/System/Library/Frameworks")
604+
&& target != "ios"){
602605

603606
string buildUUID2 = generateUUID(name + "-build2");
604607
pbxbuildfile = string(PBXBuildFile);
@@ -607,8 +610,6 @@ void xcodeProject::addFramework(string name, string path, string folder){
607610
fileRefDoc.load_buffer(pbxbuildfile.c_str(), strlen(pbxbuildfile.c_str()));
608611
doc.select_single_node("/plist[1]/dict[1]/dict[2]").node().prepend_copy(fileRefDoc.first_child().next_sibling()); // UUID FIRST
609612
doc.select_single_node("/plist[1]/dict[1]/dict[2]").node().prepend_copy(fileRefDoc.first_child()); // DICT SECOND
610-
611-
612613

613614
pugi::xpath_node xpathResult = doc.select_node("//string[contains(.,'PBXCopyFilesBuildPhase')]/../array");
614615
pugi::xml_node node = xpathResult.node();
@@ -638,7 +639,7 @@ void xcodeProject::addFramework(string name, string path, string folder){
638639

639640
// finally, this is for making folders based on the frameworks position in the addon. so it can appear in the sidebar / file explorer
640641

641-
if (folder.size() > 0){
642+
if (folder.size() > 0 && !ofIsStringInString(folder, "/System/Library/Frameworks")){
642643

643644
vector < string > folders = ofSplitString(folder, "/", true);
644645

0 commit comments

Comments
 (0)