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

Fatal error: Unexpectedly found nil while unwrapping an Optional value #29

Open
bbookman opened this issue Apr 3, 2018 · 1 comment

Comments

@bbookman
Copy link

bbookman commented Apr 3, 2018

Can you give me a workaround for this? I tried copying icomoon.ttf into various places in the Pod/. but that did not help

func registerFont(){
    let bundle = Bundle(for: PhotoEditorViewController.self)
    let url =  bundle.url(forResource: "icomoon", withExtension: "ttf")

// Fatal error: Unexpectedly found nil while unwrapping an Optional value
guard let fontDataProvider = CGDataProvider(url: url! as CFURL) else {
return
}

@jonchui
Copy link

jonchui commented Aug 11, 2018

sounds like your url was nil - check that you have icomoon.ttf in your xcode project

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