我试图让现有的Objective-C项目在OS X 10.11(El Capitan)上的XCode 7中构建。我从存储库中获取源代码,运行pod install
,然后打开.xcworkspace
文件并尝试构建。它未能找到' S3.h'哪个应该由Pods安装。
这是Pod文件:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'App' do
pod "AWSiOSSDKv2"
pod "AWSCognitoSync"
end
target 'AppTests' do
end
生成以下Pods-App.release.xcconfig
:
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AWSAutoScaling" "${PODS_ROOT}/Headers/Public/AWSCloudWatch" "${PODS_ROOT}/Headers/Public/AWSCognito" "${PODS_ROOT}/Headers/Public/AWSCognitoSync" "${PODS_ROOT}/Headers/Public/AWSCore" "${PODS_ROOT}/Headers/Public/AWSDynamoDB" "${PODS_ROOT}/Headers/Public/AWSEC2" "${PODS_ROOT}/Headers/Public/AWSElasticLoadBalancing" "${PODS_ROOT}/Headers/Public/AWSKinesis" "${PODS_ROOT}/Headers/Public/AWSMobileAnalytics" "${PODS_ROOT}/Headers/Public/AWSS3" "${PODS_ROOT}/Headers/Public/AWSSES" "${PODS_ROOT}/Headers/Public/AWSSNS" "${PODS_ROOT}/Headers/Public/AWSSQS" "${PODS_ROOT}/Headers/Public/AWSSimpleDB" "${PODS_ROOT}/Headers/Public/AWSiOSSDKv2"
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AWSAutoScaling" -isystem "${PODS_ROOT}/Headers/Public/AWSCloudWatch" -isystem "${PODS_ROOT}/Headers/Public/AWSCognito" -isystem "${PODS_ROOT}/Headers/Public/AWSCognitoSync" -isystem "${PODS_ROOT}/Headers/Public/AWSCore" -isystem "${PODS_ROOT}/Headers/Public/AWSDynamoDB" -isystem "${PODS_ROOT}/Headers/Public/AWSEC2" -isystem "${PODS_ROOT}/Headers/Public/AWSElasticLoadBalancing" -isystem "${PODS_ROOT}/Headers/Public/AWSKinesis" -isystem "${PODS_ROOT}/Headers/Public/AWSMobileAnalytics" -isystem "${PODS_ROOT}/Headers/Public/AWSS3" -isystem "${PODS_ROOT}/Headers/Public/AWSSES" -isystem "${PODS_ROOT}/Headers/Public/AWSSNS" -isystem "${PODS_ROOT}/Headers/Public/AWSSQS" -isystem "${PODS_ROOT}/Headers/Public/AWSSimpleDB" -isystem "${PODS_ROOT}/Headers/Public/AWSiOSSDKv2"
OTHER_LDFLAGS = $(inherited) -ObjC -l"AWSAutoScaling" -l"AWSCloudWatch" -l"AWSCognito" -l"AWSCore" -l"AWSDynamoDB" -l"AWSEC2" -l"AWSElasticLoadBalancing" -l"AWSKinesis" -l"AWSMobileAnalytics" -l"AWSS3" -l"AWSSES" -l"AWSSNS" -l"AWSSQS" -l"AWSSimpleDB" -l"sqlite3" -l"z" -framework "Foundation" -framework "SystemConfiguration" -framework "UIKit"
PODS_ROOT = ${SRCROOT}/Pods
当我进入构建时,即使它似乎找到其他文件,例如S3.h
,也找不到AWSCore.h
。
这个项目大约在6个月前在XCode 6.3上成功构建。 AWS SDK在过去6个月内发生了哪些变化?我现在需要使用XCode 7.0.1进行其他一些配置更改吗?
答案 0 :(得分:2)
您还需要添加
pod“AWSS3”
修改强>
我的pod文件看起来像这样
# Uncomment this line to define a global platform for your project
platform :ios, '7.0'
target 'MyAppName' do
pod 'AWSiOSSDKv2', '~> 2.2'
pod 'AWSLambda', '~> 2.2'
pod 'AWSCognito', '~> 2.2'
pod 'UICKeyChainStore', '~> 2.0'
end
target 'My AppTests' do
end
和
#import <AWSS3/AWSS3.h>
对我来说工作正常