removeFromStaticLibraries.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = removeFromStaticLibraries;
  6. function _pbxFile() {
  7. const data = _interopRequireDefault(require("xcode/lib/pbxFile"));
  8. _pbxFile = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. var _removeFromPbxReferenceProxySection = _interopRequireDefault(require("./removeFromPbxReferenceProxySection"));
  14. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  15. /**
  16. * Copyright (c) Facebook, Inc. and its affiliates.
  17. *
  18. * This source code is licensed under the MIT license found in the
  19. * LICENSE file in the root directory of this source tree.
  20. *
  21. */
  22. /**
  23. * Removes file from static libraries
  24. *
  25. * Similar to `node-xcode` addStaticLibrary
  26. */
  27. function removeFromStaticLibraries(project, path, opts) {
  28. const file = new (_pbxFile().default)(path);
  29. file.target = opts ? opts.target : undefined;
  30. project.removeFromPbxFileReferenceSection(file);
  31. project.removeFromPbxBuildFileSection(file);
  32. project.removeFromPbxFrameworksBuildPhase(file);
  33. project.removeFromLibrarySearchPaths(file);
  34. (0, _removeFromPbxReferenceProxySection.default)(project, file);
  35. return file;
  36. }
  37. //# sourceMappingURL=removeFromStaticLibraries.js.map