美文网首页
组件库之间的的依赖和配置

组件库之间的的依赖和配置

作者: asmao | 来源:发表于2021-12-10 14:48 被阅读0次

demoApp的Podfile配置要把组件库的资源地址写上
代码块

use_frameworks!

source 'https://xxx/BSComponent.git'


 platform :ios, '9.0' 


target 'HomePage_Example' do

  pod 'HomePage', :path => '../'

end


组件想引用其他组件的文件需要在.podspec配置依赖关系,这里注意不要循环依赖A依赖B B就不能依赖A
代码块

#指的是HomePage组件依赖BSRouter

Pod::Spec.new do |s|

s.name     = 'HomePage'

s.dependency 'BSRouter'

这样在HomePage的组件中 就可以引用BSRouter的类和方法了。

相关文章

网友评论

      本文标题:组件库之间的的依赖和配置

      本文链接:https://www.haomeiwen.com/subject/uswffrtx.html