# Note: There are no targets called "Shows" in any of this workspace's Xcode projectsabstract_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' endend
我不明白为什么要继承! :search_paths是必要的吗?所有3个目标,ShowsiOS,ShowsTV和ShowsTests都可以从其父目标访问ShowsKit.
继承的具体例子! (从https://guides.cocoapods.org/syntax/podfile.html#inherit_bang开始)没有增加任何清晰度
target 'App' do target 'AppTests' do inherit! :search_paths endend
你能帮我理解继承的东西吗? :search_paths是为了?
解决方法 根据 https://guides.cocoapods.org/syntax/podfile.html#inherit_bang,继承背后的目的!(我同意不是很清楚),是提供3之一:
Available Modes: + :complete The target inherits all behavIoUr from the parent. + :none The target inherits none of the behavIoUr from the parent. + :search_paths The target inherits the search paths of the parent only.
在这个问题的例子中,它是:正在表达的search_paths模式.测试Pod项目时,三种不同的模式可以起到不同的作用.
这是一个额外的链接https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/IncludingFrameworks.html与Xcode中的框架搜索路径有关,这有助于为我清除一些混乱.
总结以上是内存溢出为你收集整理的ios – 继承什么! :search_paths呢?全部内容,希望文章能够帮你解决ios – 继承什么! :search_paths呢?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)