79225587

Date: 2024-11-26 06:45:45
Score: 0.5
Natty:
Report link

The issue you're encountering stems from Swift runtime libraries not being bundled properly in your app's framework. Specifically, Apple requires certain Swift libraries (e.g., libswift_Concurrency.dylib) to be placed in the /Payload/Runner.app/Frameworks directory within your app bundle when using Swift. Here's how you can resolve the problem:

Steps to Resolve ITMS-90429

  1. Update Xcode

Ensure you are using the latest stable (GM) version of Xcode, as older versions may not properly include or manage Swift libraries.

  1. Manually Embed Swift Runtime Libraries

The Swift runtime libraries must be embedded properly for the app to pass validation. You can configure this in your Xcode project settings:

Open your Xcode project.

Navigate to your Target → Build Settings.

Search for Always Embed Swift Standard Libraries and set it to YES.

  1. Verify Framework Embedding

Check that all required frameworks, including libswift_Concurrency.dylib, are being embedded correctly:

In Xcode, go to your Target → General → Frameworks, Libraries, and Embedded Content.

Ensure all the required frameworks, including any .dylib files, are added here with the "Embed & Sign" option selected.

  1. Clean and Rebuild Your Project

After making changes, clean and rebuild the project to ensure the Swift libraries are correctly embedded:

Product → Clean Build Folder (Shift + Command + K)

  1. Ensure Proper Configuration of tdlib

If recompiling the tdlib library, ensure the following:

Build the libtdjson.xcframework with support for the ios-arm64 architecture.

Follow the iOS build guide carefully. Double-check that libtdjson.xcframework contains all necessary files for the targeted architecture.

Ensure that when including libtdjson.xcframework, it is marked as "Do Not Embed" in your Frameworks, Libraries, and Embedded Content settings.

  1. Add a Custom Script to Embed Missing Swift Libraries

Sometimes, the Swift runtime libraries are not automatically embedded, and a custom script can help:

Go to your Target → Build Phases.

Add a new Run Script Phase and place it after the "Embed Frameworks" phase.

Add the following script to embed the missing Swift libraries:

if [ "${CONFIGURATION}" = "Release" ]; then mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" cp -fR "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}/libswift_Concurrency.dylib" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/" codesign --force --sign "${EXPANDED_CODE_SIGN_IDENTITY}" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libswift_Concurrency.dylib" fi

This script ensures the libswift_Concurrency.dylib library is copied and signed properly.

  1. Re-upload to App Store Connect

After applying these fixes:

Rebuild the app.

Create a new archive (Product → Archive).

Export and upload the app to App Store Connect using the Organizer.

Notes on libtdjson

If you continue to face issues related to the tdlib library:

Verify that the .xcframework includes architectures for both ios-arm64 and ios-arm64e.

Recompile tdlib with the BUILD_SHARED_LIBS=ON flag if you haven't already. Use this command for CMake:

cmake -DCMAKE_TOOLCHAIN_FILE=../path/to/ios.toolchain.cmake -DPLATFORM=OS64 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..

Make sure you are signing all binaries (dylib and .framework) correctly.

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Raanesh