先整一个workspace 再new 一个project (single view app) 假设取名为test
再整两个project(static library)当子组件
在app的setting phase 加上两个动态库
重点是app这个search path 里填写 $(SRCROOT)/../Common $(SRCROOT)/../Sub
../回到上级菜单 然后才能成功找到.h文件
ps pod file 内容如下
workspace 'Test.xcworkspace'
xcodeproj 'City/City.xcodeproj'
xcodeproj 'Common/Common.xcodeproj'
xcodeproj 'Sub/Sub.xcodeproj'
def default_pods
platform :ios, '8.0'
pod 'Masonry'
end
target :City do
default_pods
xcodeproj 'City/City.xcodeproj'
end
target :Common do
default_pods
xcodeproj 'Common/Common.xcodeproj'
end
target :Sub do
default_pods
xcodeproj 'Sub/Sub.xcodeproj'
end
网友评论