<tfoot id='7i68g'></tfoot>
    <legend id='7i68g'><style id='7i68g'><dir id='7i68g'><q id='7i68g'></q></dir></style></legend>

  1. <small id='7i68g'></small><noframes id='7i68g'>

    <i id='7i68g'><tr id='7i68g'><dt id='7i68g'><q id='7i68g'><span id='7i68g'><b id='7i68g'><form id='7i68g'><ins id='7i68g'></ins><ul id='7i68g'></ul><sub id='7i68g'></sub></form><legend id='7i68g'></legend><bdo id='7i68g'><pre id='7i68g'><center id='7i68g'></center></pre></bdo></b><th id='7i68g'></th></span></q></dt></tr></i><div id='7i68g'><tfoot id='7i68g'></tfoot><dl id='7i68g'><fieldset id='7i68g'></fieldset></dl></div>
    • <bdo id='7i68g'></bdo><ul id='7i68g'></ul>

      iOS 和取消归档 xib 文件

      时间:2023-10-23
      <legend id='Nsmrg'><style id='Nsmrg'><dir id='Nsmrg'><q id='Nsmrg'></q></dir></style></legend>

    1. <small id='Nsmrg'></small><noframes id='Nsmrg'>

        <tbody id='Nsmrg'></tbody>

          <tfoot id='Nsmrg'></tfoot>

            <i id='Nsmrg'><tr id='Nsmrg'><dt id='Nsmrg'><q id='Nsmrg'><span id='Nsmrg'><b id='Nsmrg'><form id='Nsmrg'><ins id='Nsmrg'></ins><ul id='Nsmrg'></ul><sub id='Nsmrg'></sub></form><legend id='Nsmrg'></legend><bdo id='Nsmrg'><pre id='Nsmrg'><center id='Nsmrg'></center></pre></bdo></b><th id='Nsmrg'></th></span></q></dt></tr></i><div id='Nsmrg'><tfoot id='Nsmrg'></tfoot><dl id='Nsmrg'><fieldset id='Nsmrg'></fieldset></dl></div>

              <bdo id='Nsmrg'></bdo><ul id='Nsmrg'></ul>
                本文介绍了iOS 和取消归档 xib 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在完成一个适用于 iOS 3.0 及更高版本的应用程序,以便在 iPhone 和 iPod Touch 上运行.它在 iOS4.0 及更高版本上运行良好,但当我在运行 iOS 3.0 的第二代 iPod Touch 上对其进行回测时,启动图像显示,我遇到以下情况:

                I'm finishing off an app for iOS 3.0 and up to run on the iPhone and iPod Touch. It's working fine on iOS4.0 and up, but when I backtest it on a second generation iPod Touch running iOS 3.0 the launch image shows and I'm met with the following:

                *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSKeyedUnarchiver initForReadingWithData:]: incomprehensible archive (0x4e, 0x49, 0x42, 0x41, 0x72, 0x63, 0x68, 0x69)'
                2012-01-15 09:35:53.025 MyApp[3026:207] Stack: (
                    808001701,
                    805397928,
                    807551015,
                    807550919,
                    810902709,
                    815043196,
                    815042704,
                    814682908,
                    814682012,
                    814970032,
                    814968048,
                    814966908,
                    839149932,
                    807750263,
                    807747947,
                    814678868,
                    814672532,
                    61527,
                    10764
                )
                terminate called after throwing an instance of 'NSException'
                (gdb) backtrace
                #0  0x31dd594c in __kill ()
                #1  0x31dd5940 in kill ()
                #2  0x31dd5934 in raise ()
                #3  0x31deccfe in abort ()
                #4  0x374ef848 in __gnu_cxx::__verbose_terminate_handler ()
                #5  0x300166c0 in _objc_terminate ()
                #6  0x374ecf3c in __cxxabiv1::__terminate ()
                #7  0x374ecfb4 in std::terminate ()
                #8  0x374ed0dc in __cxa_throw ()
                #9  0x300165e4 in objc_exception_throw ()
                #10 0x30224026 in +[NSException raise:format:arguments:] ()
                #11 0x30223fc6 in +[NSException raise:format:] ()
                #12 0x305564b4 in -[NSKeyedUnarchiver initForReadingWithData:] ()
                #13 0x3094927c in -[UINib instantiateWithOptions:owner:loadingResourcesFromBundle:] ()
                #14 0x30949090 in -[NSBundle(NSBundleAdditions) loadNibNamed:owner:options:] ()
                #15 0x308f131c in -[UIApplication _loadMainNibFile] ()
                #16 0x308f0f9c in -[UIApplication _runWithURL:sourceBundleID:] ()
                #17 0x309374b0 in -[UIApplication handleEvent:withNewEvent:] ()
                #18 0x30936cf0 in -[UIApplication sendEvent:] ()
                #19 0x3093687c in _UIApplicationHandleEvent ()
                #20 0x3204696c in PurpleEventCallback ()
                #21 0x30254a76 in CFRunLoopRunSpecific ()
                #22 0x3025416a in CFRunLoopRunInMode ()
                #23 0x308f0354 in -[UIApplication _run] ()
                #24 0x308eea94 in UIApplicationMain ()
                #25 0x0000f056 in main (argc=1, argv=0x2ffff7c8) at ...... Classes/main.m:16
                Current language:  auto; currently objective-c
                

                任何想法这是什么以及如何解决它?

                Any ideas what this is and how to fix it?

                我在 Xcode 4.2.1 中构建.

                I'm building in Xcode 4.2.1.

                PS - 通过清理构建或重新保存 .xib 文件无法解决问题.有时应用程序会通过这个阶段,但是当它看到更高版本的 .xib 时会因为显然相同的原因而崩溃,比如在加载视图控制器时.

                PS - The problem is not resolved by cleaning the build or by resaving .xib files. Sometimes the app will get past this stage but will crash for apparently the same reason when it sees a later .xib, say in loading a view controller.

                推荐答案

                我相信这个答案涵盖了 Ikuragames 可能给出的内容(他不在他的电脑附近).代表他,要解决 Xcode 4.2.1 中的问题,请单击 .xib 文件并在右侧的文件属性面板中,将部署设置为iOS 3.0"(在我的情况下)并将开发设置为接口生成器"3.0"(在我的情况下也是如此).对项目中的每个 .xib 文件执行此操作.

                This answer I believe covers what Ikuragames might have given (he's not near his computer). On his behalf, to solve the problem in Xcode 4.2.1 click on the .xib file and in the file properties panel on the right hand side, set the deployment to "iOS 3.0" (in my case) and development to "Interface Builder 3.0" (again in my case). Do this for every single .xib file in the project.

                值得记住的是,Xcode 4.2.1 可能会在此处为部署设置默认值iOS 5.0",以匹配当前的 SDK,并为文档类型设置Xcode 4.1".为什么 Xcode 不只是将部署目标与项目部署目标匹配我不确定...

                It's worth keeping in mind that Xcode 4.2.1 might well set defaults of "iOS 5.0" for the deployment here, to match the current SDK, and "Xcode 4.1" for the document type. Why Xcode doesn't just match the deployment target with the project deployment target I'm not sure...

                如果这仍然不起作用,或者您在这个阶段非常偏执,请在加载 .xib 文件时捕获 NSKeyedUnarchiver 引发的异常,然后以编程方式创建视图.

                If this still doesn't work or you're very paranoid by this stage, catch the exception raised by the NSKeyedUnarchiver when loading the .xib file and there create the view programmatically.

                这篇关于iOS 和取消归档 xib 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在 iPad 应用程序中包含同一系列的多种字体 下一篇:iPhone - 为什么编译器在为 ARM 架构构建时找不到某些包含?

                相关文章

                  <bdo id='Q7YAc'></bdo><ul id='Q7YAc'></ul>
              • <small id='Q7YAc'></small><noframes id='Q7YAc'>

                <tfoot id='Q7YAc'></tfoot>
                <legend id='Q7YAc'><style id='Q7YAc'><dir id='Q7YAc'><q id='Q7YAc'></q></dir></style></legend>

                1. <i id='Q7YAc'><tr id='Q7YAc'><dt id='Q7YAc'><q id='Q7YAc'><span id='Q7YAc'><b id='Q7YAc'><form id='Q7YAc'><ins id='Q7YAc'></ins><ul id='Q7YAc'></ul><sub id='Q7YAc'></sub></form><legend id='Q7YAc'></legend><bdo id='Q7YAc'><pre id='Q7YAc'><center id='Q7YAc'></center></pre></bdo></b><th id='Q7YAc'></th></span></q></dt></tr></i><div id='Q7YAc'><tfoot id='Q7YAc'></tfoot><dl id='Q7YAc'><fieldset id='Q7YAc'></fieldset></dl></div>