xcode 无法打开文档“.xib”。无法读取存档
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18955323/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
The document ".xib" could not be opened. Could not read archive
提问by user2732294
I have used xcode 4.6 for past 4 months.
过去 4 个月我一直在使用 xcode 4.6。
All apps are working fine till now.
到目前为止,所有应用程序都运行良好。
Now i have received a new application source code for some changes.
现在我收到了一些更改的新应用程序源代码。
When ever i executes the application. I showing an error that was
当我执行应用程序时。我显示了一个错误
The document "DetailTransactionPage.xib" could not be opened. Could not read archive.
The document "DetailTransactionPage.xib" could not be opened. Could not read archive.
Please use a newer version of Xcode. Consider changing the document's Development Target to preserve compatibility
Please use a newer version of Xcode. Consider changing the document's Development Target to preserve compatibility
Any interface builder is not able to open.
任何界面生成器都无法打开。
I have tried to open with 4.5.2, 4.3.3 as well but no use.
我也试过用 4.5.2、4.3.3 打开,但没有用。
回答by Manthan
As I guess, the source code you have got may be built with different Xcode version rather than you are using right now.
我猜,你得到的源代码可能是用不同的 Xcode 版本构建的,而不是你现在正在使用的。
So, I think you need to perform following steps.
因此,我认为您需要执行以下步骤。
Right click on XXX.xib file and select "Show File Inspector."
Go to Interface Builder Document.
Change Development option with the version of Xcode you are using.
右键单击 XXX.xib 文件并选择“显示文件检查器”。
转到接口生成器文档。
使用您使用的 Xcode 版本更改开发选项。
Hope that helps you.
希望能帮到你。
回答by Vlad
This error is caused due to a xib created from XCode 5. You need to install Xcode 5 to be able to change the compatibility properties for that xib file. After you install, and open the xib, you need to change the "Opens in" property and set it to "XCode 4.6" and "View As" set to iOS 6.1, both from File Inspector of the xib.
此错误是由 XCode 5 创建的 xib 引起的。您需要安装 Xcode 5 才能更改该 xib 文件的兼容性属性。安装并打开 xib 后,您需要更改“打开方式”属性并将其设置为“XCode 4.6”并将“查看方式”设置为 iOS 6.1,两者均来自 xib 的文件检查器。
回答by Skye ying
I met this issue when I upgrade xcode 6.4 to xcode 7. What I did to solve this problem is: delete the "LaunchScreen.xib" file.
我在将 xcode 6.4 升级到 xcode 7 时遇到了这个问题。我为解决这个问题所做的是:删除“LaunchScreen.xib”文件。