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.
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"