Создайте собственную модульную библиотеку Swift и получите ОШИБКУ | [iOS] xcodebuild: вернул неудачный код выхода

#ios #swift #cocoapods

#iOS #swift #cocoapods

Вопрос:

Я учусь создавать свою собственную библиотеку модулей, вот ссылка: https://github.com/ranggaleoo/LeoPopScreen

но когда я запускаю команду pod lib lint перед выпуском модуля, я получаю сообщение об ошибке:

 
 -> 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?
  

Ответ №1:

Если вы используете Xcode 12, установите для цели развертывания ios значение не менее 9.0:

s.ios.deployment_target = '9.0'