以上一篇<IOS组件化-多工程联编>demo为例
打开Podfile文件
首先声明
workspace 'MainWorkingPlace'
导入要引入的工程
project '../MainWorkingPlace/MainWorkingPlace.xcodeproj'
project '../MainWorkingPlace/CommonModule/CommonModule.xcodeproj'
project '../MainWorkingPlace/ModuleOne/ModuleOne.xcodeproj'
#定义导入的pods
可以自己取个好听的名字
def pods
#定义导入的pods
platform :ios, '7.0'
pod 'GVUserDefaults'
pod 'AFNetworking'
pod 'SDWebImage'
end
哪个工程需要什么第三方库自行添加
target 'MainWorkingPlace' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
project '../MainWorkingPlace/MainWorkingPlace.xcodeproj'
pods
platform :ios, '7.0'
pod 'GVUserDefaults'
end
target 'CommonModule' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
project '../MainWorkingPlace/CommonModule/CommonModule.xcodeproj'
pods
platform :ios, '7.0'
pod 'AFNetworking'
end
target 'ModuleOne' do
# Uncomment this line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
project '../MainWorkingPlace/ModuleOne/ModuleOne.xcodeproj'
pods
platform :ios, '7.0'
pod 'SDWebImage'
end