ITMS-90429: Invalid Swift Support

Build the archive, validating and uploading it to App Store Connect - TestFlight is successful from Xcode (16.0, macOS 15.1.1). Although after that the build is rejected stating :

ITMS-90429: Invalid Swift Support - The files libswiftCoreFoundation.dylib, libswiftCoreData.dylib, libswiftCore.dylib, libswiftFoundation.dylib, libswift_Concurrency.dylib, libswiftObjectiveC.dylib aren’t at the expected location /Payload/Runner.app/Frameworks. Move the file to the expected location, rebuild your app using the current public (GM) version of Xcode, and resubmit it.

Cross checked the Archive and .ipa file, where we found that the mentioned .dylib files are actually present inside the "/Payload/Runner.app/Frameworks" folder, and all the ".dylib" files are also present in the "SwiftSupport/iphoneos" folder.

Scenario : using tdLib compilation "libtdjson.xcframework" (embedded & signed) for ios arm64 placed under "Framworks", in my Flutter application, calling methods via "Method Channels", interacting with AppDelegate.swift file where the tdLib methods are being called from the compiled library. All "swift support settings" are enabled in Xcode while archiving and building the application.

Answered by DTS Engineer in 818554022

I see you have a bare dylib named libtdjson.dylib, which is not supported. Placing content in a bundle says:

iOS, watchOS, and tvOS support third-party frameworks but don’t support third-party standalone dynamic libraries, which are those outside a framework bundle, typically with the .dylib filename extension. The only exception to this rule is the Swift system libraries provided by Xcode.

You should work with the vendor for that library to get it rebuilt into a .framework bundle to meet that requirement. The XCFramework package you reference should contain the .framework, not a .dylib.

— Ed Ford,  DTS Engineer

The Swift Support Folder :

The Framework Folder:

I see you have a bare dylib named libtdjson.dylib, which is not supported. Placing content in a bundle says:

iOS, watchOS, and tvOS support third-party frameworks but don’t support third-party standalone dynamic libraries, which are those outside a framework bundle, typically with the .dylib filename extension. The only exception to this rule is the Swift system libraries provided by Xcode.

You should work with the vendor for that library to get it rebuilt into a .framework bundle to meet that requirement. The XCFramework package you reference should contain the .framework, not a .dylib.

— Ed Ford,  DTS Engineer

@YashCidroy:

Can you please provide, more details as to if the error mentioned above is caused or is related to libtdjson.dylib in any way?

The cause of the error here is due to the presence of a library named libtdjson.dylib. As the article I linked to above indicates, all dynamic library code provided by your app needs tote included inside of a framework bundle. Placement of the library inside of the /Frameworks folder itself is not sufficient. iOS has never supported bare dynamic libraries outside of a framework bundle, which is what libtdjson.dylib represents here.

Creation of a framework bundle is based on using the Framework template from File > New Target inside of Xcode. If this library you are using comes pre-built as a .dylib file from your vendor, so you're not compiling it from source code, then you'll need to raise this with the vendor.

Depending on how your app is structured, there is another choice, which is to use a static library instead of a dynamic one. If you only need the functionality provided by this library from one module in your app, a static library is well suited to that, but if you're using a dynamic library because the functionality is needed by many modules, then rebuilding the library as a framework is the way to go.

— Ed Ford,  DTS Engineer

ITMS-90429: Invalid Swift Support
 
 
Q