We have added some new features like streaming time and sales to our iphone app. However, after it is released in app store. I realized that it is not running in ios 3. After the app is lunched, it crashed immediately. Testing on an ios 3 iphone and checked the iphone log, the following is the error log:
dyld: Symbol not found: _OBJC_CLASS_$_UIPopoverController
Referenced from: /var/mobile/Applications/BE668E24-D713-4F84-A959-926CE06B425B/MyApp.app/MyApp
Expected in: /System/Library/Frameworks/UIKit.framework/UIKit
Initially, I thought we may have used some API that only worked in ios 4. However, this error message looks strange to me, I never used this UIPopoverController before. Some googling and leads me to learn something called weak link in iphone app.
The problem is that when the application loads the dynamic linker is trying to resolve all symbols in the application. It does not matter that the reference to a UIPopoverController will not actually be executed (the linker cannot know that). Since the UIPopoverController class does not exist within the UIKit framework installed with version 3.1.3 of the iPhone OS it generates a symbol not found error. This explanation is by Keith Harrison on his blog.
When you right click on the application target in Xcode, then click Get Info.
Click on General tab, you should see the following:
As you can see that all the linked libraries are required. Change the UIKit.framework from Required to Weak. Now try to build the app again, it should be running fine in the iOs 3 device. This is called weak link a library.





