Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

482
Visualizações
iOS: Pod Cache compile error with Swift 5 - Bus error: 10

I have updated to Xcode 10.2. When I try to get an archive I am getting Illegal instruction: 4 error for following pod dependencies:

  • AKSideMenu
  • Cache
  • IQKeyboardManagerSwift
  • Eureka
  • SwiftDate

My project Swift version is set to 4.2. I am able to build and run my project on a device. I have tried to set Swift version to 5 for all my dependencies but it didn't work. I have also tried to restart my computer and clearing Xcode archives and derived data.

Before posting this question I have also disabled inhibit_all_warnings!in my pod file and run pod update and try to archive again but this time I got Command SwiftCodeGeneration failed with a nonzero exit code error for all pods listed above and Bus error: 10 for pod  Cache.

How can I fix this?

UPDATE:

Please look at this question for solution:

Xcode 10.2, Swift 5, Command compileSwift failed while build the program with Release Scheme

Go to project build settings Project → Build Settings → Swift Compiler - Code Generation → Compilation Mode → Release and set to Incremental

This is working but building an archive is taking too much time.

UPDATE 2:

For my project problem was related to pod Cache which gives error when Optimization Level for Release is set to Optimize for Speed [-O]. I have set Compilation Mode to Whole Module again and set optimization level for the pod in pod file:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    # Cache pod does not accept optimization level '-O', causing Bus 10 error. Use '-Osize' or '-Onone'
    if target.name == 'Cache'
      target.build_configurations.each do |config|
        level = '-Osize'
        config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = level
        puts "Set #{target.name} #{config.name} to Optimization Level #{level}"
      end
    end
  end
end

Refrence: https://github.com/hyperoslo/Cache/issues/233#issuecomment-477749560

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda