Xcode 16.0 got Assertion failed when build my project

After upgrading to Xcode 16.0, I encountered the following error when building my project. It compiled successfully on Xcode 15 or Xcode 16 with -ld64.

I am not sure how to resolve this issue and would appreciate any help.

Here is the error message

Assertion failed: ((ct == Atom::ContentType::objcConst) || (ct == Atom::ContentType::objcData) || (ct == Atom::ContentType::constData) || (ct == Atom::ContentType::constText)), function ObjCClassReadOnlyDataRef, file Atom.cpp, line 3022.

Answered by Kevin_k in 806415022

Hi, I found a way and it seems to work, which can help us found out the framework where the problem lies.

The problem occurs at the linking stage, we can use a script to convert the framework into a dylib, and linking will also occur during this process.

Here is my script:

$clang_path -arch $arch -dynamiclib -target arm64-apple-ios12.0 -isysroot "$iphoneos_sdk_path" -F$framework_path -framework $framework_name -ObjC -all_load -undefined dynamic_lookup -o "$output_file" &> "/tmp/$framework_name.txt"

Same issue, is there any solution to this?

Same issue,is there any update of this?

I am also facing same issue. Did anyone find solution for this issue ?

Hi, Please find the fix below

You can add an -ld64 flag to other linker flags (More info https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking)

Accepted Answer

Hi, I found a way and it seems to work, which can help us found out the framework where the problem lies.

The problem occurs at the linking stage, we can use a script to convert the framework into a dylib, and linking will also occur during this process.

Here is my script:

$clang_path -arch $arch -dynamiclib -target arm64-apple-ios12.0 -isysroot "$iphoneos_sdk_path" -F$framework_path -framework $framework_name -ObjC -all_load -undefined dynamic_lookup -o "$output_file" &> "/tmp/$framework_name.txt"

Xcode 16.0 got Assertion failed when build my project
 
 
Q