Invalid Swift Support - Swift 2.0 project for iOS 9, (Xcode build 7A220) - ios

My project on Swift 2.0 for iOS 9, (Xcode build 7A220) and I try upload the build to iTunesConnect for TestFlight, but a few minutes after uploading I receive an email:
Invalid Swift Support - The files libswiftCoreAudio.dylib,
libswiftCoreMedia.dylib, libswiftAVFoundation.dylib don’t match
/Payload/MyApp.app/Frameworks/libswiftCoreAudio.dylib,
/Payload/MyApp.app/Frameworks/libswiftCoreMedia.dylib,
/Payload/MyApp.app/Frameworks/libswiftAVFoundation.dylib. Make sure
the files are correct, rebuild your app, and resubmit it. Don’t apply
post-processing to
/Payload/MyApp.app/Frameworks/libswiftCoreAudio.dylib,
/Payload/MyApp.app/Frameworks/libswiftCoreMedia.dylib,
/Payload/MyApp.app/Frameworks/libswiftAVFoundation.dylib. Once these
issues have been corrected, you can then redeliver the corrected
binary.
What that means? Please help.

Do you use CocoaPods?
The problem might come from it if you are using Swift pods. To fix it you can edit Pods/Target Support Files/Pods/Pods-frameworks.sh and commenting the block after
# Embed linked Swift runtime libraries
More info:
Issue : github.com/CocoaPods/CocoaPods/issues/4188

I have faced this problem. My project was in objective C but when I submitted app to App store through Xcode 7 after successful submission of App, Build was in processing mode and I got email from iTunes that "Invalid Swift Support - The SwiftSupport folder is empty. Rebuild your app using the current public (GM) version of Xcode and resubmit it."
Solution: In Build setting of your Target Change Embedded Content Contains Swift Code to NO
After this when I submitted Build it get proceed with in 15 minutes. Hope This will help to someone

Related

Error on publish app to AppStore Xamarin.iOS build

Issue: Invalid Swift Support- The file libswiftAVFoundation.dylib doesn’t
I have tried to resolve my issue based on the following link. but still, I'm getting the issue after uploaded in App store. Please help me resolve this issue. I'm new for Xamarin.iOS
https://docs.google.com/document/d/1nWY-RK9oXsNnlca5eSvbH9tQejLnCjismHrSy8IuDFo/edit
Totally I have created two projects in Xamarin and works well in locally.
Project 1. Xamarin Sample Binding Project
- Here, I have included my own Swift SDK
Project 2. Xamarin Sample Demo Project
- Mapped the Binding project
Generated the iPA file:-
Created the IPA file for Project 2 in Xamarin. The IPA doesn't have the SwiftSupport folder. Then I have followed the above doc steps and export the IPA file using Xcode. I have extracted the IPA file and seen swiftSupport folder. After, I have submitted in the Appstore I'm getting the below issue.
AppStore Failed error message:-
Invalid Swift Support- The file libswiftAVFoundation.dylib doesn’t
have the correct code signature. Make sure you’re using the correct
signature, rebuild your app using the current public (GM) version of
Xcode, and resubmit it. Don’t just modify the code signature of
libswiftAVFoundation.dylib.
Finally, Luckily my app works fine. I have just removed all swift framework lib and added the Xamarin.Swift lib only from the Package. That's it.
Thank you Every one

Xcode 9.2 Upload to App Store fails with description length and invalid toolchain errors

