我将一个项目分成两个构建,并给它们每个构建一个plist文件。一切工作正常,但我一直得到这个构建警告:
警告:Copy Bundle Resources构建阶段包含此目标的
信息。MyApp-Info.plist文件
当我尝试构建MyApp时,我得到这个。为第二个目标构建会给出相同的错误(使用SecondTarget-Info。请输入警告)。我不确定为什么这是一个警告,因为我想要构建包含那个.plist文件。每个.plist文件都有一个目标成员(用于它们自己的构建)。
这个警告是什么意思?有什么办法能让它消失吗?
https://developer.apple.com/library/content/qa/qa1649/_index.html
摘录:
你得到这个警告,因为你可能添加了你的信息。plist文件到Copy Bundle Resources构建阶段,如图所示
The INFOPLIST_FILE build setting specifies the name of the Info.plist associated with your target. When building a target, Xcode reads this build setting and copies the referenced Info.plist into your application bundle. Because Xcode automatically processes the Info.plist, you should not add it to your Copy Bundle Resources build phase or make it a target member.
To resolve this warning, select your Info.plist from the Copy Bundle Resource build phase as shown in Figure 1, then click the Remove (–) button to delete it from the phase.