2016-10-26 48 views
0

当我试图将一个窗格绑定到Xamarin时,我遇到了一些错误。致命错误:无法使用Objective Sharpie创建__weak引用

我执行以下命令:

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并设置每个项目使用自动引用计数,但这并没有出现工作。

我是否需要添加铿锵声选项以启用自动引用计数,还是其他事情正在进行?

回答

0

打开在Xcode和Build Setting组内的有关项目:

Weak References in Manual Retain ReleaseYes

enter image description here

+0

这就是我已经为每个目标和项目本身来完成。这不能解决问题。我想我可能需要将选项发送给sharpie,因为它可能会自己构建xcodeproj,而无需查看构建设置。 – vrwim

+0

@vrwim'-fobjc-weak'是cmd行选项。您也可以修改podfile:http://stackoverflow.com/a/36712877/4984832 – SushiHangover

相关问题