獲取infoDictionary中某個(gè)key對(duì)應(yīng)的值的方法
[[[NSBundle mainBundle] infoDictionary] valueForKey:@"key"];
或
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"key"];
應(yīng)用名
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
版本號(hào)
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
build號(hào)
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
Bundle Id
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"];
版權(quán)聲明:出自MajorLMJ技術(shù)博客的原創(chuàng)作品 ,轉(zhuǎn)載時(shí)必須注明出處及相應(yīng)鏈接百匆!