I've read through a bunch of forums including here:
https://forums.developer.apple.com/thread/87862
and some Stack Overflow posts.
I have tried modifying my plist using the proposed solution of
find Products/ -name Info.plist -print0 | xargs -0n1 plutil -replace BuildMachineOSBuild -string 16A323
in the archive directory that I'm trying to load, and I'm still receiving the error below. I believe I have valid Xcode and Mac OS versions. I'm running Xcode 9.2 which was released today and High Sierra 10.13.1. Why does my upload fail with these errors and how can I fix it?
The errors in text (to make this post more searchable):
The following issues occurred while distributing your application.
⚠ iTunes Store Operation Failed
description length:2651858
⚠ iTunes Store Operation Failed
ERROR ITMS-90534: "Invalid Toolchain. New apps and app updates must be built with the public (GM) versions of Xcode 6 or later, macOS, and iOS SDK or later. Don't submit apps built with beta software including beta macOS builds."
Right-Click on the archive file (.xcarchive) > Show Package Contents > Products > Applications > Right-Click on the app file > Show Package Contents > Double-Click on Info.plist to edit it
Change value of DTXcodeBuild from 9C40b to 9C40
Re-submit and it will work
Edit/Disclaimer: this is just a trick to bypass the upload process, iTunesConnect still doesn't allow submission with 11.2 so this is not the right solution.
I started with several "iTunes store operation failures". While fixing the other errors, I keep trying to fix this "description length" error too - but it always failed.
So I solved all other errors first and suddenly this error was gone too.
I BELIEVE this error depends on other errors. The last error I fixed was called "Storyboard file not found")
Xcode 9.2
UPDATE:
Although my option may let you upload the package to iTunesConnect successfully, but may fail when you click Submit for Review.
Check this screenshot
Right-Click on the archive file (.xcarchive) > Show Package Contents > Products > Applications > Right-Click on the app file > Show Package Contents > Double-Click on Info.plist to edit it
Change DTXcodeBuild's value from 9C40b to 9C40 and it will work.
There is a discussion on this subject : https://forums.developer.apple.com/thread/93253
They advise to wait for the deployment of the new Xcode version number on the backend or come back to Xcode 9.1, it seems it works.
UPDATE : Change the DTXcodeBuild doesn't work
Hard Clean Product worked for me.
Hard clean the product by Command + Shift + Alt + K, then upload a new build to AppStore.
I hope this will work for you too.
Already Fixed, just try again to submit the app.
This issue was solved for me with installing the latest stable release of Xcode 9.2 (mac OSX Sierra 10.12.6)
I found a workaround it:
Download Xocde 9.1 from https://developer.apple.com/download/more/
Make a fresh archive then upload it. It worked for me.
P.S. I did not send for review but I sent it to internal testers including myself.

Invalid Swift Support - Files not in right location

I've been trying to upload a new build to iTunes Connect to update an app. I first used xCode 6 but got a email from Apple stating this:
Dear Developer,
We have discovered one or more issues with your recent delivery for "App". To process your delivery, the following issues must be corrected:
Invalid Swift Support - The files libswiftDarwin.dylib, libswiftDispatch.dylib, libswiftCoreGraphics.dylib, libswiftUIKit.dylib, libswiftContacts.dylib, libswiftCore.dylib, libswiftCoreAudio.dylib, libswiftFoundation.dylib, libswiftXCTest.dylib, libswiftCoreImage.dylib, libswiftObjectiveC.dylib aren’t at the expected location /Payload/App.app/Frameworks.
Move the file to the expected location, rebuild your app using the current public (GM) version of Xcode, and resubmit it.
Once these issues have been corrected, you can then redeliver the corrected binary.
I thought it was a simple fix, so I just updated to the latest GM (Xcode 7.2) & completed the Swift 2 migration, however I received the same email. Could someone explain how to solve this and what those files are? This isn't a "files don't match" problem as seen in other questions.
I stumbled upon this as I've encountered the same problem. It's the first time I've been tasked with handling the release of a Swift app to the App Store.
I found that this answer by TALAA works a treat: https://stackoverflow.com/a/26949219/1567836
There is an "Embedded Content Contains Swift Code" flag in the Build Settings that needs to be set to YES. After setting this, clean the project before building again.
After the clean, you'll have to recreate a build to upload to the App Store. You might find that the new upload will get rejected claiming that a binary already exists for that number. If you update the build number (has to be larger than the previous one) then the new upload will be accepted.
As per the #Thomas You need to enable that flag and after that for the "Invalid Swift Support", I had the issues with Application Loader since Xcode 6.4. So, I started uploading the app from the "Organizer" (Xcode > Window > Organizer > Upload to App Store).
This solves the problem.
Inspect the payload and also the SwiftSupport folder in the .ipa file (by converting it to a .zip) and make sure the libraries in the email match across both those directories. Those need to match apparently.
You should probably not have libswiftXCTest.dylib in the Payload/App.app/Frameworks or SwiftSupport folders in something you're submitting to Apple. If you do, check the build section of the scheme for your App target and make sure you aren't including any test targets in your Archive step.

Xcode 7.0.1 - Invalid Swift Support - The SwiftSupport folder is missing.

