How can I debug in a framework in Xcode?

后端 未结 6 1124
无人及你
无人及你 2020-12-14 21:37

I have two projects, one is the networkLib for login and some other network function, the other is the usingLibDemo. So I have all the source code

6条回答
  •  自闭症患者
    2020-12-14 22:08

    If someone would have the same question in future (now I am using Xcode 8):

    You can:

    1. build your framework project (in this example "networkLib")
    2. copy project output ("myNetKit.framework") to destination project ("usingLibDemo")
    3. run destination project ("usingLibDemo") on your device
    4. stop process
    5. launch app from your device manually ("usingLibDemo")
    6. open framework project and Attach to Process of your app (launched in step 5). In Xcode 8: Debug->Attach to Process-> Select name of your app.

    Don't forget set some breakpoints in your framework project.

提交回复
热议问题