title: Can't access resource bundle from custom framework using CoreFoundation
body: <p><strong>What I've done</strong></p>
  
  <p>I've built a custom iOS framework we'll call <strong>CustomFramework.framework</strong> as well as an accompanying resource bundle for some sqlite files called <strong>CustomFramework.bundle</strong>. I have added my framework and resource bundle to another project and it builds successfully.</p>
  
  <p><strong>What I am trying to do</strong></p>
  
  <p>I am trying to access the resource bundle using <strong>CoreFoundation</strong>. I then want to select a specific sqlite file and open it.</p>
  
  <p><strong>What is going wrong</strong></p>
  
  <p>There is a file <em>within</em> my framework called <strong>ResourceHelper.cpp</strong>. Here is where I want to open the sqlite files. I am trying to get a reference to the bundle <strong>CustomFramework.bundle</strong>. To do so, I have this line:</p>
  
  <pre><code>CFBundleRef mainBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.mycompany.CustomFramework"));
  </code></pre>
  
  <p>and in my <strong>CustomFramework-Info.plist</strong> the <code>Bundle identifer</code> field is <code>com.mycompany.CustomFramework</code>. This line of code is returning <strong>NULL</strong>; in the debugger it looks like <code>mainBundle = (CFBundleRef) 0x0</code>.</p>
  
  <p><strong>Why can't I locate my framework resource bundle?</strong></p>
  
  <p>Thanks</p>