pod安装遇到 Could not automatically select an Xcode project. Specify one in your Podfile like so:问题解决

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

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容