Invalid Swift Support

Hi

When uploading apps to the App Store to be used in TestFlight I get something like this:


***

Invalid Swift Support - The files libswiftCoreGraphics.dylib, libswiftDarwin.dylib, libswiftos.dylib, libswiftQuartzCore.dylib, libswiftFoundation.dylib, libswiftMetal.dylib, libswiftCoreLocation.dylib, libswiftCoreFoundation.dylib, libswiftWatchKit.dylib, libswiftCoreImage.dylib, libswiftObjectiveC.dylib, libswiftUIKit.dylib, libswiftMapKit.dylib, libswiftDispatch.dylib, libswiftCore.dylib don’t match /Payload/FantasticApp.app/Frameworks/libswiftCoreGraphics.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftDarwin.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftos.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftQuartzCore.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftFoundation.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftMetal.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftCoreLocation.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftCoreFoundation.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftWatchKit.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftCoreImage.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftObjectiveC.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftUIKit.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftMapKit.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftDispatch.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftCore.dylib.

Make sure the files are correct, rebuild your app, and resubmit it. Don’t apply post-processing to /Payload/FantasticApp.app/Frameworks/libswiftCoreGraphics.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftDarwin.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftos.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftQuartzCore.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftFoundation.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftMetal.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftCoreLocation.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftCoreFoundation.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftWatchKit.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftCoreImage.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftObjectiveC.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftUIKit.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftMapKit.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftDispatch.dylib,

/Payload/FantasticApp.app/Frameworks/libswiftCore.dylib.

***


What does 'Don't match' meen exactly? Only difference between the libraries in Swiftsupport folder and those in Frameworks is that those in Frameworks have been signed.

This issue has surfaced with Xcode 10.x.


Thanks.

Accepted Reply

This thread has been deleted

Thanks for the input so far from all of you.


The direction we are going in now seems to be app thinning. It seems when we look into an exported archive, the Swift libraries in there have been made much smaller (probably only supporting relevant architectures), so the way we are custom building and signing so far has to be done in a slightly different way.

Replies

Did you recompile the framework ?

No, the framework libraries are standard Swift libraries.

What is Payload/FantasticApp.app/Frameworks


Is it your app ? An external package ? An Apple one (I doubt)


Could be the libraries in Framework are no more uptodate, compared with system ones.

What version Xcode are you using? What version(s) were used w/that app up to this point? What macOS are you on?

Hi Aeble,


Could you please let me know, how you solved this issue? I am facing the same thing.


Thanks a lot in advance

I can't remember exactly what we did, but when we started looking at the exported archive, the lib files for the app did not contain the same architectures as the ones placed in the Frameworks folder elsewhere. I can't remember if we solved this by copying other lib files into Frameworks folder or if we simply adjusted the architectures for the app.

Hi Aeble, Did you solve this issue?. If so how?. I am also facing the same when tried to upload via apploader. I am generating build using Xcode 10.2.


Thanks in advance

Hi,


I faced this issue with just the swift libraries in my Framework folder. What I noticed was that the Framework and SwiftSupport folder has same libraries and these libraries have arm64e support. I use xcodebuild to build my appstore build. So arm64e should have been stripped but it didn't. So I tried to do the stripping process manually using lipo and it worked. I was able to upload the app successfully to appstore. If you build with Xcode 10 you need to do the stripping process at SwiftSupports folder and Framework folder. If you build using xcode 11, you just have to do the process at Frameworks folder.

On another note, use file command to check if your library does still have arm64e support. If it does, only then the above solution could be of help to you.

I hope this helps.


Regards