我昨天在这里问了一个关于如何在框架中调试的问题。
我有一个networkLib,还有一个usingLibDemo项目。
答案建议我networkLib加入usingLibDemo,以便我可以在源代码中进行调试。
现在我试过了:
- 从 中输出一个框架
networkLib,并在 中使用该框架usingLibDemo。有用。 - 复制
networkLibinto的所有源代码usingLibDemo,它再次工作。 - 将
networkLib项目拖入usingLibDemo项目中,在 中设置 ,Header Search Paths在中Build Settings设置。它失败。Target DependenciesBuild Phases
在 #3 情况下,仅使用标头时项目构建成功。例如,我只使用协议:
@interface ViewController : UIViewController <LoginUIDelegate>
@property (retain, nonatomic) IBOutlet UITextField *usernameText;
@property (retain, nonatomic) IBOutlet UITextField *passwordText;
@property (retain, nonatomic) IBOutlet UIButton *loginButton;
- (IBAction)loginBtnDidClick:(id)sender;
@end
但是当我使用.m文件中的代码时:
[[LoginBizLogic sharedInstance] loginWithUsername:username password:password tokenLogin:NO uiDelegate:self];
构建失败,如下所示:

LoginBizLogic的@interface以及LoginUIDelegate是在文件中定义的LoginBizLogic.h,但@implementation在“LoginBizLogic.m”文件中。
我认为LoginBizLogic没有正确链接,与其他类相同,但我无法弄清楚问题出在哪里,或者在哪里配置。
非常感谢。




