Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: Invalid Swift Support when uploading a build to iTunes Connect

Tags:

ios

swift

I'm submitting my first build for TestFlight distribution and am getting the following error. Bitcode is turned off. Other answers seem decently old so figured I'd re-ask for 2018.

Invalid Swift Support - The files libswiftDarwin.dylib, libswiftMetal.dylib, libswiftCoreAudio.dylib, libswiftsimd.dylib, libswiftQuartzCore.dylib, libswiftos.dylib, libswiftObjectiveC.dylib, libswiftDispatch.dylib, libswiftCoreGraphics.dylib, libswiftCoreFoundation.dylib, libswiftUIKit.dylib, libswiftCoreMedia.dylib, libswiftAVFoundation.dylib, libswiftCore.dylib, libswiftFoundation.dylib, libswiftCoreImage.dylib aren’t at the expected location /Payload/MyApp.app/Frameworks. Move the file to the expected location, rebuild your app using the current public (GM) version of Xcode, and resubmit it.

I have a .dylib file that I compile for my project that lives at ./MyProj/Core/lib.dylib. I saw this browsing around as well

It's likely you have a plain dylib outside of a framework somewhere, which is only supported on macOS. Please review the Troubleshooting section of Tech Note 2435 for more context.

If having a bare dylib is indeed the cause of the problem, please file a bug for an error message that clearly explains this.

like image 905
Zack Shapiro Avatar asked Jan 04 '18 23:01

Zack Shapiro


3 Answers

Have you seen this?

https://developer.apple.com/library/content/technotes/tn2435/_index.html#//apple_ref/doc/uid/DTS40017543-CH1-TROUBLESHOOTING

Search for "Embedded .dylib Files"

I would try to follow that steps, It should work.

like image 199
Norolim Avatar answered Nov 10 '22 06:11

Norolim


Make sure you have the 'Always Embed Swift Standard Libraries' at its default setting in your main target and possible other targets (extensions). Also make sure you don't archive Release version with a Debug setting (Scheme).

like image 42
igraczech Avatar answered Nov 10 '22 07:11

igraczech


The solution here was to add a new target to my project, the first Framework option that Apple gives and to move the .dylib file and the interface.h file into it. Link the interface.h file into my framework.h file, import the framework into my main target

Happy to give more info (it's a longer answer) if anyone needs it. Just leave a comment.

like image 2
Zack Shapiro Avatar answered Nov 10 '22 07:11

Zack Shapiro