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

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -