title: Retrieving bmp from CFBundle
body: <p>I have a SDL application I am making in xcode.  </p>
  
  <pre><code>int main( int argc, char* args[] )
  {
      //Start SDL
      SDL_Init( SDL_INIT_EVERYTHING );
  
      //The images
      SDL_Surface* hello = NULL;
      SDL_Window* screen = NULL;
      SDL_Renderer *sdlRenderer = NULL;
  
      //Set up screen
      screen = SDL_CreateWindow("My Game Window",
                            SDL_WINDOWPOS_UNDEFINED,
                            SDL_WINDOWPOS_UNDEFINED,
                            640, 480,
                            SDL_WINDOW_OPENGL);
  
      //Create Renderer
      sdlRenderer = SDL_CreateRenderer(screen, -1, 0);
  
      //Load image
      hello = SDL_LoadBMP( "hello.bmp" );
  
      //Create texture from the surface
      SDL_Texture* hello_texture = SDL_CreateTextureFromSurface(sdlRenderer, hello);
  
      //copy texture to the renderer's buffer.
      SDL_RenderCopy(sdlRenderer, hello_texture, NULL, NULL);
  
      //Update Screen
      SDL_RenderPresent(sdlRenderer);
  
      //Pause
      SDL_Delay( 5000 );
  
      //Quit SDL
      SDL_Quit();
  
      return 0;
  }
  </code></pre>
  
  <p>So everything works good but no image shows up. After debugging I found that load_bmp returns null. So I tried to figure out what the correct file path should be through this:  </p>
  
  <pre><code> CFBundleRef mainBundle = CFBundleGetMainBundle();
      CFURLRef resourcesURL = CFBundleCopyBundleURL(mainBundle);
      CFStringRef str = CFURLCopyFileSystemPath( resourcesURL, kCFURLPOSIXPathStyle );
      resourcesURL = CFBundleCopyResourceURL(
                                        mainBundle,
                                        CFSTR("hello.bmp"),
                                        NULL,
                                        NULL
                                        );
  </code></pre>
  
  <p>but that is also not giving me anything so it seems like maybe hello.bmp isn't correctly being copied to the bundle? Has anyone else run into this and no what needs to be done?</p>