Posts

Post not yet marked as solved
6 Replies
Due to a bug in Xcode, an empty Frameworks and SwiftSupport folder might be emitted when performing the Archive operation. Itunes Connect will then reject the build. Removing the empty Frameworks folder and SwiftSupport folder after archiving will cause the build the be accepted by Itunes Connect. If your Frameworks folder is not empty, you might try the shell script below, which will copy certain items into the folders. Go to Organizer -> Archives -> Right Click -> Show In Finder -> Right Click -> Show Package Contents -> Navigate to Product, Applications, Your App.app -> Right Click -> Show Package Contents Now check if the Frameworks folder is empty. If it it, delete it and delete the SwiftSupport library which is higher up in the folder tree, directly inside the xcarchive folder. Now in Organizer, click Distribute app. This time the build should be accepted. If your Frameworks folder was not empty, then try the following shell script (please check the path variables before running): &#9;&#9;XCARCHIVE_PATH="/Users/<user>/Library/Developer/Xcode/Archives/<Put .xcarchive path here>" &#9;&#9;APP="/Users/<user>/Library/Developer/Xcode/Archives/<Put path to .app inside .xcarchive here" &#9;&#9;DEVELOPER_DIR=`xcode-select --print-path` &#9;&#9;if [ ! -d "${DEVELOPER_DIR}" ]; then &#9;&#9; echo "No developer directory found!" &#9;&#9; exit 1 &#9;&#9;fi &#9;&#9;echo "+ Adding SWIFT support (if necessary)" &#9;&#9;if [ -d "${APP}/Frameworks" ]; &#9;&#9;then &#9;&#9;&#9;&#9;mkdir -p "${TEMP_IPA_BUILT}/SwiftSupport" &#9;&#9;&#9;&#9;for SWIFT_LIB in $(ls -1 "${APP}/Frameworks/"); do &#9;&#9;&#9;&#9;&#9;&#9;echo "Copying ${SWIFT_LIB}" &#9;&#9;&#9;&#9;&#9;&#9;cp "${DEVELOPER_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos/${SWIFT_LIB}" "${XCARCHIVE_PATH}/SwiftSupport" &#9;&#9;&#9;&#9;done &#9;&#9;fi