laoqingcai
laoqingcai
[NSBundle aspect_hookSelector:@selector(infoDictionary) withOptions:AspectPositionInstead usingBlock:^(id aspectInfo) { NSDictionary *dictInfoDictionary; NSInvocation *invocationInfoDictionary = aspectInfo.originalInvocation; [invocationInfoDictionary invoke]; [invocationInfoDictionary getReturnValue:&dictInfoDictionary]; NSMutableDictionary *dictInfoDictionaryNew =[NSMutableDictionary dictionaryWithDictionary:dictInfoDictionary]; dictInfoDictionaryNew[@"CFBundleIdentifier"] = @"com.naruto1.demo1"; NSLog(@"[%s,%d] dictInfoDictionary:%@",**FUNCTION**,**LINE**,dictInfoDictionaryNew); [invocationInfoDictionary setReturnValue:&dictInfoDictionaryNew]; } error:NULL]; when...
1.编译警告 ``` 1).This block declaration is not a prototype - (BabyPeripheralManager *(^)())removeAllServices; 2).Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior... 虽然实际不会构成循环引用环,但是还是建议优化一下。 - (BabyPeripheralManager *(^)())stopAdvertising {...