首页 > 解决方案 > 创建自己的 Pod 库 Swift 并得到 ERROR | [iOS] xcodebuild:返回不成功的退出代码

问题描述

我正在学习制作自己的 pod 库,链接如下:https ://github.com/ranggaleoo/LeoPopScreen

但是当我pod lib lint在释放 pod 之前运行命令时,出现错误:


 -> LeoPopScreen (0.1.0)
    - ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - NOTE  | xcodebuild:  note: Using new build system
    - NOTE  | xcodebuild:  note: Building targets in parallel
    - NOTE  | xcodebuild:  note: Using codesigning identity override: -
    - NOTE  | [iOS] xcodebuild:  note: Planning build
    - NOTE  | [iOS] xcodebuild:  note: Constructing build description
    - NOTE  | [iOS] xcodebuild:  warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'LeoPopScreen' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'Pods-App' from project 'Pods')
    - NOTE  | [iOS] xcodebuild:  /Users/ranggaleo/Downloads/Project/LeoPopScreen/LeoPopScreen/LeoPopScreen/Classes/LeoPopScreen.xib:zyP-PG-5ZG: error: UIStackView before iOS 9.0 [6]
    - NOTE  | [iOS] xcodebuild:  warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'App' from project 'App')
    - NOTE  | [iOS] xcodebuild:  warning: Skipping code signing because the target does not have an Info.plist file and one is not being generated automatically. (in target 'App' from project 'App')```


has anyone ever experienced? how to fix it?

标签: iosswiftcocoapods

解决方案


如果您使用的是 Xcode 12,请将 ios 部署目标设置为至少 9.0:

s.ios.deployment_target = '9.0'


推荐阅读