链接故事板引用时出现 ibtool 错误:文件 "Info.plist" 无法保存在文件夹 *.storyboardc 中
ibtool error when linking storyboard references: The file "Info.plist" couldn't be saved in the folder *.storyboardc
我正在使用 Xcode 7.0 beta 4,最近将我的单曲 Main.storyboard 分成一系列故事板,这些故事板由故事板参考连接(Xcode 7 中新提供)。
构建时,我收到以下内容"Interface Builder Storyboard Linker Error":
/* com.apple.ibtool.errors */
: error: The file “Info.plist” couldn’t be saved in the folder “Pages.storyboardc”.
Underlying Errors:
Description: The operation couldn’t be completed. Not a directory
Failure Reason: Not a directory
如何理解这个错误?
故事板引用是通过选择原始故事板中的场景并选择 编辑器 > 重构到故事板... 创建的。我之前遇到的一个问题是故事板链接器抛出不同类型的错误:
/* com.apple.ibtool.errors */
: error: Deploying Storyboard References to iOS 8.0 requires that your storyboards do not
share any view controller identifiers. Browser.storyboard and Pages.storyboard
both contain a view controller with identifier "PagesViewController".
事实证明,使用 "Refactor to Storyboard..." 命令会根据重构的视图控制器标识符之一自动将故事板 ID 分配给故事板引用。这导致了错误描述的情况(故事板引用与视图控制器场景的标识符具有相同的标识符)。我删除了这些标识符,因为我认为您不需要从代码中引用故事板参考。
更新:
我也看到这个问题表现为一个稍微不同的错误:
/* com.apple.ibtool.errors */
: error: “<StoryboardReferenceID>.nib” couldn’t be removed.
Underlying Errors:
Description: The operation couldn’t be completed. Not a directory
Failure Reason: Not a directory
我在写这个问题时找到了一种消除错误的方法。但是,我不能说我更了解它的含义,因此欢迎任何其他见解。
我重新添加了我删除的故事板 ID,以避免之前与视图控制器共享相同标识符有关的错误,但要确保没有两个是相同的。错误不再显示。
我不知道情节提要标识符对情节提要参考有什么影响,但链接器似乎更希望他们有一个!如果需要标识符(例如由于缺少标识符而无法访问场景),我希望编译器 warning/error 而不是链接器错误,所以我目前认为这可能是一个链接器错误Xcode 7.
的最终版本解决了这个问题
我正在使用 Xcode 7.0 beta 4,最近将我的单曲 Main.storyboard 分成一系列故事板,这些故事板由故事板参考连接(Xcode 7 中新提供)。
构建时,我收到以下内容"Interface Builder Storyboard Linker Error":
/* com.apple.ibtool.errors */
: error: The file “Info.plist” couldn’t be saved in the folder “Pages.storyboardc”.
Underlying Errors:
Description: The operation couldn’t be completed. Not a directory
Failure Reason: Not a directory
如何理解这个错误?
故事板引用是通过选择原始故事板中的场景并选择 编辑器 > 重构到故事板... 创建的。我之前遇到的一个问题是故事板链接器抛出不同类型的错误:
/* com.apple.ibtool.errors */
: error: Deploying Storyboard References to iOS 8.0 requires that your storyboards do not
share any view controller identifiers. Browser.storyboard and Pages.storyboard
both contain a view controller with identifier "PagesViewController".
事实证明,使用 "Refactor to Storyboard..." 命令会根据重构的视图控制器标识符之一自动将故事板 ID 分配给故事板引用。这导致了错误描述的情况(故事板引用与视图控制器场景的标识符具有相同的标识符)。我删除了这些标识符,因为我认为您不需要从代码中引用故事板参考。
更新:
我也看到这个问题表现为一个稍微不同的错误:
/* com.apple.ibtool.errors */
: error: “<StoryboardReferenceID>.nib” couldn’t be removed.
Underlying Errors:
Description: The operation couldn’t be completed. Not a directory
Failure Reason: Not a directory
我在写这个问题时找到了一种消除错误的方法。但是,我不能说我更了解它的含义,因此欢迎任何其他见解。
我重新添加了我删除的故事板 ID,以避免之前与视图控制器共享相同标识符有关的错误,但要确保没有两个是相同的。错误不再显示。
我不知道情节提要标识符对情节提要参考有什么影响,但链接器似乎更希望他们有一个!如果需要标识符(例如由于缺少标识符而无法访问场景),我希望编译器 warning/error 而不是链接器错误,所以我目前认为这可能是一个链接器错误Xcode 7.
的最终版本解决了这个问题