每当使用CocoaPods重建工作区文件时,防止XCode折叠我的文件夹(Prevent XCode from collapsing my folders whenever workspace fil

编程入门 行业动态 更新时间:2024-10-20 11:36:11
每当使用CocoaPods重建工作区文件时,防止XCode折叠我的文件夹(Prevent XCode from collapsing my folders whenever workspace file is rebuilt with CocoaPods)

每当我使用pod install将CocoaPod添加到我的工作区时,左侧导航器上的文件夹树将折叠到根目录。 这非常烦人,因为我在一个具有深层文件夹结构的项目中工作。 我意识到这是一个小小的不便,但有没有办法防止这种情况发生?

编辑:所以,我有一个工作区已经通过pod install与CocoaPods设置。 我想添加一个新的pod。 所以,我vim Podfile然后pod install (或有时pod update )。

同时,自上次pod install以来,我做了一些工作。 我在XCode工作区中打开了一些选项卡,每个选项卡都有自己的左侧导航视图,该视图显示了我的工作区的层次结构表示。 你知道,这样的事情:

如果重要,我会非常小心地确保我的项目具有严格代表文件系统文件夹的组 - 也就是说,在项目节点下,每个组对应一个真实的文件系统文件夹。 我怀疑它是否相关,但为了以防万一,我提到了它。

现在,一旦我运行pod install ,就在它完成时,我相信它会写入或覆盖xcworkspace文件。 当我发生时我总是知道它,因为接下来发生的事情是我的左侧导航视图完全崩溃了。 我无法立即在网上找到它的图片,但基本上只用“SlideApp”和Pods项目显示上面的图片。

Whenever I add a CocoaPod to my workspace using pod install, the folders tree on the left navigator collapses to the root. This is very annoying because I am working in a project with a deep folder structure. I realize its a minor inconvenience, but is there any way to prevent this from happening?

EDIT: So, I have a workspace that already has been setup with CocoaPods via pod install. I want to add a new pod. So, I vim Podfile and then pod install (or sometimes pod update).

In the meanwhile, since the last pod install, I've done some work. I have some tabs open in my XCode workspace, and each tab has its own left navigation view that shows a hierarchical representation of my workspace. You know, something like this:

If it matters, I take great care to ensure that my project has groups that are strictly representative of file system folders - that is, under the project node, each group corresponds to a real file system folder. I doubt it is relevant but just in case, I mention it.

Now once I run that pod install, right when it finishes, I believe it either writes to or overwrites the xcworkspace file. And I always know it when i happens, because what happens next is that my left navigation view is totally collapsed. I can't find a picture of it online immediately, but basically picture the above with only "SlideApp" and the Pods project visible.

最满意答案

用户界面状态保存在您* .xcodeproj-> project.workspace-> xcuserdata - >'user'.xuserdatad-> UserInterfaceState.xuserstate中

“用户”应该是您登录的地方我会。

如果您对自己的状态如此特别,那么请在安装后尝试备份并安装状态。

pod安装/更新之前的用户界面状态可能与安装后不同,因为pod install / update自然会导致用户界面发生更改。 因此结果可能无法重现。

The user interface state is preserved within you *.xcodeproj->project.workspace->xcuserdata->'user'.xuserdatad->UserInterfaceState.xuserstate

Where 'user' should be your login I'd.

If you are so particular about your state then try to backup and install the state after install.

Your user interface state prior to pod install/update might not be same as after the install as naturally pod install/update causes change in user interface. So the result might not be reproducible.

更多推荐

本文发布于:2023-07-31 00:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1340498.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   重建工作   文件   CocoaPods   XCode

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!