The code in my app is split into frameworks that I can use both from my main app and its app extensions. In order to use the frameworks inside the app extension, I need to build them with the Xcode build setting Require Only App-Extension-Safe API
set to Yes
.
When I do that, debugging framework code in my main app no longer works properly. I can set a breakpoint, but any attempt to print a value via p
or po
will give a set of errors like the following:
error: module file /Users/.../Library/Developer/Xcode/DerivedData/...-daqfgouagvlkudfebrmzrurogmld/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules/_errno-B8I5WSZMM09RXHYLYEWSC1BLE.pcm cannot be loaded due to a configuration mismatch with the current compilation error: Objective-C App Extension was enabled in PCH file but is currently disabled
How do I fix this?