Hey guys,
I've been staring at this for a while, and I can't figure out what the problem is. The compiler is giving a warning:
warning: passing argument 1 of 'addObject' makes pointer from integer without a cast
On the [recipeIdArray addObject:currentRecipe.primaryKey]; line. I have tried it with and without casting, but it still complains. currentRecipe.primaryKey is of type NSInteger.
Thoughts?
Thanks,
Jason
- (void)saveCurrentMenu {
NSMutableArray *recipeIdArray = [[NSMutableArray alloc] initWithObjects:nil];
for (Recipe *currentRecipe in menu) {
[recipeIdArray addObject:currentRecipe.primaryKey];
}
[[NSUserDefaults standardUserDefaults] setObject:recipeIdArray forKey:kMenuArrayKey];
[[NSUserDefaults standardUserDefaults] synchronize];
}