獲取infoDictionary中某個key對應的值的方法
[[[NSBundle mainBundle] infoDictionary] valueForKey:@"key"];
或
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"key"];
應用名
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
版本號
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
build號
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
Bundle Id
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleIdentifier"];
版權聲明:出自MajorLMJ技術博客的原創作品 ,轉載時必須注明出處及相應鏈接!