Dependency Injection / Polymorphism in Objective C <p>Can I use Objective C <code>protocols</code> the same way I would use Java <code>interfaces</code> for Dependency Injection or Polymorphism?</p> <p>It seems like I cannot. Note that in (1) below I have to <strong><em>type</em></strong> the property as the implementation rather than as the protocol. I get a compiler error if I use the protocol as the <code>property</code> type.</p> <p><strong>(1) The object to have dependencies injected into:</strong></p> <pre><code>#import &lt;Foundation/Foundation.h&gt; #import "FOO_AccountService.h" #import "FOO_BasicAccountService.h" @interface FOO_ServiceManager : NSObject @property (nonatomic, strong) FOO_BasicAccountService &lt;FOO_AccountService&gt; *accountService; ... @end </code></pre> <p><strong>(2) The protocol:</strong></p> <pre><code>#import &lt;Foundation/Foundation.h&gt; #import "FOO_Service.h" @protocol FOO_AccountService &lt;FOO_Service&gt; ... @end </code></pre> <p><strong>(3) The implementation:</strong></p> <pre><code>#import &lt;Foundation/Foundation.h&gt; #import "FOO_BasicService.h" #import "FOO_AccountService.h" @interface FOO_BasicAccountService : FOO_BasicService &lt;FOO_AccountService&gt; ... @end </code></pre>