When I click the button for nextIdea(), I get an error that highlights int retVal = UIApplicationMain(argc, argv, nil, nil)
and says SIGABRT
- (IBAction)nextIdea:(id)sender
{
int index = arc4random() % ideaArray.count;
ideaTextView.text = [NSString stringWithFormat:@"%@",[ideaArray objectAtIndex:index]];
}
- (void)viewDidLoad
{
[super viewDidLoad];
PFQuery *query = [PFQuery queryWithClassName:@"Ideas"];
[query whereKey:@"Hidden" equalTo:@"entry"];
[query getObjectWithId:@"Idea"];
ideaArray = [[[NSArray alloc] init] autorelease];
// ideaArray = [query findObjects];
ideaArray = [NSArray arrayWithObjects:@"one", @"two", nil];
}
I've been trying to figure this out for hours but have no luck.
ideaArray is declared in the header and synthesized btw
Exact error message:
[15842:f803] application:didFailToRegisterForRemoteNotificationsWithError: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo=0x6a5e500 {NSLocalizedDescription=remote notifications are not supported in the simulator}
When on the device, error reads:
Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x19f4f0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}