Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

编译通过,但是没有执行 #12

Open
semnyqu opened this issue Mar 12, 2018 · 2 comments
Open

编译通过,但是没有执行 #12

semnyqu opened this issue Mar 12, 2018 · 2 comments

Comments

@semnyqu
Copy link

semnyqu commented Mar 12, 2018

#import "XAAppDelegate.h"
#import "XAspect.h"

#define AtAspect AnalyticsAppDelegate

#define AtAspectOfClass XAAppDelegate
@classpatchfield(XAAppDelegate)

AspectPatch(-, BOOL, application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions)
{
NSLog(@"成功加载友盟统计");
return XAMessageForward(application:application didFinishLaunchingWithOptions:launchOptions);
}

@EnD
#undef AtAspectOfClass
#undef AtAspect

在自己的项目中,加入如上代码,debug中,没有进入AspectPatch的代码块中,"成功加载友盟统计"日志未打印

@huainanzi
Copy link

项目是怎么运行起来的

@semnyqu
Copy link
Author

semnyqu commented Apr 2, 2018

@huainanzi
使用pod XAspect在我自己的项目中调用的,很简单,按照demo使用方案就可以;
如果说是demo怎么运行得具体错误分析?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants