2

Does compiling with the iOS 4.3 SDK remove the support for the iPhone 3G and 2nd generation iPod touch devices?

After upgrading, I found that the ad-hoc and distribution builds no longer run on those devices, but installing the iOS 4.2 SDK to another directory, and performing no changes to the code or build settings, it does work correctly.

The application produces a crash report like the following:

OS Version:      iPhone OS 3.0 (7A341)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000000
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                 0x3014579c 0x3000c000 + 1283996

Thread 1:
0   libSystem.B.dylib               0x31d47158 mach_msg_trap + 20
1   libSystem.B.dylib               0x31d49ed8 mach_msg + 60
2   CoreFoundation                  0x3025454e CFRunLoopRunSpecific + 982
3   CoreFoundation                  0x30254164 CFRunLoopRunInMode + 44
4   WebCore                         0x3588dbc8 RunWebThread(void*) + 412
5   libSystem.B.dylib               0x31d705a0 _pthread_body + 20

Thread 0 crashed with ARM Thread State:
    r0: 0x00000000    r1: 0x00000000      r2: 0x39d4a928      r3: 0x00000113
    r4: 0x00114940    r5: 0x3893b29c      r6: 0x38204d80      r7: 0x0031acf0
    r8: 0x00000000    r9: 0x00000001     r10: 0x00000000     r11: 0x00000000
    ip: 0x39d802b8    sp: 0x2fffee10      lr: 0x3000852c      pc: 0x3014579c
  cpsr: 0x80000010

As can be seen, there is not a single reference in the stack trace to the actual application, and there are only the two threads running.

Is it documented anywhere that compiling for those older devices has been dropped? Is there any way to add some kind of build setting so that it does remain functional on those devices moving forward?

  • At the risk of asking the obvious: is the "iOS Deployment Target" setting correctly set? – magma Apr 20 '11 at 15:46
  • see also: http://stackoverflow.com/questions/4923303/ios-4-3-sdk-debugging-on-a-3g-device – magma Apr 20 '11 at 15:50
  • @magma: Yes, the iOS Deployment Target is set to "iOS 3.0". I looked through the post in your link, but it doesn't seem to be quite the same. Running the app in debug mode on these devices works perfectly fine, bus as I've mentioned, it is the ad-hoc/distribution builds that have the issue. – Stefan Miller Apr 20 '11 at 17:25
  • @stefan: is the iOS Deployment Target setting global? does it apply to the specific configuration that you're using to compile your adhoc builds? perhaps this setting has a different value for your 'adhoc' configuration. – magma Apr 20 '11 at 17:36
  • @stefan: did you try disabling LLVM2 optimizations? Are you using Core Data, and if you are, can you try temporarily disabling Core Data usage on launch? Did you try switching back to the GCC compiler? – magma Apr 20 '11 at 17:51
  • 1
    @stefan: see http://stackoverflow.com/questions/5490432/building-with-llvm-and-any-optimization-causes-app-to-crash-on-startup , quote: "We've had the same issue with our app. It only affected armv6 code in Release/Distribution builds and thus only the iPhone 3G and the iPod Touch 2G" – magma Apr 20 '11 at 17:52
  • @stefan: see "Be cautious about using Xcode 4.0 with LLVM 2.0 to deploy apps to iPhone 3G & below devices, apps crash", http://www.innerexception.com/2011/03/be-cautious-about-using-xcode-40-with.html – magma Apr 20 '11 at 17:54
  • @magma That was it! I didn't mention it, but I am still using XCode 3. However, it has also been updated to the LLVM 1.7 compiler and has this issue. – Stefan Miller Apr 20 '11 at 19:32

1 Answers1

1

iOS 4.3 is not supported on devices older than iPhone 3GS and iPod Touch 3rd Gen (excluding the 8GB model, which is also not supported).

Source: Apple.com (scroll to bottom)

Christian
  • 1,714
  • 8
  • 9
  • That is the OS version for loading the software on to the phone, but I am asking about the SDK, which has the iOS Deployment Target set to iOS 3.0 – Stefan Miller Apr 20 '11 at 17:23