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

Xcode 15 Release build error "error: unexpected '@' in program @weakify(self); ^" #196

Open
CocoaJiang opened this issue Oct 8, 2023 · 2 comments

Comments

@CocoaJiang
Copy link

CocoaJiang commented Oct 8, 2023

my code

#import <ReactiveObjC/ReactiveObjC.h>
-(UIView * _Nonnull (^)(void (^ _Nonnull)(void)))addTouchAction{
    @weakify(self);
    return ^(void(^actionBlock)(void)){
        @strongify(self);
        self.userInteractionEnabled = YES;
        UITapGestureRecognizer *zer = [[UITapGestureRecognizer alloc]initWithActionBlock:^(id  _Nonnull sender) {
            actionBlock();
        }];
        [self addGestureRecognizer:zer];
        return self;
    };
}
build error : "error: unexpected '@' in program
    @weakify(self);
    ^
" , "error: unexpected '@' in program
        @strongify(self);
"
@sdkdimon
Copy link

@sdkdimon
Copy link

sdkdimon commented Oct 31, 2023

Also it is separated for UI and Non UI modules.

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