0

当我尝试将 pod 绑定到 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 选项来启用自动引用计数,还是发生了其他事情?

4

1 回答 1

0

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

Weak References in Manual Retain ReleaseYes

在此处输入图像描述

于 2016-10-26T08:37:33.387 回答