RSS

Monthly Archives: April 2012

xCode NSInternalInconsistencyException Cound not load NIB in bundle error

" Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/abhilash/Library/Application Support/iPhone Simulator/4.2/Applications/CA167346-4091-4E16-B841-955D1D391713/test.app> (loaded)' with name 'JRProvidersController'' "

Place to check: Go to “Project” -> “Build Phases” -> “Copy Bundle Resources” and check whether the xib file is there or not. If it is not, add it it and the problem will be solved.

Advertisements
 
Leave a comment

Posted by on April 20, 2012 in Uncategorized

 

Cannot find “Assistant” counterpart in Xcode for newly created xib

Restarting xCode does not solve the problem.

Here might be potential solution:

http://stackoverflow.com/questions/6703054/xcode-4-creating-a-uiview-xib-not-properly-connecting

I got into a similar state just today. It was very odd: I could attach any XIB (new or existing) to any already-existing ViewController class in the project, but I could not create a new ViewController and have it attach properly to any XIB. The “assistant” functionality didn’t work, nor did the IB-to-headerfile-connection functionality.

Closing the project and re-opening did not fix it.
Quitting XCode and restarting did not fix it.
Creating a new project and testing the functionality worked fine, which led me to believe there was something corrupt in some cache somewhere.

My solution

  • Close your project.
  • Go to the ~/Library/Developer/XCode/DerivedData folder and REMOVE all subfolders there referencing the project you are working on.
  • Open your project in XCode. The problem should be fixed now.

Incidentally, just running a full clean did not seem to clear things up. I had to trash the derived data. I’m certain I got into this position because of git games I was playing, but I had no idea how to get out, because even switching back to earlier git revisions didn’t help. (That was a big clue also that it was something untracked by the project itself.)

 
Leave a comment

Posted by on April 20, 2012 in Uncategorized

 

iOS: undefined-symbols-for-architecture-i386 error

The reason is probably that you have copied some files to the project and they are not added to the compile sources.

Solution:

Project -> Build phases -> Compile Sources -> add the ‘.m’ files you have copied to the project into this group

Build and the errors should go!

 
Leave a comment

Posted by on April 19, 2012 in Uncategorized

 

Yii $_POST undefined index exception

Before retrieving values from $_POST or $_GET, use isset($_POST[index]) to check can solve the problem. This should be a framework issue for dealing with these type of inputs.

Example: to retrieve ‘product_id’ information from $_POST:

if ( isset($_POST[‘product_id’] )

{

    $product_id = $_POST[‘product_id’];

}

 
1 Comment

Posted by on April 19, 2012 in Uncategorized