IOS开发之 [[NSBundle mainBundle] infoDictionary]

NSBundle* mainBundle = [NSBundle mainBundle];
NSDictionary* infoDictionary =  [mainBundle infoDictionary];
   NSLog(@"infoDictionary:%@ ",  
infoDictionary );

2012-01-11 10:53:46.765 Demo0109[1389:f503] infoDictionary:{

    CFBundleDevelopmentRegion = English;

    CFBundleDisplayName = Demo0109;

    CFBundleExecutable = Demo0109;

    CFBundleExecutablePath = "/Users/sanpintian/Library/Application Support/iPhone Simulator/4.3.2/Applications/C61C463E-41DE-46B5-9DBB-74AE189BD729/Demo0109.app/Demo0109";

    CFBundleIconFile = "icon.png";

    CFBundleIconFiles =     (

        "icon.png",

        "[email protected]",

        "icon-72.png"

    );

    CFBundleIdentifier = "com.jsq.Demo0109";

    CFBundleInfoDictionaryVersion = "6.0";

    CFBundleInfoPlistURL = "Info.plist -- file://localhost/Users/sanpintian/Library/Application%20Support/iPhone%20Simulator/4.3.2/Applications/C61C463E-41DE-46B5-9DBB-74AE189BD729/Demo0109.app/";

    CFBundleName = Demo0109;

    CFBundlePackageType = APPL;

    CFBundleSignature = "????";

    CFBundleSupportedPlatforms =     (

        iPhoneSimulator

    );

    CFBundleVersion = "1.0";

    DTPlatformName = iphonesimulator;

    DTSDKName = "iphonesimulator4.3";

    LSRequiresIPhoneOS = 1;

    NSBundleInitialPath = "/Users/sanpintian/Library/Application Support/iPhone Simulator/4.3.2/Applications/C61C463E-41DE-46B5-9DBB-74AE189BD729/Demo0109.app";

    NSBundleResolvedPath = "/Users/sanpintian/Library/Application Support/iPhone Simulator/4.3.2/Applications/C61C463E-41DE-46B5-9DBB-74AE189BD729/Demo0109.app";

    UIDeviceFamily =     (

        1,

        2

    );

    UISupportedInterfaceOrientations =     (

        UIInterfaceOrientationPortrait

    );

}

 infoDictionary 包含了项目中几乎所有的基本信息,SDK版本,项目名称等。

你可能感兴趣的:(ios,c,File)