致命错误:无法使用Objective Sharpie创建__weak引用

时间:2016-10-26 08:20:07

标签: xamarin xamarin.ios objective-sharpie xamarin-binding

当我试图将一个吊舱绑定到Xamarin时,我遇到了一些错误。

我执行了以下命令:

sharpie pod init ios libPusher
sharpie pod bind

但这给了我这样的错误:

- (RACSignal *)rac_valuesAndChangesForKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options observer:(__weak ...
                                                                                                                        ^
While building module 'ReactiveCocoa' imported from /private/var/folders/96/fpnn11nx4gbdjxbmclkpdl3w0000gn/T/com.xamarin.ObjectiveSharpie/fec0ff8e35944ff0a2a574f1ff606d2f.h:1:
In file included from <module-includes>:1:
In file included from /Users/vrwim/Downloads/libPusher-master/binding/build/Release-iphoneos/ReactiveCocoa/ReactiveCocoa.framework/Headers/ReactiveCocoa-umbrella.h:42:
/Users/vrwim/Downloads/libPusher-master/binding/build/Release-iphoneos/ReactiveCocoa/ReactiveCocoa.framework/Headers/RACKVOChannel.h:85:23: error: 
      cannot create __weak reference in file using manual reference counting

我尝试编辑Pods.xcodeproj并将每个项目设置为使用自动引用计数,但这似乎不起作用。

我是否需要添加一个clang选项来启用自动引用计数,还是还有其他事情要继续?

1 个答案:

答案 0 :(得分:0)

在Xcode和Build Setting集合中打开有问题的项目:

Weak References in Manual Retain ReleaseYes

enter image description here