2011-04-08 81 views
1

我最近升级到xCode 4.0.1以便使用最新的iOS SDK(4.3)。我目前正在为iOS 3.X设备开发,但在不久的将来希望扩展到iOS 4.X。无法运行使用iOS SDK 4.3编译的iOS 3.X应用程序

问题是,我似乎无法成功运行我的当前3.X设备上的任何东西。据我了解,4.3 SDK支持编译到所有版本的iOS 3.0及其后续,当然我可以编译这样的应用程序就好了。但是,如果我尝试在模拟器或设备上运行它,它会开始加载,然后崩溃。

现在我只是试图让默认的基于窗口的应用程序运行没有任何修改。我选择了4.3作为基础SDK,并将我的部署目标设置为3.0。我可以从3.0版本中选择每个版本的iOS作为我的构建目标,但只有使用4.3才能真正起作用。

当我跑我的手机上的应用程序,我获取日志中的以下内容:

GNU gdb 6.3.50-20050815 (Apple version gdb-1518) (Sat Feb 12 02:56:02 UTC 2011) 
Copyright 2004 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public License, and you are 
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB. Type "show warranty" for details. 
This GDB was configured as "--host=x86_64-apple-darwin --target=arm-apple-darwin".tty /dev/ttys002 
warning: Unable to read symbols from "dyld" (prefix __dyld_) (not yet mapped into memory). 
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.3 (7E18)/Symbols/System/Library/Frameworks/UIKit.framework/UIKit (file not found). 
warning: Unable to read symbols from "UIKit" (not yet mapped into memory). 
warning: Unable to read symbols from "Foundation" (not yet mapped into memory). 
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.1.3 (7E18)/Symbols/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics (file not found). 
warning: Unable to read symbols from "CoreGraphics" (not yet mapped into memory). 
warning: Unable to read symbols from "libgcc_s.1.dylib" (not yet mapped into memory). 
warning: Unable to read symbols from "libSystem.B.dylib" (not yet mapped into memory). 
warning: Unable to read symbols from "libobjc.A.dylib" (not yet mapped into memory). 
warning: Unable to read symbols from "CoreFoundation" (not yet mapped into memory). 
target remote-mobile /tmp/.XcodeGDBRemote-18423-39 
Switching to remote-macosx protocol 
mem 0x1000 0x3fffffff cache 
mem 0x40000000 0xffffffff none 
mem 0x00000000 0x0fff none 
[Switching to process 11779 thread 0x0] 
[Switching to process 11779 thread 0x0] 
gdb stack crawl at point of internal error: 
0 gdb-arm-apple-darwin    0x000000010010974a internal_vproblem + 308 
1 gdb-arm-apple-darwin    0x0000000100109924 internal_verror + 27 
2 gdb-arm-apple-darwin    0x00000001001099c2 align_down + 0 
3 gdb-arm-apple-darwin    0x0000000100150c5e macosx_solib_add + 794 
4 gdb-arm-apple-darwin    0x000000010016417c remote_macosx_complete_create_or_attach + 187 
5 gdb-arm-apple-darwin    0x000000010016489e remote_macosx_create_inferior + 1252 
6 gdb-arm-apple-darwin    0x000000010005f6c3 run_command_1 + 586 
7 gdb-arm-apple-darwin    0x0000000100107b7f execute_command + 557 
8 gdb-arm-apple-darwin    0x00000001000171e7 mi_execute_async_cli_command + 204 
9 gdb-arm-apple-darwin    0x00000001000168e5 captured_mi_execute_command + 344 
10 gdb-arm-apple-darwin    0x0000000100072a62 catch_exception + 57 
11 gdb-arm-apple-darwin    0x000000010001443e mi_execute_command + 140 
12 gdb-arm-apple-darwin    0x0000000100077721 process_event + 133 
13 gdb-arm-apple-darwin    0x0000000100078435 gdb_do_one_event + 1049 
14 gdb-arm-apple-darwin    0x0000000100072b49 catch_errors + 70 
/SourceCache/gdb/gdb-1518/src/gdb/macosx/macosx-nat-dyld.c:1648: internal-error: unrecognized shared library breakpoint 
A problem internal to GDB has been detected, 
further debugging may prove unreliable. 

我猜测,沿线某处,应用程序的不正确设置链接到3 .X版本的API,因此“无法读取符号”的东西出现在日志中。我似乎无法弄清楚如何纠正这种情况。

任何建议感激地赞赏!

回答

3

没有“3.x API的链接”,这里只是你建立的SDK。该SDK向后兼容,以便在3.x设备上正常运行。

仔细检查您在xcodeproj级别目标级别上的设置是否正确。如果所有这些都是正确的,那么它应该在3.1设备上工作得很好。

如果不工作,那么这里有在黑暗中的一些镜头,可以帮助:

  • 重新启动Mac 的iPhone 3.x的设备
  • 删除&重新添加必要的资源调配profile
  • 仔细检查您的证书是否有效
  • 确保项目中没有权利文件&调试版本的目标设置
  • 清洁所有目标
  • 构建&再次运行

如果没有这个工程,你可能有一个破碎的安装的Xcode 4的。

希望这有助于:)

+0

感谢您的建议。看起来它最终可能是供应配置文件 - 仅仅为了一个百灵之源,我尝试了一个全新的手机来查看它是否可行(当然这需要更新供应配置文件),并且它工作正常。再次感谢! – Mac 2011-04-12 01:43:05

+0

很高兴能帮到你! – 2011-04-13 22:32:14

0

您是否将iOS 3.x指定为目标?如果您将构建目标设置为最新版本(4.3),那么将需要该版本。

+0

。是的,试过了,我已经尝试设置我的BU了从3.0到4.3的每个版本都可以生成目标,并且只有4.3版本(然后,只有在模拟器上,因为我有3.1.3手机)。 – Mac 2011-04-08 03:41:03

+0

@Mac你有没有尝试在模拟器中更改设备? – 2011-04-08 03:43:36

+0

我唯一的选择是“iPhone”,“iPhone(Retina)”和“iPad”。我一直在使用“iPhone”进行测试。 – Mac 2011-04-08 03:46:23

0

您是否尝试删除3.x版本的框架库,并在4.x版本中再次替换,然后清理n建筑?

+0

这不是我正在迁移的3.x项目(无论如何都是在这个阶段),所以没有3.x版本 - 我试图获得在xCode 4中创建的*全新*项目的工作。也就是说,我试过手动更换框架,并没有任何改进。感谢您的建议,但这似乎也不成问题。 – Mac 2011-04-08 05:08:16

0

项目

指定键IOS部署目标为3.2

您编译4.3的开放生成设置。但是你的应用程序也可以在3.2设备上运行..注意你调用的方法...如果你使用的方法只在4.3框架中,你必须在运行时使用if([object respondsToSelector:您的应用程序会崩溃以前的iOS

0

开放构建

集基地SDK:例如IOS versionyou想

然后

开放的目标,然后双击它打开构建然后设置基地的SDK

相关问题