Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I needed all files in subdirectories, apart from lproj directories, to be flat in the .app bundle. The assets were in this structure:</p> <pre><code>${assetsDir}/${targetCode}/ Icon.png en.lproj ja.lproj ... *.lproj resources{$targetCode/ Target.plist audio/Audio.plist *.mp3 </code></pre> <p>I added a Run Script build phase prior to "Copy Bundle Resources" with something similar to following:</p> <pre><code>COPY_COMMAND="$DEVELOPER_LIBRARY_DIR/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp" copyPNGCommand="$PLATFORM_DEVELOPER_LIBRARY_DIR/Xcode/Plug-ins/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng" lprojDirectories=$( find ${assetsDirectory}/${targetCode} -type d -name *lproj ) for lprojDirectory in $lprojDirectories; do "$COPY_COMMAND" -exclude .DS_Store -exclude .svn -resolve-src-symlinks "$lprojDirectory" "$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH" done MP3s=$( find ${assetsDirectory}/${targetCode}/resources${targetCode} -type f -name *.mp3 ) for MP3 in $MP3s; do filename=$( basename "$PNG" ) "$COPY_COMMAND" -resolve-src-symlinks "$MP3" "$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH" done PNGs=$( find ${assetsDirectory}/${targetCode}/resources${targetCode} -type f -name *.png ) for PNG in $PNGs; do if [ -x "$copyPNGCommand" ]; then filename=$( basename "$PNG" ) "$copyPNGCommand" -compress "" "$PNG" "$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/$filename" else "$COPY_COMMAND" -resolve-src-symlinks "$PNG" "$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH" fi done Plists=$( find ${assetsDirectory}/${targetCode}/resources${targetCode} -type f -name '*.plist' ) for Plist in $Plists; do "$XCODE_APP_SUPPORT_DIR/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copyplist" --convert binary1 "$Plist" --outdir "$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH" done </code></pre> <p>Note: copypng only works when building for the device, hence the test</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload