Po patrząc na własnym przykładzie CocoaPods' (od https://guides.cocoapods.org/syntax/podfile.html#abstract_target)Co odziedziczy! : robią to ścieżki wyszukiwania?
# Note: There are no targets called "Shows" in any of this workspace's Xcode projects
abstract_target 'Shows' do
pod 'ShowsKit'
# The target ShowsiOS has its own copy of ShowsKit (inherited) + ShowWebAuth (added here)
target 'ShowsiOS' do
pod 'ShowWebAuth'
end
# The target ShowsTV has its own copy of ShowsKit (inherited) + ShowTVAuth (added here)
target 'ShowsTV' do
pod 'ShowTVAuth'
end
# Our tests target has its own copy of
# our testing frameworks, and has access
# to ShowsKit as well because it is
# a child of the abstract target 'Shows'
target 'ShowsTests' do
inherit! :search_paths
pod 'Specta'
pod 'Expecta'
end
end
nie widzę dlaczego inherit! :search_paths
jest konieczne? Wszystkie 3 cele, ShowsiOS
, ShowsTV
i ShowsTests
mają dostęp do ShowsKit
z ich rodzica docelowego.
Konkretny przykład dla inherit!
(od https://guides.cocoapods.org/syntax/podfile.html#inherit_bang) nie dodawać żadnych klarowność
target 'App' do
target 'AppTests' do
inherit! :search_paths
end
end
Pomożesz mi zrozumieć co inherit! :search_paths
jest?
Czy masz pewną jasność co do tego, dlaczego używamy go od momentu opublikowania pytania? – Jobs
Niestety, nie :( – Quentin
Wydaje się, że jest to funkcja, której nikt nigdy nie używa =) –