Skip to content

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

@semnyqu

Description

@semnyqu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions