MLeaksFinder报错

发布于:2024-04-15 ⋅ 阅读:(176) ⋅ 点赞:(0)

1.报错:FBClassStrongLayout.mm 文件:layoutCache[currentClass] = ivars;
解决:替换为layoutCache[(id)currentClass] = ivars;
在这里插入图片描述
2.编译正常但运行时出现crash

indirect_symbol_bindings[i] = cur->rebinding FBRetainCycleDetector iOS15 fishhook c

原来indirect_symbol_bindings[i]=cur->rebindings[j].replacement;
替换为:

if (i < (sizeof(indirect_symbol_bindings) / sizeof(indirect_symbol_bindings[0]))) {
             indirect_symbol_bindings[i]=cur->rebindings[j].replacement;
             }

在这里插入图片描述
UIAlertView已被弃用>改用UIAlertController

+ (void)alertWithTitle:(NSString *)title
               message:(NSString *)message
              delegate:(id<UIAlertViewDelegate>)delegate
 additionalButtonTitle:(NSString *)additionalButtonTitle {
    [alertView dismissWithClickedButtonIndex:0 animated:NO];
    UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

    }];
    [alertController addAction:okAction];
    [[UIApplication sharedApplication]
         .keyWindow.rootViewController presentViewController:alertController animated:NO completion:nil];
    NSLog(@"%@: %@", title, message);
}

pod ‘MLeaksFinder’, ‘~> 1.0.0’,:configurations => [‘Debug’,‘Release’]

终端重新pod install


网站公告

今日签到

点亮在社区的每一天
去签到