I get the warning Enumeration value 'SHKShareTypeUndefined' not handled in switch in the below code. I bolded the relevant line and pointer:
+ (NSArray *)favoriteSharersForType:(SHKShareType)type
{
NSArray *favoriteSharers = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithFormat:@"%@%i", SHK_FAVS_PREFIX_KEY, type]];
// set defaults
if (favoriteSharers == nil)
{
switch (type)
{
case SHKShareTypeURL:
favoriteSharers = [NSArray arrayWithObjects:@"SHKTwitter",@"SHKFacebook",@"SHKReadItLater",nil];
break;
case SHKShareTypeImage:
favoriteSharers = [NSArray arrayWithObjects:@"SHKMail",@"SHKFacebook",@"SHKCopy",nil];
break;
case SHKShareTypeText:
favoriteSharers = [NSArray arrayWithObjects:@"SHKMail",@"SHKTwitter",@"SHKFacebook", nil];
break;
case SHKShareTypeFile:
favoriteSharers = [NSArray arrayWithObjects:@"SHKMail", nil];
break;
case SHKShareTypeUndefined:
break;
}
// Save defaults to prefs
[self setFavorites:favoriteSharers forType:type];
}
This warning is in ShareKit and I am not sure how to fix it.
Thanks!