objective c - Getting app version is crash -
i having code app version , save nsdictionary :
    nsstring *version=[nsstring stringwithformat:@"%@",[[nsbundle mainbundle] objectforinfodictionarykey:@"cfbundleversion"]];      nslog(@"version%@",version); //prints right thing     nsmutabledictionary *dic;     [dic setvalue:version forkey:@"version"]; //crash      [dic setvalue:errors forkey:@"errors"]; //work   the error on crash :
setvalue:forundefinedkey:]: class not key value coding-compliant key version   can identify error ?
thanks lot .
i had allocate dictionary :
nsmutabledictionary *dic=[[nsmutabledictionary alloc]init];      
Comments
Post a Comment