2011-07-21 87 views

回答

20
NSDictionary* infoDict = [[NSBundle mainBundle] infoDictionary]; 
NSString* versionNum = [infoDict objectForKey:@"CFBundleVersion"]; 
NSString *appName = [infoDict objectForKey:@"CFBundleDisplayName"]; 
NSString *text = [NSString stringWithFormat:@"%@ %@",appName,versionNum]; 

您可以使用此代碼發送應用程序名稱和版本號。

0
[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]] 
相關問題