Just to add to the confusion, I think I may have done this to myself. I had already installed the app earlier, but this afternoon, I changed the bundle identifier, so for a short while, two apps with the same name existed on the phone. I think that may have been the ultimate cause of my mionr problem.
Showing posts with label xcodeerrors. Show all posts
Showing posts with label xcodeerrors. Show all posts
Friday, November 20, 2009
Failed to load error
Just had an experience where I was trying to load an app onto my phone, but kept getting "Failed to upload to device." I cleaned the source code, tried other miscellaneous things, reset the phone, and nothing. It took quitting Xcode and restarting to get it to work, which I find a very common requirement.
Just to add to the confusion, I think I may have done this to myself. I had already installed the app earlier, but this afternoon, I changed the bundle identifier, so for a short while, two apps with the same name existed on the phone. I think that may have been the ultimate cause of my mionr problem.
Just to add to the confusion, I think I may have done this to myself. I had already installed the app earlier, but this afternoon, I changed the bundle identifier, so for a short while, two apps with the same name existed on the phone. I think that may have been the ultimate cause of my mionr problem.
Monday, November 9, 2009
Regarding the Tab Bar control
When adding new tabs and populating the data from another nib view, two things need to be set:
1) In the actual nib view, you need to set the class to the controller, as you would expect.
2) You also need to do the same thing for the view that is listed under the tab controller (once for each tab).
Otherwise you will get a crash if you try to access anything in that particular tab:
'[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key webView.'
1) In the actual nib view, you need to set the class to the controller, as you would expect.
2) You also need to do the same thing for the view that is listed under the tab controller (once for each tab).
Otherwise you will get a crash if you try to access anything in that particular tab:
'[
Friday, November 6, 2009
Don't forget to synthesize!
I decided to reduce the problem I was having by removing extraneous files from the project. In the process, I moved certain properties from one file to another.
All was well, and I solved that initial problem.
However, I started adding back in some additional code, and got this error when trying to assign a UIImageView pointer to a property:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[MainViewController setVideoSlot1:]: unrecognized selector sent to instance 0x3d23150'
As it turns out, I forgot to (re)synthesize those properties that I had earlier moved from one file to another. The odd thing is, Xcode didn't bother to give me the normal warnings for properties that haven't been also synthesized. There maybe an additional condition that has to be fulfilled before you will see that warning. Keep an eye out.
All was well, and I solved that initial problem.
However, I started adding back in some additional code, and got this error when trying to assign a UIImageView pointer to a property:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[MainViewController setVideoSlot1:]: unrecognized selector sent to instance 0x3d23150'
As it turns out, I forgot to (re)synthesize those properties that I had earlier moved from one file to another. The odd thing is, Xcode didn't bother to give me the normal warnings for properties that haven't been also synthesized. There maybe an additional condition that has to be fulfilled before you will see that warning. Keep an eye out.
Friday, October 9, 2009
While trying to add UIWebView. Have the IBOutlet connected and it compiles, but I'm missing something:
Tried:
when it should have been:
where WebDialog inherited from ParentDialog. Inheritance is a tricky little bugger if you're not paying attention.
2009-10-09 16:04:38.035 Green Splash Theme[2529:20b] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[What am I missing?setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key myWebView.'
Tried:
- Link the UIWebView's delegate to the file owner;
- Make the UIViewController a
as well. - Ah-ha! The class that was controlling the UIWebView was a sub-class of another class. In my call to instantiate my new UIWebView class, I used the parent class instead. Changing it to the more specific class made it work.
vcCtrl = [[ParentDialog alloc] initWithNibName:@"WebDialog" bundle:nil];
when it should have been:
vcCtrl = [[WebDialog alloc] initWithNibName:@"WebDialog" bundle:nil];
where WebDialog inherited from ParentDialog. Inheritance is a tricky little bugger if you're not paying attention.
View Outlet Not Set Error
Here's another interesting one:
2009-10-09 10:20:36.845 MyApp[329:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "MayAppView" nib but the view outlet was not set.'Make sure that you connect the View in the nib file to the file's owner. (I'll try to explain it better at another time.)
Thursday, October 8, 2009
Unrecognized Selector Error
In case you get this:
Remember to synthesize the property in question (in this case 'Delegate', which would require a 'setDelegate' selector if I were to hand-code the property). I like Objective-C overall so far, but there are a few quirks that bug me. The property + synthesize issue is one of them. You don't have to call @synthesize if you make the getter/setters yourself, but failure to do either thing should generate an error, not a warning like it does during compilation. I totally missed it.
2009-10-08 17:26:29.125 MyApp[5487:20b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[HowToPlayViewController setDelegate:]: unrecognized selector sent to instance 0xd3dae0'
Remember to synthesize the property in question (in this case 'Delegate', which would require a 'setDelegate' selector if I were to hand-code the property). I like Objective-C overall so far, but there are a few quirks that bug me. The property + synthesize issue is one of them. You don't have to call @synthesize if you make the getter/setters yourself, but failure to do either thing should generate an error, not a warning like it does during compilation. I totally missed it.
Subscribe to:
Posts (Atom)