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

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

Android M doze mode and "native" posix socket freezing up -