Invalid Swift Support - Files don’t match
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.
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!
The fix for this issue has been merged and it is available on the latest CocoaPods version 0.39.0.beta.5
https://github.com/CocoaPods/CocoaPods/pull/4268
To get the latest version of CocoaPods run gem install cocoapods --pre
Alternatively, follow instructions for running unreleased features: http://guides.cocoapods.org/using/unreleased-features
Once you have the latest version of CocoaPods, run pod install
again.