0
votes

In my app, Most frameworks is weak linked. As I read the document, I consider that maybe I needn't weak-link these frameworks.

Setting of my app

My app's deployment target is iOS4.3 and the base SDK is iOS7.1.

My idea

In my app I use CIImage and UICollectionView. CIImage is in CoreImage framework which is available after iOS5.0, so I should weak-link CoreImage framework. UICollectionView is available in iOS6.0 in UIKit framework, but UIKit is available in iOS4.3, so I needn't weak-link UIKit framework.

Am I right ?

1
Why do you have deployment target iOS 4?...Lord Zsolt
@LordZsolt Well, I don't want to support iOS4.x, but my employer want to support it.KudoCC
You should tell your employer that over 93% of devices have iOS7 on them. The rest of the devices are either devices for which Apple doesn't provide support (anything iPhone 4 or under) or they belong to old people who use their phone only for calling. Now with iOS8 in beta, there's REALLY not reason to provide support for iOS5 or below. And once iOS8 is out, even providing support for iOS6 will be a time waste.Lord Zsolt
@LordZsolt I agree with you, thanks.KudoCC

1 Answers

1
votes

If you are using CoreImage and have not written any defensive code to account for the framework possibly not being present, you should always hard link the framework.However, since CoreImage is only available in iOS 5 and later, you must weak link the framework if you want your app to run on iOS 4.3. But, you really do need to write the defensive coding of checking to ensure the class is present at run time, or simply not calling the CoreImage methods when the app is running on iOS 4.3.

With that said, you really don't need to support iOS 4.x. The iOD market upgrades very quickly.As a result, it might just not be worth it to put the effort in to support 4.x.