CSNotificationView: Error: -[NSBundle initWithURL:]: nil URL argument

There’s currently a problem with finding the right bundle when getting the images in imageForStyle. My app crashed due to the error mentioned in the title.

I’m using XCode 6.1 GM release.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

IF you are not using cocoaPods, replace + (UIImage*)imageForStyle:(CSNotificationViewStyle)style in CSNotificationView.m as below.

  • (UIImage_)imageForStyle:(CSNotificationViewStyle)style { UIImage_ matchedImage = nil; switch (style) { case CSNotificationViewStyleSuccess: matchedImage = [UIImage imageNamed:@“checkmark”]; break; case CSNotificationViewStyleError: matchedImage = [UIImage imageNamed:@“exclamationMark”]; break; default: break; } return matchedImage; }

make sure there is a directory named “Resources” is available with images, “checkmark” and “exclamationMark”.