简体   繁体   English

在xCode项目中使用git子模块

[英]Using git submodules with xCode projects

I have a project (A), which is partially used as a submodule for another project (B). 我有一个项目(A),部分用作另一个项目(B)的子模块。 Both projects are under development. 这两个项目都在开发中。 Part of sources from submodule (A) added to my parent project (B) as links, without copying, so I can update thus files with git pull from directory with submodule. 子模块(A)的部分源代码作为链接添加到我的父项目(B)中,无需复制,因此我可以使用git pull从带有子模块的目录中更新文件。

  • Q1: Is it a normal workflow, to use submodules in such way? 问题1:以这种方式使用子模块是否正常?
  • Q2: Is there way to automate adding of new files to A, so them automatically become parts of B? 问题2:是否可以自动将新文件添加到A,从而使它们自动成为B的一部分?
  • Q3: I have issues after removing submodule code - all its parts displayed as absent in xCode, although everything is compiling and works fine. Q3:删除子模块代码后,我遇到了问题-尽管所有内容都已编译且可以正常工作,但xCode中所有部分均显示为缺少。

You can use Cocoapods for this purposes. 您可以将Cocoapods用于此目的。 It automates includes and making changes. 它可以自动进行包含和更改。 You can create local pod, just for sharing code, as well, as remote one 您可以创建本地pod,仅用于共享代码,也可以创建远程pod。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM