2

system:mac osx 10.11.2 , xcode 7.2

i want to write a program or a shell script to remove/add an existing xxx.framework(not imported from apple's libraries) from my project.

i tried to use XCodeEditor like this:

XCProject *asProject = [[XCProject alloc] initWithFilePath:@"/Users/xxx/Desktop/project/test/testXCodeConfig/AAA.xcodeproj"];
XCTarget *aTarget = [asProject targetWithName:@"ccc"];
XCSourceFile *file = [asProject fileWithName:@"bbb.framework"];
NSLog(@"%d",originTarget.members.count);
[aTarget removeMemberWithKey:file.key];
NSLog(@"%d",aTarget.members.count);
[asProject save];

but it didnt work.i got the same count number printed twice.

anyone knows how to make it? thanks!

Community
  • 1
  • 1
jiangjiefs
  • 149
  • 11

0 Answers0