Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a “weak framework reference”?

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

like image 994
Omer Avatar asked Sep 07 '10 17:09

Omer


1 Answers

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.

like image 176
hotpaw2 Avatar answered Oct 26 '22 11:10

hotpaw2