Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value #24

Open
snc001 opened this issue Jul 4, 2018 · 1 comment

Comments

@snc001
Copy link

snc001 commented Jul 4, 2018

I have tried using this library - runs great on the emulator.

Tried pushing it to the phone and I get this:

Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value

This is inside the ModernSearchBarIcon.swift

private func getImageFromBundle(name: String) -> UIImage { let podBundle = Bundle(for: ModernSearchBarIcon.self) if let url = podBundle.url(forResource: "ModernSearchBar", withExtension: "bundle") { let bundle = Bundle(url: url) return UIImage(named: name, in: bundle, compatibleWith: nil)! } return UIImage() }

Gives out the error at "return UIImage(named: name, in: bundle, compatibleWith: nil)!
"

Any resolution??

@AndrewMit
Copy link

Have encountered the same error at "return UIImage(named: name, in: bundle, compatibleWith: nil)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants