SIGABRT error in xCode 4.5.2
Hello everybody, I´m just learning IOS Programming and I´ve had a problem when i Run the apps on my iPad (6.0) and mi iPhone (5.0.1) and also in the Simulator, when I run some apps in certain devices the screen is block in the Default image and i get this line in green:
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); Thread 1:signal SIGABRT
I´m getting mad trying to solve this, help would be appreciated. In the debugger this time i have this:
2012-11-18 13:59:50.430 Quiz[82846:707] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x33efa8bf 0x3414a1e5 0x33efa7b9 0x33efa7db 0x375863a1 0x3758650f 0x37586277 0x375173fd 0x374879cb 0x37366ea1 0x372dc78b 0x372daf9d 0x372cd941 0x3733f541 0x23b1 0x372db7eb 0x372d53bd 0x372a3921 0x372a33bf 0x372a2d2d 0x306d5df3 0x33ece553 0x33ece4f5 0x33ecd343 0x33e504dd 0x33e503a5 0x372d4457 0x372d1743 0x210f 0x20b0)
terminate called throwing an exception(lldb)
Thanks for your help.
Your app is using auto layout, which was introduced in iOS 6. Your iPhone is running iOS 5, which doesn't support auto layout. That's why the code works on your iPad, but not your iPhone.
If you want your app to work on both devices you have to turn off layout and set your app's deployment target to iOS 5. To turn off auto layout, select your xib file from the project navigator. Open the file inspector by choosing View > Utilities > Show File Inspector. Deselect the Use Auto Layout checkbox.
To change the deployment target, select your project from the project navigator to open the project editor. Select your project from the left side of the project editor. Click the Info button at the top of the editor. Choose iOS 5.0 from the iOS Deployment Target combo box.
Similar Messages
-
How do I fix a SIGABRT error in Xcode 4 ?
I keep getting this error in Xcode 4 when I run the app:
You stop the error from happening by fixing the error in your code that is causing the sigabrt.
Without a lot more information there is no other way to answer your question. -
How to solve the SIGABRT error in Xcode 3 ?
I've built an iOS app and SIGABRT makes it crash . The app uses accelerator . I use the latest version of Xcode 3 (3.2.6) . How to sovle the problem ?
How to solve this ?
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-> int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal; -
SIGABRT error when choosing a row of a tableview
Hello, I am creating an iPhone app and I keep getting a "SIGABRT" error. I have a tableview where I want a separate webpage pushed for each rows.
Currently, what happens is that the table displays; however, when I pick a row it gives me a SIGABRT error. Please help.
Here is my first view (table view) .h file:
#import <UIKit/UIKit.h>
@interface videoTableViewController : UITableViewController
NSArray *videos;
@property (strong, nonatomic) NSArray *videos;
@end
Here is my first view (table view) .m file:
#import "videoTableViewController.h"
#import "videoURLController.h"
@interface videoTableViewController ()
@end
@implementation videoTableViewController
@synthesize videos;
- (id)initWithStyle:(UITableViewStyle)style
self = [super initWithStyle:style];
if (self) {
// Custom initialization
return self;
- (void)viewDidLoad
[super viewDidLoad];
videos = [NSArray arrayWithObjects:@"Welcome", @"Hello", @"Goodbye", nil];
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
- (void)viewDidUnload
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
return (interfaceOrientation == UIInterfaceOrientationPortrait);
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
// Return the number of sections.
return 1;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
// Return the number of rows in the section.
return [self.videos count];
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
static NSString *CellIdentifier = @"videoCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
// Configure the cell...
NSUInteger row = [indexPath row];
cell.textLabel.text = [videos objectAtIndex:row];
if (row == 0)
cell.detailTextLabel.text = @"Welcome";
if (row == 1)
cell.detailTextLabel.text = @"What we value";
if (row == 2)
cell.detailTextLabel.text = @"What does Honor mean?";
return cell;
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
// Return NO if you do not want the specified item to be editable.
return YES;
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
// Return NO if you do not want the item to be re-orderable.
return YES;
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
videoURLController *detailViewController = [[videoURLController alloc] initWithNibName:@"videoTableViewController" bundle:nil];
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
if (indexPath.row == 0){
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
@end
Here is my videoURLController (second view/web view) .h file?
#import <UIKit/UIKit.h>
@interface videoURLController : UIViewController
@property (strong, nonatomic) IBOutlet UIWebView *webView;
@end
Here is my videoURLController (second view/web view) .m file?
#import "videoURLController.h"
@interface videoURLController ()
@end
@implementation videoURLController
@synthesize webView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
return self;
- (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view.
- (void)viewDidUnload
[super viewDidUnload];
// Release any retained subviews of the main view.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
return (interfaceOrientation == UIInterfaceOrientationPortrait);
@endHello, I am creating an iPhone app and I keep getting a "SIGABRT" error. I have a tableview where I want a separate webpage pushed for each rows.
Currently, what happens is that the table displays; however, when I pick a row it gives me a SIGABRT error. Please help.
Here is my first view (table view) .h file:
#import <UIKit/UIKit.h>
@interface videoTableViewController : UITableViewController
NSArray *videos;
@property (strong, nonatomic) NSArray *videos;
@end
Here is my first view (table view) .m file:
#import "videoTableViewController.h"
#import "videoURLController.h"
@interface videoTableViewController ()
@end
@implementation videoTableViewController
@synthesize videos;
- (id)initWithStyle:(UITableViewStyle)style
self = [super initWithStyle:style];
if (self) {
// Custom initialization
return self;
- (void)viewDidLoad
[super viewDidLoad];
videos = [NSArray arrayWithObjects:@"Welcome", @"Hello", @"Goodbye", nil];
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
- (void)viewDidUnload
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
return (interfaceOrientation == UIInterfaceOrientationPortrait);
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
// Return the number of sections.
return 1;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
// Return the number of rows in the section.
return [self.videos count];
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
static NSString *CellIdentifier = @"videoCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
// Configure the cell...
NSUInteger row = [indexPath row];
cell.textLabel.text = [videos objectAtIndex:row];
if (row == 0)
cell.detailTextLabel.text = @"Welcome";
if (row == 1)
cell.detailTextLabel.text = @"What we value";
if (row == 2)
cell.detailTextLabel.text = @"What does Honor mean?";
return cell;
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
// Return NO if you do not want the specified item to be editable.
return YES;
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
// Return NO if you do not want the item to be re-orderable.
return YES;
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
videoURLController *detailViewController = [[videoURLController alloc] initWithNibName:@"videoTableViewController" bundle:nil];
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
if (indexPath.row == 0){
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com"]]];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
@end
Here is my videoURLController (second view/web view) .h file?
#import <UIKit/UIKit.h>
@interface videoURLController : UIViewController
@property (strong, nonatomic) IBOutlet UIWebView *webView;
@end
Here is my videoURLController (second view/web view) .m file?
#import "videoURLController.h"
@interface videoURLController ()
@end
@implementation videoURLController
@synthesize webView;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
return self;
- (void)viewDidLoad
[super viewDidLoad];
// Do any additional setup after loading the view.
- (void)viewDidUnload
[super viewDidUnload];
// Release any retained subviews of the main view.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
return (interfaceOrientation == UIInterfaceOrientationPortrait);
@end -
SIGABRT error - PLEASE HELP - NEEDED URGENTLY
Hello guys pls hep me out, i am new to ios sdk
i am getting a sigabrt error
This is how my app goes:
$ A story board app
$ 1 view controller embedded in a navigation controller
$ 1 TableViewController And 1 more UIViewController
$ When a user clicks button in the first viewcontroller he is pushed to the table view controller
$ 3 Class files (h and m)
$ 1 class file is an object
$2nd class file is table view controller
$ 3rd is UIVIewController
now the problem is that when i click the button in the first viewcontoller i get a sigbrt error telling me that the cell text labeling is wrong and that sigabrt error with a green highlight stays on the code..
I HAVE HIGHLIGHTED THE CODES THAT SHOWS SIGABRT ERROR
My codes:
URL.h
#import <Foundation/Foundation.h>
@interface url : NSObject
@property (nonatomic, strong) NSString *urlstring;
@property (nonatomic, strong) NSString *ns;
@end
url.m:
#import "url.h"
@implementation url
@synthesize urlstring, ns;
@end
load.h;
#import <UIKit/UIKit.h>
#import "url.h"
@interface load : UIViewController
@property (strong, nonatomic) IBOutlet UIWebView *webview;
@property (strong, nonatomic) url *currenturl;
@property (strong, nonatomic) NSString *path;
@property (strong, nonatomic) NSString *finalpath;
@property (strong, nonatomic) NSString *value;
@end
load.m:
#import "load.h"
@interface load ()
@end
@implementation load
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
return self;
- (void)viewDidLoad
NSURL *ul = [NSURL URLWithString:[_currenturl urlstring]];
[self.webview loadRequest:[NSURLRequest requestWithURL:ul]];
[super viewDidLoad];
// Do any additional setup after loading the view.
- (void)didReceiveMemoryWarning
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
@end
wwp.h ( wizards of waverly place i am trying to create an app that shows all the episodes)
#import <UIKit/UIKit.h>
#import "url.h"
#import "load.h"
@interface wwp : UITableViewController <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) NSDictionary *seasons;
@property (nonatomic, strong) NSArray *keyseasons;
@property (strong, nonatomic) NSString *path;
@property (strong, nonatomic) NSString *finalpath;
@property (strong, nonatomic) NSString *value;
@end
wwp.m
#import "wwp.h"
#import "url.h"
@interface wwp ()
@end
@implementation wwp
@synthesize seasons, keyseasons;
NSMutableArray *urls;
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"showurl"]) {
load *dvc = [segue destinationViewController];
NSIndexPath *path = [self.tableView indexPathForSelectedRow];
url * c = [urls objectAtIndex:path.row];
[dvc setCurrenturl:c];
- (id)initWithStyle:(UITableViewStyle)style
self = [super initWithStyle:style];
if (self) {
// Custom initialization
return self;
- (void)viewDidLoad
[super viewDidLoad];
urls = [[NSMutableArray alloc] init];
url *link = [[url alloc] init];
[link setUrlstring:@"E1 Crazy Ten Minute Sale"];
[link setNs:@"E1 Crazy Ten Minute Sale"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E2 First Kiss"];
[link setNs:@"E2 First Kiss"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E3 I Almost Drowned in a Chocolate Fountain"];
[link setNs:@"E3 I Almost Drowned in a Chocolate Fountain"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E4 New Employee"];
[link setNs:@"E4 New Employee"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E5 Disenchanted Evening"];
[link setNs:@"E5 Disenchanted Evening"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E6 You Can't Always Get What You Carpet"];
[link setNs:@"E6 You Can't Always Get What You Carpet"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E7 Alex's Choice"];
[link setNs:@"E7 Alex's Choice"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E8 Curb Your Dragon"];
[link setNs:@"E8 Curb Your Dragon"];
[urls addObject:link];
NSString *myfile = [[NSBundle mainBundle] pathForResource:@"SeasonWowp" ofType:@"plist"];
seasons = [[NSDictionary alloc] initWithContentsOfFile:myfile];
keyseasons = [seasons allKeys];
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
- (void)didReceiveMemoryWarning
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
// Return the number of sections.
return 1;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
// Return the number of rows in the section.
return [seasons count];
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
static NSString *CellIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (nil == cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
url *current = [urls objectAtIndex:indexPath.row];
[cell.textLabel setText:[current ns]];
return cell;
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
// Return NO if you do not want the specified item to be editable.
return YES;
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
// Return NO if you do not want the item to be re-orderable.
return YES;
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
// Navigation logic may go here. Create and push another view controller.
<#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
@endSorry my mistake,
i didnt intend to highlight it all... happened by mistake... before publishing the post i had the actuall thing highlighted and now its not any ways this the code that shows the error: ( the one which is Bolded,Italiced ,Underlined)
wwp:
#import "wwp.h"
#import "url.h"
@interface wwp ()
@end
@implementation wwp
@synthesize seasons, keyseasons;
NSMutableArray *urls;
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"showurl"]) {
load *dvc = [segue destinationViewController];
NSIndexPath *path = [self.tableView indexPathForSelectedRow];
url * c = [urls objectAtIndex:path.row];
[dvc setCurrenturl:c];
- (id)initWithStyle:(UITableViewStyle)style
self = [super initWithStyle:style];
if (self) {
// Custom initialization
return self;
- (void)viewDidLoad
[super viewDidLoad];
urls = [[NSMutableArray alloc] init];
url *link = [[url alloc] init];
[link setUrlstring:@"E1 Crazy Ten Minute Sale"];
[link setNs:@"E1 Crazy Ten Minute Sale"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E2 First Kiss"];
[link setNs:@"E2 First Kiss"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E3 I Almost Drowned in a Chocolate Fountain"];
[link setNs:@"E3 I Almost Drowned in a Chocolate Fountain"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E4 New Employee"];
[link setNs:@"E4 New Employee"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E5 Disenchanted Evening"];
[link setNs:@"E5 Disenchanted Evening"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E6 You Can't Always Get What You Carpet"];
[link setNs:@"E6 You Can't Always Get What You Carpet"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E7 Alex's Choice"];
[link setNs:@"E7 Alex's Choice"];
[urls addObject:link];
link = [[url alloc] init];
[link setUrlstring:@"E8 Curb Your Dragon"];
[link setNs:@"E8 Curb Your Dragon"];
[urls addObject:link];
NSString *myfile = [[NSBundle mainBundle] pathForResource:@"SeasonWowp" ofType:@"plist"];
seasons = [[NSDictionary alloc] initWithContentsOfFile:myfile];
keyseasons = [seasons allKeys];
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
- (void)didReceiveMemoryWarning
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
// Return the number of sections.
return 1;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
// Return the number of rows in the section.
return [seasons count];
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
static NSString *CellIdentifier = @"cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (nil == cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
url *current = [urls objectAtIndex:indexPath.row];
[cell.textLabel setText:[current ns]];
return cell;
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
// Return NO if you do not want the specified item to be editable.
return YES;
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
// Return NO if you do not want the item to be re-orderable.
return YES;
#pragma mark - Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
// Navigation logic may go here. Create and push another view controller.
<#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:detailViewController animated:YES];
@end -
Error in Xcode 6 on Mavericks 10.9.5
I've an error in Xcode 6.0.1 on OS X Mavericks 10.9.5.
When i debug, the iOS 8 simulator shows this error: Unable to boot the iOS Simulator.
After few seconds Xcode shows this other error: An error was encountered while running (Domain = DTiPhoneSimulatorErrorDomain, Code = 2)
However, the iOS 7 simulator works!!
Can anyone help me? THANK YOU!you are posting in the wrong area, for you need to post in the xCode forum. This is not a Maverick Issue
I am having the same problem, for this is how I found this posting by googling the error that it gave me. -
CVS protocol error with Xcode 3
Dear all,
I'm having a hard time getting Xcode talk to our CVS repository. While everything works fine at command line level, I get the following error from within Xcode 3:
*cvs [server aborted]: protocol error: directory '/E/CVS/repository' not within root 'E:/CVS/repository'*
CVSROOT is set to ":pserver:myname@myserver:/E//CVS/repository"
Again, when exporting CVSROOT from command line and using +cvs co+ everything is fine and also Eclipse3 is happy with the setup.
Anyone a clue?
Cheers
Mobi.Is there a UNC path you could use?
What are you using for a CVS server? Are you just using CVS and pointing it at a shared path? You can run CVSNT on a Windows server and it will provide a decent CVSROOT. You can also try running CVSNT on the Mac (I do), but I don't know if it would help if you aren't running CVSNT on Windows. It might handle that path better, I don't know.
Also, I don't remember if Xcode 3 uses its own internal CVS code or not. I know they have made changes in CVS, and not for the better. Look at your SCM settings and see if you can specify an external CVS client to use. Back in Xcode 2.5, they recommended using "/usr/bin/ocvs" if you had problems. The 'o' was for obsolete. It wasn't really obsolete though. Apple decided as of Xcode 2.5 to start using CVS wrappers again like it was 1997. I don't know what they are doing currently. I switched to CVS-NT and didn't look back. Now I only have random "file is in the way" errors in Xcode. -
Xcode SIGABRT error??
Hello,
I was in the storyboard backing buttons that connect to different view controllers, and when I ran it in the simulator and pressed on the button, It gave me an error with SIGABRT. How do I fix this?Your app is using auto layout, which was introduced in iOS 6. Your iPhone is running iOS 5, which doesn't support auto layout. That's why the code works on your iPad, but not your iPhone.
If you want your app to work on both devices you have to turn off layout and set your app's deployment target to iOS 5. To turn off auto layout, select your xib file from the project navigator. Open the file inspector by choosing View > Utilities > Show File Inspector. Deselect the Use Auto Layout checkbox.
To change the deployment target, select your project from the project navigator to open the project editor. Select your project from the left side of the project editor. Click the Info button at the top of the editor. Choose iOS 5.0 from the iOS Deployment Target combo box. -
Am making an iPhone app and I am new to Xcode and IOS programming - whenever I run the app in the simulator and tap on the button which sends me to the next view it crashes and gives me this message:
In the debugger it gives me this:
2014-02-26 19:42:25.396 ShoeForYouStoryboard[2452:70b] -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x8c79730
2014-02-26 19:42:25.400 ShoeForYouStoryboard[2452:70b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x8c79730'
*** First throw call stack:
Thanks if you can help.Your app is using auto layout, which was introduced in iOS 6. Your iPhone is running iOS 5, which doesn't support auto layout. That's why the code works on your iPad, but not your iPhone.
If you want your app to work on both devices you have to turn off layout and set your app's deployment target to iOS 5. To turn off auto layout, select your xib file from the project navigator. Open the file inspector by choosing View > Utilities > Show File Inspector. Deselect the Use Auto Layout checkbox.
To change the deployment target, select your project from the project navigator to open the project editor. Select your project from the left side of the project editor. Click the Info button at the top of the editor. Choose iOS 5.0 from the iOS Deployment Target combo box. -
Error installing XCode 4.2 on OSX 10.7.3
Hello everybody,
I'm trying to install XCode 4.2 on Lion 10.7.1 and got the following error on Console:
14/04/12 19:34:30,280
Installer
@(#)PROGRAM:Install PROJECT:Install-686.3
14/04/12 19:34:30,280
Installer
@(#)PROGRAM:Installer PROJECT:Installer-530
14/04/12 19:34:30,280
Installer
Hardware: MacBookPro8,2 @ 2.20 GHz (x 8), 8192 MB RAM
14/04/12 19:34:30,280
Installer
Running OS Build: Mac OS X 10.7.3 (11D50d)
14/04/12 19:34:30,314
Installer
Xcode Installation Log
14/04/12 19:34:30,314
Installer
Opened from: /Volumes/Xcode/Xcode.mpkg
14/04/12 19:34:49,016
Installer
IFJS: *** exception: ReferenceError: Can't find variable: SDKPresent
14/04/12 19:34:49,032
defaults
The domain/default pair of (com.apple.iPhoneSDKInstaller, showAdvancedInstaller) does not exist
14/04/12 19:34:49,084
Installer
IFJS: *** exception: ReferenceError: Can't find variable: SDKPresent
14/04/12 19:34:53,516
Installer
InstallerStatusNotifications plugin loaded
14/04/12 19:34:58,400
Installer
================================================================================
14/04/12 19:34:58,400
Installer
User picked Custom Install
14/04/12 19:34:58,400
Installer
Choices selected for installation:
14/04/12 19:34:58,400
Installer
Install: "Xcode"
14/04/12 19:34:58,400
Installer
Install: "Essentials" at path "//Developer/"
14/04/12 19:34:58,400
Installer
Install: "Xcode Toolset"
14/04/12 19:34:58,401
Installer
Install: "iOS SDK"
14/04/12 19:34:58,402
Installer
Install: "System Tools"
14/04/12 19:34:58,402
Installer
Install: "UNIX Development"
14/04/12 19:34:58,403
Installer
================================================================================
14/04/12 19:35:02,527
Installer
================================================================================
14/04/12 19:35:02,527
Installer
User picked Standard Install
14/04/12 19:35:02,527
Installer
Choices selected for installation:
14/04/12 19:35:02,527
Installer
Install: "Xcode"
14/04/12 19:35:02,527
Installer
Install: "Essentials" at path "//Developer/"
14/04/12 19:35:02,527
Installer
Install: "Xcode Toolset"
14/04/12 19:35:02,528
Installer
Install: "iOS SDK"
14/04/12 19:35:02,529
Installer
Install: "System Tools"
14/04/12 19:35:02,529
Installer
Install: "UNIX Development"
14/04/12 19:35:02,530
Installer
================================================================================
14/04/12 19:35:02,644
Installer
Configuring volume "AppleSSD"
14/04/12 19:35:02,657
Installer
Free space on "AppleSSD": 87,22 GB (87223255040 bytes).
14/04/12 19:35:02,657
Installer
Create temporary directory "/var/folders/bb/2w5n07g55mz_8xj4hxyspggr0000gn/T//Install.309EJlAkQ"
14/04/12 19:35:02,661
Installer
IFPKInstallElement (29 packages)
14/04/12 19:35:02,770
Installer
Failed install preflight: Error Domain=PKInstallErrorDomain Code=102 "The package “DeveloperTools.pkg” is untrusted." UserInfo=0x7fe8442fa520 {NSLocalizedDescription=The package “DeveloperTools.pkg” is untrusted., NSURL=../Packages/DeveloperTools.pkg -- file://localhost/Volumes/Xcode/Xcode.mpkg/, PKInstallPackageIdentifier=com.apple.pkg.DeveloperToolsLeo, NSUnderlyingError=0x7fe846807e90 "The operation couldn’t be completed. CSSMERR_TP_CERT_EXPIRED"}
14/04/12 19:35:02,774
Installer
Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
14/04/12 19:35:02,930
Installer
IFDInstallController 41462D30 state = 7
14/04/12 19:35:02,931
Installer
Displaying 'Install Failed' UI.
14/04/12 19:35:02,934
Installer
'Install Failed' UI displayed message:'An unknown installation error occurred.
The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.
14/04/12 19:35:02,934
Installer
The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
It says: "The package “DeveloperTools.pkg” is untrusted." (???... Isn't it from Apple???)
How could I solve this issue?
This is the Error Screen:
Coul'd someone, please, help me?!?
Thanks in advance!First of all, thank you for the reply.
Undertood I've downloaded the newer version and it installed fine.
Thanks a lot! -
Compiled Error in Xcode for iphone game and other questions
Dear all,
Hi, I am a newbie of xcode and objective-c and I have a few questions regarding to the code sample of a game attached below. It is written in objective C, Xcode for iphone4 simulator. It is part of the code of 'ball bounce against brick" game. Instead of creating the image by IB, the code supposes to create (programmatically) 5 X 4 bricks using 4 different kinds of bricks pictures (bricktype1.png...). I have the bricks defined in .h file properly and method written in .m.
My questions are for the following code:
- (void)initializeBricks
brickTypes[0] = @"bricktype1.png";
brickTypes[1] = @"bricktype2.png";
brickTypes[2] = @"bricktype3.png";
brickTypes[3] = @"bricktype4.png";
int count = 0;`
for (int y = 0; y < BRICKS_HEIGHT; y++)
for (int x = 0; x < BRICKS_WIDTH; x++)
- Line1 UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]];
- Line2 bricks[x][y] = [[[UIImageView alloc] initWithImage:image] autorelease];
- Line3 CGRect newFrame = bricks[x][y].frame;
- Line4 newFrame.origin = CGPointMake(x * 64, (y * 40) + 50);
- Line5 bricks[x][y].frame = newFrame;
- Line6 [self.view addSubview:bricks[x][y]]
1) When it is compiled, error "ImageCache undeclared" in Line 1. But I have already added the png to the project. What is the problem and how to fix it? (If possible, please suggest code and explain what it does and where to put it.)
2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
brickTypes[count ++ % 4]
For instance, returns one of the file name bricktype1.png to the image object? If true, what is the max value of "count", ends at 5? (as X increments 5 times for each Y). But then "count" will exceed the max 'index value' of brickTypes which is 3!
3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
5) What does Line 4 do?
Thanks
NorthHi North -
macbie wrote:
1) When it is compiled, error "ImageCache undeclared" in Line 1. ...
UIImage *image = [ImageCache loadImage:brickTypes[count++ % 4]]; // Line 1
The compiler is telling you it doesn't know what ImageCache refers to. Is ImageCache the name of a custom class? In that case you may have omitted #import "ImageCache.h". Else if ImageCache refers to an instance of some class, where is that declaration made? I can't tell you how to code the missing piece(s) because I can't guess the answers to these questions.
Btw, if the png file images were already the correct size, it looks like you could substitute this for Line 1:
UIImage *image = [UIImage imageNamed:brickTypes[count++ % 4]]; // Line 1
2) How does the following in Line 1 work? Does it assign the element (name of .png) of brickType to image?
brickTypes[count ++ % 4]
Though you don't show the declaration of brickTypes, it appears to be a "C" array of NSString object pointers. Thus brickTypes[0] is the first string, and brickTypes[3] is the last string.
The expression (count++ % 4) does two things. Firstly, the trailing ++ operator means the variable 'count' will be incremented as soon as the current expression is evaluated. Thus 'count' is zero (its initial value) the first time through the inner loop, its value is one the second time, and two the third time. The following two code blocks do exactly the same thing::
int index = 0;
NSString *filename = brickTypes[index++];
int index = 0;
NSString *filename = brickTypes[index];
index = index + 1;
The percent sign is the "modulus operator" so x%4 means "x modulo 4", which evaluates to the remainder after x is divided by 4. If x starts at 0, and is incremented once everytime through a loop, we'll get the following sequence of values for x%4: 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, ...
So repeated evaluation of (brickTypes[count++ % 4]) produces the sequence: @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", @"bricktype3.png", @"bricktype4.png", @"bricktype1.png", @"bricktype2.png", ...
3) In Line2, does the image object which is being allocated has a name and linked with the .png already at this line *before* it is assigned to brick[x][y]?
Line 2 allocs an object of type UIImageView and specifies the data at 'image' as the picture to be displayed by the new object. Since we immediately assign the address of the new UIImageView object to an element of the 'bricks' array, that address isn't stored in any named variable.
The new UIImageView object is not associated with the name of the png file from which its picture originated. In fact the UIImage object which inited the UIImageView object is also not associated with that png filename. In other words, once a UIImage object is initialized from the contents of an image file, it's not possible to obtain the name of that file from the UIImage object. Note when you add a png media object to a UIImageView object in IB, the filename of the png resource will be retained and used to identify the image view object. But AFAIK, unless you explicitly save it somewhere in your code, that filename will not be available at run time.
4) What do Line3 and Line5 do? Why newFrame on left in line3 but appears on right in Line5?
5) What does Line 4 do?
In Line 2 we've set the current element of 'bricks' to the address of a new UIImageView object which will display one of the 4 brick types. By default, the frame of a UIImageView object is set to the size of the image which initialized it. So after Line 2, we know that frame.size for the current array element is correct (assuming the image size of the original png file was what we want to display, or assuming that the purpose of [ImageCache loadImage:...] is to adjust the png size).
Then in Line 3, we set the rectangle named newFrame to the frame of the current array element, i.e. to the frame of the UIImageView object whose address is stored in the current array element. So now we have a rectangle whose size (width, height) is correct for the image to be displayed. But where will this rectangle be placed on the superview? The placement of this rectangle is determined by its origin.
Line 4 computes the origin we want. Now we have a rectangle with both the correct size and the correct origin.
Line 5 sets the frame of the new UIImageView object to the rectangle we constructed in Lines 3 and 4. When that object is then added to the superview in Line 6, it will display an image of the correct size at the correct position.
- Ray -
Hey there,
I just got the following error message in XCode:
Uncaught Exception:
* -[XCActionManager buildAndGo:]: unrecognized selector sent to instance 0x2883bf0
Stack Backtrace:
The stack backtrace has been logged to the console.
I think is is related to a recurring problem I've been having where my application will be working fine, and compiling fine, and then randomly when I run it it will give me a black screen on the simulator, and throw a pile of errors in the console. The thing that strikes me as very strange about this is if I revert to a previous snapshot it STILL doesn't work. I suspect that this might have something to do with when Time Machine is running, and last time it happened I turned off Time Machine and then "Touched" all my project files, and it got better, but then it stopped working again 10 minutes later...
Any advice/input on what may be happening?
I'm thinking of reinstalling the developer tools, unless someone has a tip on what this might be. While it's possible that it's some code I'm writing, or some corrupted file, I wouldn't know how to go about tracking it down...Welcome to Apple Discussions, Zen-X!
For this question, you might want to try the Free Pascal discussion boards:
http://community.freepascal.org:10000/bboards/ -
Appstore Error Downloading Xcode 4.2
Have made many attempts at downloading Xcode 4.2 from Appstore but always fails with message "Error has occured". I've trolled tons of forums on Apple and other sites and attempted just about all remedies I could find from new DNS's, Clearing Cache, Clearing Preferences, differnt modems etc. Always comes back to the error on the screen shot. Can still download other apps from the store with no problem. Just seems to be Xcode.
01> Click to install then says "Waiting"
02> Go to "Purchases and shows it's Paused, hit resume
03> Says downlading 0.1/8G but never downloads a thing
04 Then error message
Any ideas as to why I can't download or fixes I can try. Frustrated and any help is greatly appreciated. Thanks...MilesFirst of all, thank you for the reply.
Undertood I've downloaded the newer version and it installed fine.
Thanks a lot! -
Internal Checkout Error using Xcode Continuous Build Service
I'm trying to use the new Xcode service in Mavericks' Server Version 3 to setup continuous build for a git repository on BitBucket. I've been unable to get it to work successfully. Currently, The Build Agent Logs section shows the following error:
Oct 30 10:02:11 Robot2.local xcsbuildd[72534] <Debug>: [CSRemoteServiceProxy.m:79 7a566310 +0ms] Received successful response.
Oct 30 10:02:11 Robot2.local xcsbuildd[72534] <Info>: [CSConfig.m:55 7a566310 +0ms] Reading plist at /Library/Server/Wiki/Config/collabd.plist
Oct 30 10:02:11 Robot2.local xcsbuildd[72534] <Debug>: [XCSBuildHelper.m:97 7a566310 +0ms] Updating bot run with GUID 7163a252-b3c2-4fca-b9e3-d6128dbb9db4
Oct 30 10:02:11 Robot2.local xcsbuildd[72534] <Debug>: [XCSBuildHelper.m:102 7a566310 +0ms] Updating bot run (7163a252-b3c2-4fca-b9e3-d6128dbb9db4): {
guid = "7163a252-b3c2-4fca-b9e3-d6128dbb9db4";
status = failed;
subStatus = "internal-checkout-error";
Does anyone know what this error means or how to get more information about what's going wrong?
Perhaps relevant: under the Source Control Logs section, it looks like the checkout worked fine:
Checking out files: 100% (5570/5570), done.
done
SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts
SSH strict host checking is disabled (you can enable this by editing the SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist
Untrusted HTTPS certificates is enabled (you can disable this by editing the TrustSelfSignedSSLCertificates key in /Library/Server/Xcode/Config/xcsbuildd.plist
9373dd12aae68843938144663d4a1c578481447d refs/heads/master
SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts
SSH strict host checking is disabled (you can enable this by editing the SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist
Untrusted HTTPS certificates is disabled (you can enable this by editing the TrustSelfSignedSSLCertificates key in /Library/Server/Xcode/Config/xcsbuildd.plist
The SSH lines seem to be informational rather than indicating an error. However, I've tried changing the mentioned keys without any effect, though note that Xcode says that TrustSelfSignedSSLCertificates is enabled on one line and disabled on a later line, referring to the same config file in both cases.I just had the same problem, and there is a number of things you can check:
Make sure the specified branch is pushed to the repository
Make sure the scheme you selected is shared
Make sure the scheme info is pushed to the repository
In my case, someone put `xcshareddata` in .gitignore, so the scheme I selected wasn't available to the bot.
Hope this helps someone. -
I'm trying to install the latest XCode from the App Store on a used MacBook Pro running OS X Lion with all the latest updates. The app appears to download then I get a message "An error occurred while extracting files from the package "mzm.rdaenqgx.pkg"
Any ideas? I've retried several times over both my wireless network and connecting the Mac to the wireless router via Cat5. Both have the same result.First of all, thank you for the reply.
Undertood I've downloaded the newer version and it installed fine.
Thanks a lot!
Maybe you are looking for
-
LCD flickering problem in HP 15-S005TX while watching videos
LCD display flickers on top while watching any video. In other applications it is working correctly or undetectable. Flickering is not continuous. How to resolve it.
-
AS2, Flash 8 and opening pdf files
Hi all, I am using Flash 8, Actionscript 2, to open pdf files from a projector. Everything is fine if I use 'FreeMX' and the computer has Acrobat 5, 6, 7 installed. But it fails to work if the computer has Adobe Reader 8 installed - the pdf document
-
Address Book Archive Preferences?!?
After a nasty crash of Address Book and other issues, I ultimately upgraded to 10.5 and am now up to 10.5.5 with all things going smoothly. The crash occurred when using PocktMac for BlackBerry Sync (I had not done my addresses in a while - the calen
-
How to get audio to an overhead projector from iPad
Hello All. Has anyone figured out how to get audio from ipad to an overhead projector? I know I could mirror if I had HD, but I do not have HD at work.
-
What is NMDB and why does it want to connect to netbios?
Only lately have I been getting a connection warning for this... what is it? Anyone know? e