トップ 最新 追記

Cocoa練習帳

iOS/iPhone/iPad/watchOS/tvOS/MacOSX/Android プログラミング, Objective-C, Cocoa, Swiftなど

2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|09|10|11|12|
2024|01|02|03|

2023-07-30 [macOS] Loadable Bundles

macOSとiOSの実行可能コードをパッケージ化する方法にバンドル構造というのがある。内容を簡単に説明すると実行可能コードとリソースをディレクトリは以下に配置し、そのディレクトリをパッケージ化された塊として扱うもので、アプリケーションはApplication Bundle、フレームワークはFramework Bundleと呼ばれる決められた構成となっている。

_ Application Bundle の例

MyApp.app
|-- MyApp
|-- MyAppIcon.png
|-- MySearchIcon.png
|-- Info.plist
|-- Default.png
|-- MainWindow.nib
|-- Settings.bundle
|-- MySettingsIcon.png
|-- iTunesArtwork
|-- en.lproj
|   `-- MyImage.png
`-- fr.lproj
    `-- MyImage.png

_ Framework Bundle の例

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

Loadable Bundleは動的にロード可能なパッケージで、.bundle や .plugin 等が suffix として使われている。

_ Loadable Bundle の例

MyLoadableBundle.bundle
`-- Contents
    |-- Info.plist
    |-- MacOS
    |   `-- MyLoadableBundle
    `-- Resources
        |-- Lizard.jpg
        |-- MyLoadableBundle.icns
        |-- en.lproj
        |   |-- MyLoadableBundle.nib
        |   `-- InfoPlist.strings
        `-- jp.lproj
            |-- MyLoadableBundle.nib
            `-- InfoPlist.strings

トップ 最新 追記