Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i remove an existing xxx.framework(not imported from apple's libraries) from my project #64

Open
a83988029 opened this issue Jan 8, 2016 · 4 comments

Comments

@a83988029
Copy link

my project AAA.xcodeproj contains bbb.framework which is added to ccc.target.
and i want to remove bbb.framework
how can i make it

@a83988029
Copy link
Author

i tried 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.

@AkameGaKill
Copy link

1.Find your framework group
2.Use XCGroup memberWithDisplayName function
3.target removeMemberWithKey:file.key

@a83988029
Copy link
Author

Actually, i made it a couple days after i post this issue.

But i got this issue on the very condition that i duplicate my target.
So this is still a bug, when i duplicate a target and i will fail to remove a source file on the original target.

@akame
Copy link

akame commented Jan 17, 2016

Yes, duplicate a target have some bug,So i remove file first, and then duplicate target.......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants