Debugging a library with Xcode
I have a more general question on working with libraries on with Xcode when building iPhone apps. I’ve created a framework from a project I’ve been working on to use some parts of it in other apps. That works pretty good, so far. But I have no idea how to debug into the files included in the included framework.
I hope to get some kind of ‘best practice’ on that.
Thanks a lot
2 Solutions Collect From Internet About “Debugging a library with Xcode”
There have been a lot of discussions of how best to reuse code with static libraries. I’ve settled on the method described here by Clint Harris (which I think is what Shawn is suggesting as well). Creating a project dependency in this way automatically compiles the library for your project’s target (simulator/device, debug/release) so you don’t need four different copies of the compiled library sitting around. It also lets you step into the library source when debugging, as you want. Finally, updates to the library are included in any of the linked projects the next time those projects are compiled (so you don’t have to recompile and redistribute the library binary to those projects yourself).
Generally, I’ll include the Xcode project for the library as an external project dependency of the main application’s project. The advantage of project dependencies, is that you can add a build phase that builds a fresh copy of your library along with the main project, and of course it will let you set breakpoints in the library’s code.
- Compilation error using TFHpple framework from Swift
- Sort File List in Xcode?
- Email CSV file with MFMailComposer
- Xcode 9 crash during uploading app to App Store
- Add subview with UIAlertVIew like animation,with a bouncing effect
- Coreplot graph fill color along y-axis
- iOS: How to achieve behavior like Android's startActivityForResult
- How to get current location using CLLocationManager in iOS
- Extract Objective-c binary
- When to use didMoveToView or initWithSize with SpriteKit in xCode 6.4
- Make iPhone vibrate on Local Notification
- Point of using NSPersistentStoreCoordinator?
- iOS/iPhone: in-app purchase sandbox broken while app in “rejected” state?
- How does my ARC app work in iOS 3.x?
- Explicitly disabling UIView animation in iOS4+