开发者

Unable to run iOS 3.X app compiled with iOS SDK 4.3

I've recently upgraded to xCode 4.0.1 in order to use the latest iOS SDK (4.3). I'm currently doing development for iOS 3.X devices, but looking to expand into iOS 4.X in the near future.

The problem is, I can't seem to successfully run anything on my current 3.X devices. As I understand it, the 4.3 SDK supports compiling to all versions of iOS 3.0 and subsequent, and certainly I can compile such apps just fine. But if I try to run it in the simulator or on a device, it begins to load and then just crashes.

For now I'm simply trying to get the default window-based application running without any modifications. I've selected 4.3 as the base SDK, and set my deployment target to 3.0. I can select every version of iOS from 3.0 up as my build target, but only using 4.3 seems to actually work at all.

When I run the app on my phone, I get the following in the logs:

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 intern开发者_StackOverflow中文版al_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.

I'm guessing that somewhere along the line, the app's not being set up correctly to link to the 3.X version API, hence the "unable to read symbol" stuff appearing in the logs. I just can't seem to figure out how to rectify the situation.

Any suggestions gratefully appreciated!


There is no "linking of the 3.x APIs", there is just the SDK you build with. The SDK is backwards compatible so as to run properly on 3.x devices.

Double check that you have the correct settings at both the xcodeproj level and the target level. If all of these things are correct, then it should work just fine on a 3.1 device.

If that's not working, then here are some shots in the dark that may help:

  • reboot the Mac and the iPhone 3.x device
  • Remove & re-add the necessary Provisioning profile
  • double check your certificate is valid
  • Make sure there are no entitlements files in your project & target settings for the debug build
  • Clean all targets
  • Build & run again

If none of this works you might have a broken installation of Xcode 4.

Hope this helps :)


Have you specified iOS 3.x as your target? If you set your build target to the latest version (4.3), then that version will be required.


Have you tried deleting the framework libraries from 3.x version and replacing again in 4.x version and then clean n building??


Open Build settings of your project

Specify key IOS DEPLOYMENT TARGET as 3.2

You compile for 4.3. But your app will run also on 3.2 devices.. .Pay attention to the methods that you call... If you use methods that are only in 4.3 framework you must check it at runtime using if([object respondsToSelector: ... otherwise your app will crash on previous iOS


open build

set base sdk : example ios versionyou want

then

open target and double click it open build then set base sdk .

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