i'm making dictionary app , i'm re-parsing through json file contains entries of dictionaries every time open app , saving coredata. wondering if there function in swift runs once when app downloaded , doesn't run again.
what can set nsuserdefaults check whether firstrun or not
here code
let firstrun = nsuserdefaults.standarduserdefaults().boolforkey("firstrun") bool if !firstrun { //run function nsuserdefaults.standarduserdefaults().setbool(true, forkey: "firstrun") }
Comments
Post a Comment