iOS 架构iOS开发iOS开发资料收集区

IOS组件化-多工程联编(多工程分别导入pods第三方库)

2016-08-24  本文已影响978人  Yes_Cui

以上一篇<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

整体效果图
上一篇下一篇

猜你喜欢

热点阅读