2016-12-22 14 views
1

我想根據subspecs排除文件。 Roughlt,我的(本地)podspec看起來像子空間不會遺傳可可豆莢中的source_files和resources屬性:爲什麼?

s.source_files = "all" 
s.resources = "some" 

s.subspec 'CoreData' do |sp| 
    sp.exclude_files = ... 
end 
s.subspec 'Realm' do |sp| 
    sp.exclude_files = ... 
end 

當我Podfile我打電話pod 'MyPod/Realm',沒有文件導入。

我錯過了什麼?

我應該將sp.source_files = "all"添加到我的子類別中嗎?如果是,爲什麼? 似乎subspecs不會憎惡source_files屬性,也不會resources屬性。

回答

0

到目前爲止,我的解決辦法是做

#s.source_files = "all" 
    #s.resources = "some" 

    s.subspec 'CoreData' do |sp| 
    sp.source_files = "all" 
    sp.resources = "some" 
    sp.exclude_files = ... 
    end 

    s.subspec 'Realm' do |sp| 
    sp.source_files = "all" 
    sp.resources = "some" 
    sp.exclude_files = ... 
    end