Set 'Host Application' to None for test target, then unable to find bundle resources
<p>Before setting Host Application to none, I had this line of code in my unit tests which gave me no problems.</p>

<pre><code>UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
</code></pre>

<p>After setting it to None, I got this error.</p>

<pre><code>&lt;unknown&gt;:0: failed: caught “NSInvalidArgumentException”, “Could not find a
storyboard named ‘Main’ in bundle NSBundle 
&lt;/Applications/Xcode.app/Contents/Developer/Platforms/
iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/Developer/usr/bin&gt; (loaded)”
</code></pre>

<p>I found <a href="https://stackoverflow.com/questions/1879247/why-cant-code-inside-unit-tests-find-bundle-resources">this post</a> which gave me the solution. I just specified the bundle of the class I was loading the view controller in like this.</p>

<pre><code>UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" 
bundle:[NSBundle bundleForClass:[self class]];
</code></pre>

<p>I'm just wondering why this happens. What is happening when I remove the Host Application that causes resources from the main bundle to get excluded?</p>