Подтвердить что ты не робот

Что ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES с CocoaPods, Swift 3 и Xcode 8

после установки cocoapods и добавления pod "SwiftCarousel" в файл pod и раскомментирования платформы: ios, '9.0' я получил эту ОШИБКУ

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

и что мне делать?

mohammed.elias$ pod install

Analyzing dependencies
Downloading dependencies
Installing SwiftCarousel (0.8.0)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use 'scrollView.xcworkspace' for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.

[!] The 'scrollViewTests [Debug]' target overrides the 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' build setting defined in 'Pods/Target Support Files/Pods-scrollViewTests/Pods-scrollViewTests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the '$(inherited)' flag, or
- Remove the build settings from the target.

[!] The 'scrollViewTests [Release]' target overrides the 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' build setting defined in 'Pods/Target Support Files/Pods-scrollViewTests/Pods-scrollViewTests.release.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the '$(inherited)' flag, or
- Remove the build settings from the target.

[!] The 'scrollViewUITests [Debug]' target overrides the 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' build setting defined in 'Pods/Target Support Files/Pods-scrollViewUITests/Pods-scrollViewUITests.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the '$(inherited)' flag, or
- Remove the build settings from the target.

[!] The 'scrollViewUITests [Release]' target overrides the 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' build setting defined in 'Pods/Target Support Files/Pods-scrollViewUITests/Pods-scrollViewUITests.release.xcconfig'. This can lead to problems with the CocoaPods installation
4b9b3361

Ответ 1

Перейдите сюда в настройках сборки...

введите описание изображения здесь

Затем выделите строку "Всегда вставлять..." и нажмите "Удалить". Это изменит его, чтобы использовать унаследованное свойство.

Ответ 2

Я смог решить эту проблему, выполнив следующее (шаг за шагом):

  1. Перейти в настройки сборки
  2. Вверху выберите All и Combined.
  3. В разделе "Параметры сборки" вы должны увидеть "Стандартные библиотеки Always Embed Swift", они выделены жирным шрифтом.
  4. Нажмите на него и нажмите "Удалить" (<-). Теперь он должен быть распечатан. (Обычный текст = наследовать)
  5. Под установкой и ошибки/ошибки должны уйти!

enter image description here

Ответ 3

  1. Перейти в настройки сборки
  2. Вверху выберите Все и Комбинированные
  3. В разделе "Параметры сборки" найдите "Всегда вставлять стандартные библиотеки Swift"
  4. Обновите его значение с помощью $ (наследуется)
  5. Теперь установите модуль и все ошибки должны исчезнуть.

enter image description here

Ответ 4

Принятое решение работает, но теперь вы должны убедиться, что все ваши товарищи по команде выполняют его каждый pod install.

И мы все знаем, что они не будут.

Вы можете заставить CococaPods делать это автоматически, добавив это в нижнюю часть Podfile:

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            if config.name == 'MyPOD' 
                config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'Yes'
            end
        end
    end
end

Больше информации здесь: https://www.devsbedevin.net/cocoapods-always-embed-swift-standard-libraries/

Ответ 5

Я предлагаю установить все модули после установки, как указано в сообщении:

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = '$(inherited)'
        end
    end
end