Listing 1 (From dev doc of apple.com)  A simple framework bundle

MyFramework.framework/
    MyFramework  -> Versions/Current/MyFramework
    Resources    -> Versions/Current/Resources
    Versions/
        A/
            MyFramework
            Resources/
                English.lproj/
                    InfoPlist.strings
                Info.plist
        Current  -> A

 

Listing 2 (From dev doc of apple.com)  A framework with multiple versions

MyFramework.framework/
    MyFramework  -> Versions/Current/MyFramework
    Resources    -> Versions/Current/Resources
    Versions/
        A/
            MyFramework
            Resources/
                English.lproj/
                    InfoPlist.strings
                Info.plist
        B/
            MyFramework
            Resources/
                English.lproj/
                    InfoPlist.strings
                Info.plist
        Current  -> B

Listing 3 (From dev doc of apple.com)  A framework with additional resource types

MyFramework.framework/
    Headers      -> Versions/Current/Headers
    MyFramework  -> Versions/Current/MyFramework
    Resources    -> Versions/Current/Resources
    Versions/
        A/
            Headers/
                MyHeader.h
            MyFramework
            Resources/
                English.lproj/
                    Documentation
                    InfoPlist.strings
                Info.plist
        B/
            Headers/
                MyHeader.h
            MyFramework
            Resources/
                English.lproj/
                    Documentation
                    InfoPlist.strings
                Info.plist
        Current  -> B

 

Table 1  Framework configuration keys

Key

Description

CFBundleName

The framework display name

CFBundleIdentifier

The framework identifier (as a Java-style package name)

CFBundleVersion

The framework version

CFBundleSignature

The framework signature

CFBundlePackageType

The framework package type (which is always 'FMWK')

NSHumanReadableCopyright

Copyright information for the framework

CFBundleGetInfoString

A descriptive string for the Finder

关于Info.plist文件,一个现实中的例子如下:

>>> a =biplist.readPlist("Info.plist")
>>> print json.dumps(a,indent=4)

{

    "CFBundleInfoDictionaryVersion": "6.0", 

    "NSHumanReadableCopyright": "Copyright \u00a9 2013~2014 xjump. All rights reserved.", 

    "CFPlugInTypes": {

        "00000000-0000-0000-0000-000000000000": [

            "00000000-0000-0000-0000-000000000000"

        ]

    }, 

    "DTXcodeBuild": "6A317", 

    "CFBundleSupportedPlatforms": [

        "iPhoneOS"

    ], 

    "CFBundleIdentifier": "me.xjump.XRemoteShell", 

    "DTSDKName": "iphoneos8.0", 

    "DTSDKBuild": "12A365", 

    "CFBundleShortVersionString": "1.0", 

    "BuildMachineOSBuild": "13F34", 

    "CFBundleExecutable": "XRemoteShell", 

    "MinimumOSVersion": "5.1.1", 

    "CFBundleVersion": "1", 

    "UIDeviceFamily": [

        1, 

        2

    ], 

    "DTPlatformBuild": "12A365", 

    "DTXcode": "0600", 

    "CFPlugInFactories": {

        "00000000-0000-0000-0000-000000000000": "MyFactoryFunction"

    }, 

    "CFBundleDevelopmentRegion": "English", 

    "DTPlatformName": "iphoneos", 

    "CFPlugInUnloadFunction": "", 

    "CFPlugInDynamicRegistration": "NO", 

    "DTCompiler": "com.apple.compilers.llvm.clang.1_0", 

    "CFBundleSignature": "????", 

    "CFPlugInDynamicRegisterFunction": "", 

    "DTPlatformVersion": "8.0", 

    "CFBundleName": "XRemoteShell", 

    "CFBundlePackageType": "BNDL"

}

 

TODO: 使用python脚本,打包.a,.h文件,生成一个Framework。

 

参考:

http://stackoverflow.com/questions/22211674/plistlib-cant-read-safaris-plist-file

https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html#//apple_ref/doc/uid/20002253-BAJEJJAB