Skip to content

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

@snc001

Description

@snc001

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??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions