tags:

views:

23

answers:

1

Hi I am using SDK 4.1 to build an iPhone app and I set the target OS to 3.1.3. When I install the app on devices running iOS4.1. everything goes smoothly. When I try to run the app on devices running 3.1.3 I get the stacktrace below.

dyld: Symbol not found: _OBJC_CLASS_$_UINib
  Referenced from: /var/mobile/Applications/BDD67A1E-9B40-43E7-A012-7D92036B2E24/ThisIsMy.app/ThisIsMy
Expected in: /System/Library/Frameworks/UIKit.framework/UIKit
 in /var/mobile/Applications/BDD67A1E-9B40-43E7-A012-7D92036B2E24/ThisIsMy.app/ThisIsMy

My guess is that it's because UINib was only added to the SDK in 4.0.

What I would like to know is how you mitigate this problem. What should I do to support 3.1.3?

Cheers..

A: 

First, you need to change the framework reference to a weak link (aka "optional"). Then use the techniques described here to test that a class exists before calling your code that uses it.

Robot K