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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -