Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

please help - fatal error #2

Closed
MikaTck opened this issue May 22, 2017 · 2 comments
Closed

please help - fatal error #2

MikaTck opened this issue May 22, 2017 · 2 comments
Assignees
Labels

Comments

@MikaTck
Copy link

MikaTck commented May 22, 2017

Hi,
I appreciate you doing this, I've been searching everywhere for something that looks good to me.

Unfortunately my app crashes when I try to put it to action.
I also ran your sample project to check if I was doing something wrong and it still crashes in the same line of code.
Could you help?

Thank you

file - BMPAnalyzer.swift
line 14 - completion!(Superpowered().offlineAnalyze(url))

log:
fatal error: unexpectedly found nil while unwrapping an Optional value

@Luccifer Luccifer added the bug label May 22, 2017
@Luccifer Luccifer self-assigned this May 22, 2017
@Luccifer
Copy link
Owner

Luccifer commented May 22, 2017

@MikaTck, thanks a lot for spotting the bug. To resolve it, please replace the code in BPMAnalizer.swift to:

public func getBpmFrom(_ url: URL, completion: ((String) -> ())?) -> String { guard let bpmString: String = Superpowered().offlineAnalyze(url) else {return "Error analizing BPM"} if completion != nil { completion!(bpmString) } return Superpowered().offlineAnalyze(url) }

Please tell me, if u have any other problems, appreciate any your question!
Also please inform me, if the problem resolved!

@MikaTck
Copy link
Author

MikaTck commented May 23, 2017 via email

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

No branches or pull requests

2 participants