@@ -214,7 +214,9 @@ xcodeProject::xcodeProject(std::string target)
214
214
resourcesUUID = " " ;
215
215
frameworksUUID = " E7E077E715D3B6510020DFD4" ; // PBXFrameworksBuildPhase
216
216
afterPhaseUUID = " 928F60851B6710B200E2D791" ;
217
- buildPhasesUUID = " E4C2427710CC5ABF004149E2" ;
217
+ buildPhasesUUID = " E4C2427710CC5ABF004149E2" ;
218
+ frameworksBuildPhaseUUID = " E4328149138ABC9F0047C5CB" ;
219
+
218
220
}else {
219
221
srcUUID = " E4D8936A11527B74007E1F53" ;
220
222
addonUUID = " BB16F26B0F2B646B00518274" ;
@@ -596,7 +598,10 @@ void xcodeProject::addFramework(string name, string path, string folder){
596
598
597
599
// 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
598
600
599
- if (folder.size () != 0 ){
601
+
602
+
603
+ if (folder.size () != 0 && !ofIsStringInString (path, " /System/Library/Frameworks" )
604
+ && target != " ios" ){
600
605
601
606
string buildUUID2 = generateUUID (name + " -build2" );
602
607
pbxbuildfile = string (PBXBuildFile);
@@ -605,8 +610,6 @@ void xcodeProject::addFramework(string name, string path, string folder){
605
610
fileRefDoc.load_buffer (pbxbuildfile.c_str (), strlen (pbxbuildfile.c_str ()));
606
611
doc.select_single_node (" /plist[1]/dict[1]/dict[2]" ).node ().prepend_copy (fileRefDoc.first_child ().next_sibling ()); // UUID FIRST
607
612
doc.select_single_node (" /plist[1]/dict[1]/dict[2]" ).node ().prepend_copy (fileRefDoc.first_child ()); // DICT SECOND
608
-
609
-
610
613
611
614
pugi::xpath_node xpathResult = doc.select_node (" //string[contains(.,'PBXCopyFilesBuildPhase')]/../array" );
612
615
pugi::xml_node node = xpathResult.node ();
@@ -636,7 +639,7 @@ void xcodeProject::addFramework(string name, string path, string folder){
636
639
637
640
// finally, this is for making folders based on the frameworks position in the addon. so it can appear in the sidebar / file explorer
638
641
639
- if (folder.size () > 0 ){
642
+ if (folder.size () > 0 && ! ofIsStringInString (folder, " /System/Library/Frameworks " ) ){
640
643
641
644
vector < string > folders = ofSplitString (folder, " /" , true );
642
645
@@ -681,15 +684,12 @@ void xcodeProject::addFramework(string name, string path, string folder){
681
684
}
682
685
683
686
684
-
685
- // PBXCopyFilesBuildPhase
686
-
687
-
688
- // add it to the build phases...
689
- // pugi::xml_node arrayBuild;
690
- // findArrayForUUID(frameworksBuildPhaseUUID, arrayBuild); // this is the build array (all build refs get added here)
691
- // arrayBuild.append_child("string").append_child(pugi::node_pcdata).set_value(buildUUID.c_str());
692
-
687
+ if (target != " ios" && folder.size () != 0 ){
688
+ // add it to the linking phases...
689
+ pugi::xml_node arrayBuild;
690
+ findArrayForUUID (frameworksBuildPhaseUUID, arrayBuild); // this is the build array (all build refs get added here)
691
+ arrayBuild.append_child (" string" ).append_child (pugi::node_pcdata).set_value (buildUUID.c_str ());
692
+ }
693
693
}
694
694
695
695
0 commit comments