美文网首页
pod安装遇到 Could not automatically

pod安装遇到 Could not automatically

作者: yeshenchen | 来源:发表于2022-03-15 20:01 被阅读0次

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

相关文章

网友评论

      本文标题:pod安装遇到 Could not automatically

      本文链接:https://www.haomeiwen.com/subject/wqgydrtx.html