#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的代码块中,"成功加载友盟统计"日志未打印
#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的代码块中,"成功加载友盟统计"日志未打印