Skip to content

xcode7.3编译问题 #151

Closed
Closed
@sakura0720

Description

@sakura0720

xcode7.3编译会有这个编译错误:

NSObject+YYAddForKVO.h

方法:- (void)addObserverBlockForKeyPath:(NSString*)keyPath block:(void (^)(__weak id _Nonnull obj, _Nullable id oldVal, _Nullable id newVal))block;

错误:Cannot create __weak reference in file using manual reference counting

Activity

ibireme

ibireme commented on Mar 23, 2016

@ibireme
Owner

请更新到最新版本(1.0.3)试试,昨天刚改好。

wy19901227

wy19901227 commented on Mar 23, 2016

@wy19901227

Pod 上最新的还是1.01呀

ibireme

ibireme commented on Mar 23, 2016

@ibireme
Owner

执行 pod setup 来更新你的本地列表。

wy19901227

wy19901227 commented on Mar 23, 2016

@wy19901227

额,是以后xcode在arc 模式下id类型不能用__weak了,还是xcode的bug?

ibireme

ibireme commented on Mar 23, 2016

@ibireme
Owner

错误提示说不能在 MRC 下使用 __weak,但这个头文件应该没有被引入 MRC 文件下编译,所以我觉得这可能是 Xcode 的问题。

wy19901227

wy19901227 commented on Mar 23, 2016

@wy19901227

是啊,我也觉得是xcode问题,所以你这样改了,会引起什么问题吗?

发自我的 iPhone

在 2016年3月23日,16:10,Yaoyuan notifications@github.com 写道:

错误提示说不能再 MRC 下使用 __weak,但这个头文件应该没有被引入 MRC 文件下编译,所以我觉得这可能是 Xcode 的问题。


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

ibireme

ibireme commented on Mar 23, 2016

@ibireme
Owner

这块儿代码倒是无所谓。。没什么影响

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @ibireme@sakura0720@wy19901227

        Issue actions

          xcode7.3编译问题 · Issue #151 · ibireme/YYKit