jAc*_*OdE 6 xcode cocoa-touch cocoapods
您好我的项目文件夹的结构如下:
+ Podfile
+ Apps/
|
+ Apps.xcodeproj
|
+ Target1/
|
+ Target2/
+ AppLib/
|
+ AppLib.podspec
|
+ AppLib.xcodeproj
|
+ TargetLib1/
|
+ TargetLib2/
Run Code Online (Sandbox Code Playgroud)
我的依赖关系结构如下
Apps - 依赖 - > AppLib
AppLib- 依赖 - > RestKit和MagicalRecord
这是我如何配置我的podfile
workspace 'MyApp'
xcodeproj 'Apps/Apps'
xcodeproj 'AppLib/AppLib'
def import_pods
pod 'AppLib', :path => './AppLib'
end
target 'Target1' do
platform :ios, '7.0'
import_pods
xcodeproj 'Apps/Apps'
end
target 'Target1' do
platform :ios, '7.0'
import_pods
xcodeproj 'Apps/Apps'
end
Run Code Online (Sandbox Code Playgroud)
这是AppLib.podspec:
Pod::Spec.new do |s|
s.name = "AppLib"
s.version = "0.0.1"
s.summary = "Common library."
s.platform = :ios, "7.0"
s.source_files = "Lib/Public/**/*.{h,m}"
s.ios.deployment_target = '7.0'
s.resources = "Lib/Nibs/**/*.xib"
s.requires_arc = true
s.dependency 'RestKit', '~> 0.23'
s.dependency 'MagicalRecord'
end
Run Code Online (Sandbox Code Playgroud)
在根文件夹(文件夹包含Podfile)pod install运行没有问题但是当我导入RestKit #import "RestKit.h"或#import <RestKit/RestKit.h>在我的AppLibs项目中,xcode说没有找到该文件.
我的podfile和podspec是否正确?为什么xcode声称找不到RestKit.h?
如果我想单独构建AppLibs,如何获取所有依赖项?(pod install不适用于.podspec文件)我是否需要在AppLib文件夹中创建另一个podfile ?
嗯,我的目标是
我结束的是
就是这样,希望有帮助。
| 归档时间: |
|
| 查看次数: |
1524 次 |
| 最近记录: |