Omer
Omer

Reputation: 5590

What is a “weak framework reference”?

What does it mean to have a weak reference to a framework in iphone sdk?

Upvotes: 7

Views: 1543

Answers (1)

hotpaw2
hotpaw2

Reputation: 70703

In practice, if you build an app with a required reference to a framework, rather than a weak reference, and try to run that app on a device which doesn't include that framework, the app with crash, even if you don't try to use that framework.

If, however, you build an app with a weak reference to a framework, and run it on a device that does not support that framework, and do not access classes (methods, subroutines, etc.) in that framework (because you, say, run-time tested for the existence of that framework beforehand) then your app will not simply crash on startup. But since the framework is weakly linked, you could call that framework from that same app on a device which supported that framework. Thus your app might support different OS versions with and without support for a given framework.

There might also be some performance differences in start up time causing apps with weak references to launch much slower.

Upvotes: 6

Related Questions