Known Issues

XTD Protect for iOS Command Line Tools

Failed to protect binary XXXXX. map::at: key not found

In some cases, this issue is caused by an Xcode linker bug where it omits several function starts from the data pointed to by the LC_FUNCTION_STARTS command.You can check if that is the case by looking at iosdefender.log from an unsuccessful protection. You should see this error occur at the final assembly stage.

[11:26:43:984][AssemblerNode             ][info    ] ----------------------------------------
[11:26:43:984][AssemblerNode             ][info    ] Executing step: Assembling
[11:26:43:984][AssemblerNode             ][info    ]
[11:26:43:984][AssemblerNode             ][info    ] Saving protected assembly listing to <filepath>.s
...
libc++abi: terminating due to uncaught exception of type std::out_of_range: map::at:  key not found

This issue is present in linkers shipped by Xcode versions 15.0, 15.0.1, 15.1, 15.2 and 15.3, To solve this problem, we recommend switching to the old linker by adding -Wl,-ld_classic to the Other Linker Flags build setting in Xcode. Alternatively, you can specify export LDFLAGS="$LDFLAGS -Wl,-ld_classic" in your environment.