Corrected wrong output path passed to actool for Apps. #1556

Merged
merged 3 commits into from Nov 6, 2013

3 participants

@fluidsonic

CocoaPods' new xcassets feature broke our projects because its copy resource script fails to run.
The output directory for actool is wrong.

Current output directory:
"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.${WRAPPER_EXTENSION}"

But correct would be:
"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}"

Reason: WRAPPER_NAME is defined as ${PRODUCT_NAME}.${WRAPPER_SUFFIX}, but we override WRAPPER_NAME for our projects (which is completely legal to do ;).

Even better might be:
"${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"

But the Xcode Build Setting Reference isn't accurate about the variable's default values for Apps so I have no idea if we can rely on UNLOCALIZED_RESOURCES_FOLDER_PATH.

For example we observed that UNLOCALIZED_RESOURCES_FOLDER_PATH equals $WRAPPER_NAME while the documentation states that its default value is something like $WRAPPER_NAME/Contents/Contents/Resources.

@coveralls

Coverage Status

Coverage remained the same when pulling e1eeed2 on Widgetlabs:fix-actool-wrapper-name into 2095888 on CocoaPods:master.

@alloy
CocoaPods member

Seems like a clear case to me, thanks for the work!

Even better might be: "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"

For example we observed that UNLOCALIZED_RESOURCES_FOLDER_PATH equals $WRAPPER_NAME while the documentation states that its default value is something like $WRAPPER_NAME/Contents/Contents/Resources.

You’re right, this should use the UNLOCALIZED_RESOURCES_FOLDER_PATH setting. This will only be different from the app bundle path on OS X, though, on iOS this will point to the same path as the app bundle, because iOS don’t have a separate Resources directory.

Finally, can you add a CHANGELOG entry?

@coveralls

Coverage Status

Coverage remained the same when pulling 1004d47 on Widgetlabs:fix-actool-wrapper-name into 2095888 on CocoaPods:master.

@fluidsonic

Okay, now using UNLOCALIZED_RESOURCES_FOLDER_PATH and updated the CHANGELOG.

I'll also make a pull request to update the specs.

@fluidsonic fluidsonic referenced this pull request in CocoaPods/cocoapods-integration-specs Nov 6, 2013
Merged

Corrected wrong output path passed to actool (see CocoaPods #1556) #3

@alloy
CocoaPods member

Great, thanks!

@alloy alloy merged commit f3629b4 into CocoaPods:master Nov 6, 2013

1 check failed

Details default The Travis CI build failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment