After enabling Enhanced Security for an existing iOS project (mixed Objective-C / Swift) I get the linker error: Library 'c++polyfills' not found This happens when compiling for a simulator as run destination. Device builds (debug) or archiving a release build works. However I need to be able to test on a simulator...
Xcode version is 26.4.1, Simulator uses iOS 26.4.1
Thanks for those extra titbits. Using that, I was able to reproduce the problem:
- Using Xcode 26.4, I created a new project from the iOS > App template, choosing Swift as the language.
- I set the deployment target to iOS 17.7.
- And chose Any iOS Simulator as the run target.
- I added the Enhanced Security capability and checked Enable Hardware Memory Tagging. At this point things were still building just fine.
- I added a new Objective-C class to the project.
And lo! that triggers the problem.
I then raised the deployment target up to iOS 18.6 and the problem went away. So, it seems like the combination of a simulator build for iOS 17 with MTE enabled. Interesting.
That’s clearly a supported configuration, so you should definitely file a bug about this. Once you’re done, reply here with your bug number so that I can add my own internal comments to it.
How much testing do you do in the iOS 17 simulator? If the answer is “None at all.” you could work around this by temporary raising the deployment target for your simulator build to iOS 18.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"