I try to publish on AppStore an App that contains Swift 2.0 files, but I receive the following email:
Dear developer,
We have discovered one or more issues with your recent delivery for
"EMO MILANO". To process your delivery, the following issues must be
corrected:
Invalid Swift Support - The SwiftSupport folder is missing. Rebuild
your app using the current public (GM) version of Xcode and resubmit
it.
Once these issues have been corrected, you can then redeliver the
corrected binary.
Regards,
The App Store team
I read the following thread oh stackoverflow (Invalid Binary Or Invalid Swift Support Invalid Swift Support / invalid implementation of swift) but I don't find any solution.
I Have a project that has multiple target and uses Cocoa pods.
This is a screenshot of the project navigator:
Ideas?
To be safe, all components of your app should be built with the same version of Xcode and the Swift compiler to ensure that they work together.
I think you need to do a pod clean and install. I reckon one of your swift pods was created on a old version of Xcode, you updated Xcode and then tried to do a submission to the app store.
Read the apple swift blog about binary compatibility and frameworks
You will also want to specify that your embedded content contains swift in the build settings:
EMBEDDED_CONTENT_CONTAINS_SWIFT
Enable this setting to indicate that content embedded in a target's product contains Swift code, so that the standard Swift libraries can be included in the product.
I just resolved an instance of this problem with Apple support.
The problem turned out to be some junk files were being included in the IPA file from my CI/CD system. In particular I had a .gitkeep file which came from a rsync command, and a .DS_Store file which I put there indirectly by poking around with Finder.
The fix was to tighten the rsync command I was using to import some frameworks from Jenkins to exclude .gitkeep, .DS_Store and any other dot-files.
YMMV. The support engineer agreed that it was a confusing error message.

Non-public selectors in App?

I'm trying to submit an app via iTunes Connect. Xcode is throwing the following error:
iTunes Store operation failed.
The app referenced non-public selectors in Payload/Inflation Calculator.app/Inflation Calculator: allocBatch:withEntity:count:,allowWithEntity:, fastIndexForKnownKey:, indexForKey:
I have no idea what "non-public selectors" I would be using, because I stuck pretty close to the book with my code. Anyone have any ideas?
Code for the view controller (only .swift in my app):
https://gist.github.com/Calda/aefc2f19bae5f3cf2e54
EDIT: As a reference for the future, I confirmed with iTunes Connect Support that this was an issue with iTunes Connect and not a problem with my project. For anyone experiencing this same problem, my best advice would be to wait and try again later.
I had the same problem. I could not submit some of my apps because using non-public selectors. I also tried using Application Loader, but still the same error message
To solve the problem I installed Xcode 6.0.1 - it is still available to download here:
https://developer.apple.com/downloads/index.action
Before installing i moved the old Xcode to trash.
I can now submit any app.
I solved this by doing the following:
edit: I don't think the first step is needed
1) Cleaning the build folder (Hold Alt, Click Product -> Clean)
2) Deleting the Derived Data (Organizer -> Projects -> Select your project -> Delete Derived Data
The API differs between iOS 7 and iOS 8.
I got my App validated by switching to Deployment Target "8.0" - built with XCode 6.1.
It might not be the solution to all you guys but you could give it a try.
Might have happened to me because I recently started using UIAlertController -> seems to be an iOS-8-Feature. On iOS 7 this would be UIAlertView. So if you use some nifty new features they might not have been available with previous iOS versions - thus non-public API.
For the same app, I got this error today on XCode 6.1.
I submit the same app (little variation) 2/3 days ago with XCode 6.0.1 without any error!
Just updated XCode 6.1 and trapped with this error.
I switched back to XCode 6.0.1 and it do not have any problem with the submission. No non-public API usage error. I just download the dmg file and rename xcode.app to XCode_6.0.1. So it coexists with XCode 6.1.
I delete all derived data for xcode projects
/Users/{user_home_folder}/Library/Developer/Xcode/DerivedData
And app was submitted without any problem
I was running into the same issue that looked like an issue on Apple's end. I submitted the same app (v 1.0.1) yesterday, then rejected it, then submitted again today with a one-line code difference. Today's submission got rejected for the reason mentioned above.
I was able to solve this, using the latest versions of everything, by changing the version # of my app (e.g. 1.0.1 -> 1.0.2). Think this worked as I had a previous submission sitting in the queue for my older version that I had rejected, YMMV.

Resources