swift - UUIDString unexpectedly found nil -


i working on piece of code using corelocation , clbeaconregion, i'm receiving error:

fatal error: unexpectedly found nil while unwrapping optional value

i want create region variable holding clbeaconregion so:

let region = clbeaconregion(proximityuuid: nsuuid(uuidstring: "am_2015-06-10")!, identifier: "anymorning") 

a bit later in code, calling:

locationmanager.startrangingbeaconsinregion(region) 

and when launch app, receive above error. right way solve this?

"am_2015-06-10" not valid uuidstring! nsuuid(uuidstring: "am_2015-06-10")! crash application

uuids (universally unique identifiers), known guids (globally unique identifiers) or iids (interface identifiers), 128-bit values.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -