Invalid Swift Support - Files don’t match
Solution 1:
Same problem here. I think this is most likely a bug of the Developer Tools, related to the Bitcode.
I just found the workaround for this.
- Archive your app with new build number :(
- Find the archive (.xcarchive file) in Finder from Organizer “Show in Finder”
- Open the package and find directories like
Products/Applications/YourApp.ipa/Frameworks/
andSwiftSupport/iphoneos/
-
Copy all
libswiftXxx.dylib
files fromSwiftSupport/iphoneos/
intoProducts/Applications/YourApp.ipa/Frameworks/
and overwrite - Now, Upload to App Store from Organizer
With this process, I succeed in uploading my build. Now I’m waiting for review.
NOTE:
I’m using CocoaPods, and the ENABLE_BITCODE
option was NO.
Solution 2:
Edit: CocoaPods 0.39.0 has been released which fixes this issue!
As @orkenstein mentioned, there is a simpler solution by commenting out some code in Pod-frameworks.sh
. I'm including a bit more details here.
In your Xcode project directory, open Pods/Target Support Files/Pods/Pods-frameworks.sh
Comment out the following lines:
# Embed linked Swift runtime libraries
local basename
basename="$(basename "$1" | sed -E s/\\..+// && exit ${PIPESTATUS[0]})"
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/${basename}.framework/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
=>
# Embed linked Swift runtime libraries
# local basename
# basename="$(basename "$1" | sed -E s/\\..+// && exit ${PIPESTATUS[0]})"
# local swift_runtime_libs
# swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/${basename}.framework/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
# for lib in $swift_runtime_libs; do
# echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
# rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
# code_sign_if_enabled "${destination}/${lib}"
# done
Save Pods-frameworks.sh
and you should be good to go!