pod安装,遇到 Could not automatically select an Xcode project. Specify one in your Podfile like so:问题解决
开发SDK的demo复合项目中使用pod安装三方库完整写法如下:
因为缺少: project projectsArray[index]折行代码导致出错
platform :ios, '12.0'
workspace 'abc.xcworkspace'
# 工程的名称
projectsArray = ['abc/abc.xcodeproj',
'abcdemo/abcdemo.xcodeproj'
]
targetsArray = ['abc', 'abcdemo']
source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git’
for index in 0..targetsArray.length - 1 do
targetName = targetsArray[index]
target targetName do
project projectsArray[index]
pod 'AFNetworking'
end
end
网友评论