もう一つの選択肢は、あなたの* .xibファイルを非グループディレクトリからメインバンドルにコピーできる「ビルド段階」の最後に実行スクリプトを作成することです。 xibファイルをコピーするだけでなく、ibtool
コマンドを使用して* .nibファイルにコンパイルする必要があります。以下は、私が使用しています私のスクリプトの例は次のとおりです。
# For some reason the tilde is causing problems with find
# so I am replacing the tilde with /Users/whoami
user=`whoami`
# We will find all non-nib files in this directory and copy them into the main bundle
find -L ${LW_ISHARE_PLATFORM_SRC/\~/\/Users\/$user}/lw-ishare-platform-nibs -type f -not -name ".*" -not -name "*.xib" | xargs -t -I {} cp {} ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/
export IBC_MINIMUM_COMPATIBILITY_VERSION=${IPHONEOS_DEPLOYMENT_TARGET}
#setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export XCODE_DEVELOPER_USR_PATH="/Developer/usr/bin/"
# Now compile all xib files into nib files
for each in `find -L ${LW_ISHARE_PLATFORM_SRC/\~/\/Users\/$user}/lw-ishare-platform-nibs -type f -name "*.xib"`
do
prefix=`basename "${each}" .xib`
${XCODE_DEVELOPER_USR_PATH}/ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${prefix}.nib ${each} --sdk ${SDKROOT}
done
exit 0
$LW_ISHARE_PLATFORM_SRC
は私のためのグローバルXCodeの変数であると私は$LW_ISHARE_PLATFORM_SRC/lw-ishare-platform-nibs
ディレクトリ内のすべての私*の.xibおよび関連リソースを配置しています。
${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}
は、「メインバンドル」へのパスです。