在project.pbxproj文件中引用Removed Framework

时间:2023-01-16 15:29:55

I recently removed a framework from my iOS project and am installing it instead through a dependency manager (CocoaPods). I noticed, however, when checking my changes in to source control that some references to the framework were removed, but one was added with an absolute path. From the diff (the first line was removed and the second line added to my project file):

我最近从我的iOS项目中删除了一个框架,并通过依赖管理器(CocoaPods)安装它。但是,我注意到,当检查我对源代码管理的更改时,删除了对框架的一些引用,但是添加了一个绝对路径。从diff(第一行被删除,第二行添加到我的项目文件):

-       767C7EC51DB295CE00A8850F /* TealiumIOSLifecycle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = TealiumIOSLifecycle.framework; sourceTree = "<group>"; };
+       767C7EC51DB295CE00A8850F /* TealiumIOSLifecycle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TealiumIOSLifecycle.framework; path = /Users/jal/workspace/com.myapp/MyApp/Shared/ThirdParty/TealiumIOSLifecycle.framework; sourceTree = "<absolute>"; };

There is no file at that path on my local machine, and I was able to make a fresh clone in a separate directory and on other machines with a different directory structure and was able to build the project without any warnings or errors. The physical file of the framework no longer exists in the project directory (when I removed the file from the project in Xcode, I chose "move to trash).

在我的本地计算机上的该路径上没有文件,我能够在单独的目录和具有不同目录结构的其他计算机上进行新的克隆,并且能够在没有任何警告或错误的情况下构建项目。框架的物理文件不再存在于项目目录中(当我从Xcode中的项目中删除文件时,我选择了“移动到垃圾箱”)。

Is this normal? If not, how can I remove these references?

这是正常的吗?如果没有,我该如何删除这些引用?

To be clear, there are no references to this framework anywhere in the project. This includes Linked Frameworks and Libraries, Link Binary with Libraries, Target Dependencies, Embed Frameworks, etc.

需要明确的是,项目中的任何地方都没有引用此框架。这包括链接框架和库,链接二进制文件库,目标依赖项,嵌入框架等。

1 个解决方案

#1


2  

Tap on your project file in xcode and in the General tab scroll down and check that it is not included in the following sections

在xcode中点击您的项目文件,然后在“常规”选项卡中向下滚动并检查它是否包含在以下部分中

在project.pbxproj文件中引用Removed Framework

The missing frameworks would be probably highlighted in red (or faded in gray i don't remember exactly)

丢失的框架可能会以红色突出显示(或灰色褪色,我不记得确切)

Also in the build phases check it's not being tried to be copied

同样在构建阶段,检查它是否未被尝试复制

#1


2  

Tap on your project file in xcode and in the General tab scroll down and check that it is not included in the following sections

在xcode中点击您的项目文件,然后在“常规”选项卡中向下滚动并检查它是否包含在以下部分中

在project.pbxproj文件中引用Removed Framework

The missing frameworks would be probably highlighted in red (or faded in gray i don't remember exactly)

丢失的框架可能会以红色突出显示(或灰色褪色,我不记得确切)

Also in the build phases check it's not being tried to be copied

同样在构建阶段,检查它是否未被尝试复制