2016-10-26 78 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

相關問題