In Xcode 8, When any break point is hit, and I try to print any object in the Xcode debugger, it always prints "Could not resolve type". I have searched enough on the internet. I have checked if EditScheme->Run->Info->BuildConfiguration is set to 'Debug'. Build setting->Optimisation level is set to 'None'. But no clues on why this happens. Could anyone help me out here? Thanks in advance.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Pass custom debug information to Microsoft bot fra
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
I had a similar issue with a Swift project which included an Obj-C framework. I had imported the framework in my Swift project using
Additionally, I had also created a Bridging-Header file in the Swift project and included the Obj-C-Framework header using
This was causing the Xcode debugger to always show 'could not resolve type' when printing objects in breakpoints. Removing the #include in the Bridging-Header fixed the issue and objects print correctly in breakpoints.
TL;DR If your swift project uses an Obj-C framework make sure that the framework headers are not included in your Swift project's bridging header.
I encountered a similar issue with a pure swift framework that doesn't have any bridging headers but non the less had
SWIFT_INSTALL_OBJC_HEADER
set toYES
It is described in more detail at https://stackoverflow.com/a/51186560/385307
After changing the setting to
NO
debugging works again.I just had the same problem and it had been solved.My project is a Mixed project with both OC and Swift. I found that some .h file import in my Bridging Header file that caused the problem. Definitely, an enum declared in the .h file cause the problem, like this:
If i comment the code, everything goes alright.
And I just add a prefix to each element of the enum and the problem is solved for me.
I just thinking if there is a conflict with some enum in Swift when convert the .h to Swift.
I'm still confused...