Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default function addFileToProject(project: any, filePath: string) {
const file = new PbxFile(filePath);
file.uuid = project.generateUuid();
file.fileRef = project.generateUuid();
project.addToPbxFileReferenceSection(file);
return file;
}
export default function removeFromStaticLibraries(
project: any,
path: string,
opts: {[key: string]: any},
) {
const file = new PbxFile(path);
file.target = opts ? opts.target : undefined;
project.removeFromPbxFileReferenceSection(file);
project.removeFromPbxBuildFileSection(file);
project.removeFromPbxFrameworksBuildPhase(file);
project.removeFromLibrarySearchPaths(file);
removeFromPbxReferenceProxySection(project, file);
return file;
}
export default function removeProjectFromProject(
project: any,
filePath: string,
) {
const file = project.removeFromPbxFileReferenceSection(new PbxFile(filePath));
const projectRef = removeFromProjectReferences(project, file);
if (projectRef) {
removeProductGroup(project, projectRef.ProductGroup);
}
removeFromPbxItemContainerProxySection(project, file);
return file;
}