Xcode 10.2, Swift 5, Command compileSwift failed while build the program with Release SchemeiOS: Pod Cache compile error with Swift 5 - Bus error: 10Command CompileSwiftSources failed with a nonzero exit code Xcode 10ld: framework not found PodsCocoapods for Swift, linker command failed for Release schemeUpdating to latest version of CocoaPods?Xcode 8.0 Swift 3.0 slow indexing and buildingBuild fails with “Command failed with a nonzero exit code”Xcode Jenkins Build Failure The following build commands failed: CompileSwift normal arm64Command CompileSwift failed with a nonzero exit code in Xcode 10Xcode 10 build fails with 'Command CompileSwift failed with a nonzero exit codeXcode 10 Command PhaseScriptExecution failed with a nonzero exit codeCommand CompileSwift failed with a nonzero exit code

What is the superlative of ipse?

What made Windows ME so crash-prone?

Did the First Order follow Poe to Jakku, or did they independently discover that the map fragment was there?

Doing research in academia and not liking competition

Why did Steve Rogers choose Sam in Endgame?

Applying for a USA B1/B2 Visa for an alien resident in Germany

Print all lines that don't have numbers, using sed

Is there an English equivalent for "Les carottes sont cuites", while keeping the vegetable reference?

Extension of trace on von Neumann subalgebra

When does Fisher's "go get more data" approach make sense?

What alternatives exist to at-will employment?

Construct a pentagon avoiding compass use

Mathematica function equivalent to Matlab's residue function (partial fraction expansion)

Was all the fuel expended in each stage of a Saturn V launch?

What is the German word or phrase for "village returning to forest"?

Re-negotiate salary once I earn my diploma

What is this called? A tube flange bearing threaded for threaded pushrod

Why run a service as a system user?

What's the phrasal verb for carbonated drinks exploding out of the can after being shaken?

Can a polymorphed creature understand languages spoken under the effect of Tongues?

What are "full piece" and "half piece" in chess?

What is this old "lemon-squeezer" shaped pan

Is there a way to handmake alphabet pasta?

Does knowing a graph has a Hamiltonian Cycle make it easier to find the cycle?



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


iOS: Pod Cache compile error with Swift 5 - Bus error: 10Command CompileSwiftSources failed with a nonzero exit code Xcode 10ld: framework not found PodsCocoapods for Swift, linker command failed for Release schemeUpdating to latest version of CocoaPods?Xcode 8.0 Swift 3.0 slow indexing and buildingBuild fails with “Command failed with a nonzero exit code”Xcode Jenkins Build Failure The following build commands failed: CompileSwift normal arm64Command CompileSwift failed with a nonzero exit code in Xcode 10Xcode 10 build fails with 'Command CompileSwift failed with a nonzero exit codeXcode 10 Command PhaseScriptExecution failed with a nonzero exit codeCommand CompileSwift failed with a nonzero exit code






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








16















I'm using Xcode 10.2, Swift 5.



With Debug scheme, no issue happens, but with Release scheme when I build or archive, it shows Command compileSwift failed with a nonzero exit code.



I've tried delete DerivedData / Clean / pod deintegrate & pod install & pod update. None of these works.



enter image description hereenter image description here










share|improve this question
























  • can you please share the name of pods which you are using

    – shivi_shub
    Mar 26 at 7:25











  • try to remove the messed up pods from the Podfile and perform a pod install. ** if that doesn't work try: ** Clean and build the project. Add again the Pods to the Podfile and perform a pod install. Clean and build the project again using a real device if possible. ** try this if the above two dont work: ** make sure to Set Swift version to your current version then pod deintegrate, pod install, fix this

    – Sanad Barjawi
    Mar 26 at 7:27












  • Here are the pod list: Alamofire, Kingfisher, SwiftyJSON, SnapKit, SwifterSwift, LightBox @shivi_shub

    – Ran Bi
    Mar 26 at 7:38











  • # pod 'Alamofire' # pod 'Kingfisher' # pod 'SwiftyJSON' # pod 'SnapKit' pod 'DeviceKit' pod 'PKHUD' pod 'FMDB' # pod 'SwifterSwift' pod 'Tabman', '~> 2.2' pod 'FLEX', '~> 2.0' pod 'MJRefresh' pod 'UITextView+Placeholder' pod 'Bugly' # pod 'Lightbox' pod 'FSCalendar' pod 'RxSwift', '~> 4.0' pod 'RxCocoa', '~> 4.0' here are all the pods I'm using

    – Ran Bi
    Mar 26 at 7:40











  • i think one of your pod is not compatible with swift 5

    – shivi_shub
    Mar 26 at 9:01

















16















I'm using Xcode 10.2, Swift 5.



With Debug scheme, no issue happens, but with Release scheme when I build or archive, it shows Command compileSwift failed with a nonzero exit code.



I've tried delete DerivedData / Clean / pod deintegrate & pod install & pod update. None of these works.



enter image description hereenter image description here










share|improve this question
























  • can you please share the name of pods which you are using

    – shivi_shub
    Mar 26 at 7:25











  • try to remove the messed up pods from the Podfile and perform a pod install. ** if that doesn't work try: ** Clean and build the project. Add again the Pods to the Podfile and perform a pod install. Clean and build the project again using a real device if possible. ** try this if the above two dont work: ** make sure to Set Swift version to your current version then pod deintegrate, pod install, fix this

    – Sanad Barjawi
    Mar 26 at 7:27












  • Here are the pod list: Alamofire, Kingfisher, SwiftyJSON, SnapKit, SwifterSwift, LightBox @shivi_shub

    – Ran Bi
    Mar 26 at 7:38











  • # pod 'Alamofire' # pod 'Kingfisher' # pod 'SwiftyJSON' # pod 'SnapKit' pod 'DeviceKit' pod 'PKHUD' pod 'FMDB' # pod 'SwifterSwift' pod 'Tabman', '~> 2.2' pod 'FLEX', '~> 2.0' pod 'MJRefresh' pod 'UITextView+Placeholder' pod 'Bugly' # pod 'Lightbox' pod 'FSCalendar' pod 'RxSwift', '~> 4.0' pod 'RxCocoa', '~> 4.0' here are all the pods I'm using

    – Ran Bi
    Mar 26 at 7:40











  • i think one of your pod is not compatible with swift 5

    – shivi_shub
    Mar 26 at 9:01













16












16








16


2






I'm using Xcode 10.2, Swift 5.



With Debug scheme, no issue happens, but with Release scheme when I build or archive, it shows Command compileSwift failed with a nonzero exit code.



I've tried delete DerivedData / Clean / pod deintegrate & pod install & pod update. None of these works.



enter image description hereenter image description here










share|improve this question
















I'm using Xcode 10.2, Swift 5.



With Debug scheme, no issue happens, but with Release scheme when I build or archive, it shows Command compileSwift failed with a nonzero exit code.



I've tried delete DerivedData / Clean / pod deintegrate & pod install & pod update. None of these works.



enter image description hereenter image description here







ios swift xcode cocoapods






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 26 at 9:15









k.s.

1,20612 silver badges16 bronze badges




1,20612 silver badges16 bronze badges










asked Mar 26 at 7:23









Ran BiRan Bi

811 silver badge5 bronze badges




811 silver badge5 bronze badges












  • can you please share the name of pods which you are using

    – shivi_shub
    Mar 26 at 7:25











  • try to remove the messed up pods from the Podfile and perform a pod install. ** if that doesn't work try: ** Clean and build the project. Add again the Pods to the Podfile and perform a pod install. Clean and build the project again using a real device if possible. ** try this if the above two dont work: ** make sure to Set Swift version to your current version then pod deintegrate, pod install, fix this

    – Sanad Barjawi
    Mar 26 at 7:27












  • Here are the pod list: Alamofire, Kingfisher, SwiftyJSON, SnapKit, SwifterSwift, LightBox @shivi_shub

    – Ran Bi
    Mar 26 at 7:38











  • # pod 'Alamofire' # pod 'Kingfisher' # pod 'SwiftyJSON' # pod 'SnapKit' pod 'DeviceKit' pod 'PKHUD' pod 'FMDB' # pod 'SwifterSwift' pod 'Tabman', '~> 2.2' pod 'FLEX', '~> 2.0' pod 'MJRefresh' pod 'UITextView+Placeholder' pod 'Bugly' # pod 'Lightbox' pod 'FSCalendar' pod 'RxSwift', '~> 4.0' pod 'RxCocoa', '~> 4.0' here are all the pods I'm using

    – Ran Bi
    Mar 26 at 7:40











  • i think one of your pod is not compatible with swift 5

    – shivi_shub
    Mar 26 at 9:01

















  • can you please share the name of pods which you are using

    – shivi_shub
    Mar 26 at 7:25











  • try to remove the messed up pods from the Podfile and perform a pod install. ** if that doesn't work try: ** Clean and build the project. Add again the Pods to the Podfile and perform a pod install. Clean and build the project again using a real device if possible. ** try this if the above two dont work: ** make sure to Set Swift version to your current version then pod deintegrate, pod install, fix this

    – Sanad Barjawi
    Mar 26 at 7:27












  • Here are the pod list: Alamofire, Kingfisher, SwiftyJSON, SnapKit, SwifterSwift, LightBox @shivi_shub

    – Ran Bi
    Mar 26 at 7:38











  • # pod 'Alamofire' # pod 'Kingfisher' # pod 'SwiftyJSON' # pod 'SnapKit' pod 'DeviceKit' pod 'PKHUD' pod 'FMDB' # pod 'SwifterSwift' pod 'Tabman', '~> 2.2' pod 'FLEX', '~> 2.0' pod 'MJRefresh' pod 'UITextView+Placeholder' pod 'Bugly' # pod 'Lightbox' pod 'FSCalendar' pod 'RxSwift', '~> 4.0' pod 'RxCocoa', '~> 4.0' here are all the pods I'm using

    – Ran Bi
    Mar 26 at 7:40











  • i think one of your pod is not compatible with swift 5

    – shivi_shub
    Mar 26 at 9:01
















can you please share the name of pods which you are using

– shivi_shub
Mar 26 at 7:25





can you please share the name of pods which you are using

– shivi_shub
Mar 26 at 7:25













try to remove the messed up pods from the Podfile and perform a pod install. ** if that doesn't work try: ** Clean and build the project. Add again the Pods to the Podfile and perform a pod install. Clean and build the project again using a real device if possible. ** try this if the above two dont work: ** make sure to Set Swift version to your current version then pod deintegrate, pod install, fix this

– Sanad Barjawi
Mar 26 at 7:27






try to remove the messed up pods from the Podfile and perform a pod install. ** if that doesn't work try: ** Clean and build the project. Add again the Pods to the Podfile and perform a pod install. Clean and build the project again using a real device if possible. ** try this if the above two dont work: ** make sure to Set Swift version to your current version then pod deintegrate, pod install, fix this

– Sanad Barjawi
Mar 26 at 7:27














Here are the pod list: Alamofire, Kingfisher, SwiftyJSON, SnapKit, SwifterSwift, LightBox @shivi_shub

– Ran Bi
Mar 26 at 7:38





Here are the pod list: Alamofire, Kingfisher, SwiftyJSON, SnapKit, SwifterSwift, LightBox @shivi_shub

– Ran Bi
Mar 26 at 7:38













# pod 'Alamofire' # pod 'Kingfisher' # pod 'SwiftyJSON' # pod 'SnapKit' pod 'DeviceKit' pod 'PKHUD' pod 'FMDB' # pod 'SwifterSwift' pod 'Tabman', '~> 2.2' pod 'FLEX', '~> 2.0' pod 'MJRefresh' pod 'UITextView+Placeholder' pod 'Bugly' # pod 'Lightbox' pod 'FSCalendar' pod 'RxSwift', '~> 4.0' pod 'RxCocoa', '~> 4.0' here are all the pods I'm using

– Ran Bi
Mar 26 at 7:40





# pod 'Alamofire' # pod 'Kingfisher' # pod 'SwiftyJSON' # pod 'SnapKit' pod 'DeviceKit' pod 'PKHUD' pod 'FMDB' # pod 'SwifterSwift' pod 'Tabman', '~> 2.2' pod 'FLEX', '~> 2.0' pod 'MJRefresh' pod 'UITextView+Placeholder' pod 'Bugly' # pod 'Lightbox' pod 'FSCalendar' pod 'RxSwift', '~> 4.0' pod 'RxCocoa', '~> 4.0' here are all the pods I'm using

– Ran Bi
Mar 26 at 7:40













i think one of your pod is not compatible with swift 5

– shivi_shub
Mar 26 at 9:01





i think one of your pod is not compatible with swift 5

– shivi_shub
Mar 26 at 9:01












6 Answers
6






active

oldest

votes


















7














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






share|improve this answer























  • Worded like a charm, thank you.

    – Ran Bi
    Apr 17 at 2:20











  • Worked for me..

    – czane
    Apr 24 at 21:45


















5














I fixed this issue by going Pods Project then to the building settings and setting Compilation Mode to Incremental for Release. Then clean and archive, should compile fine then.






share|improve this answer























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

    – Olcay Ertaş
    Mar 28 at 9:13


















1














So I had same issue when updating my project to Swift 5.
For some reason, Cocoapods (latest version, 1.6.1) set the SWIFT_VERSION of some pods to Swift 5 even if they're released as Swift 4, 4.1, 4.2 pods.
So I had to add a post install script that set the correction version of swift like so



post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'CryptoSwift' || target.name == 'SwiftyBeaver'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
end





share|improve this answer























  • I've set all the target of Pod Project's Swift Language Version to 4.2 manually, as well as my own project, but still it won't work.

    – Ran Bi
    Mar 26 at 14:20


















1














I had the same issue after upgrading to Xcode 10.2. After following the steps below it worked for me:



  1. Update pods

  2. Clean project folder

  3. Change Pods project's Swift Language Version to Unspecified and (as suggested by @Neil Faulkner) Compilation Mode to Incremental





share|improve this answer






























    1














    I had to set "Optimization Level" in "Swift Compiler - Code Generation" to "Release" - "No Optimization [-Onone]" from "Optimize for speed" to make Cache pass Archive.



    Same with SwiftyBeaver



    It seems a problem related to Xcode 10.2. Also other pod projects seems to be fine with Optimization, like Toucan or XCGLogger.






    share|improve this answer






























      0














      you can follow this steps...



      1. Make sure to change Swift version to your current version.

      2. Update all your pods.

      3. Clean all derived data of Xcode.

      4. Now Restart your Mac.

      You are getting all those error's just because of pods..so either you need to update every pod that you are using.






      share|improve this answer


















      • 1





        Thanks for answering, but I've tried all these steps, it didn't work for me.

        – Ran Bi
        Mar 26 at 7:50













      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351736%2fxcode-10-2-swift-5-command-compileswift-failed-while-build-the-program-with-re%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      6 Answers
      6






      active

      oldest

      votes








      6 Answers
      6






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      7














      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






      share|improve this answer























      • Worded like a charm, thank you.

        – Ran Bi
        Apr 17 at 2:20











      • Worked for me..

        – czane
        Apr 24 at 21:45















      7














      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






      share|improve this answer























      • Worded like a charm, thank you.

        – Ran Bi
        Apr 17 at 2:20











      • Worked for me..

        – czane
        Apr 24 at 21:45













      7












      7








      7







      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






      share|improve this answer













      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







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Mar 29 at 11:43









      Olcay ErtaşOlcay Ertaş

      2,5756 gold badges57 silver badges87 bronze badges




      2,5756 gold badges57 silver badges87 bronze badges












      • Worded like a charm, thank you.

        – Ran Bi
        Apr 17 at 2:20











      • Worked for me..

        – czane
        Apr 24 at 21:45

















      • Worded like a charm, thank you.

        – Ran Bi
        Apr 17 at 2:20











      • Worked for me..

        – czane
        Apr 24 at 21:45
















      Worded like a charm, thank you.

      – Ran Bi
      Apr 17 at 2:20





      Worded like a charm, thank you.

      – Ran Bi
      Apr 17 at 2:20













      Worked for me..

      – czane
      Apr 24 at 21:45





      Worked for me..

      – czane
      Apr 24 at 21:45













      5














      I fixed this issue by going Pods Project then to the building settings and setting Compilation Mode to Incremental for Release. Then clean and archive, should compile fine then.






      share|improve this answer























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

        – Olcay Ertaş
        Mar 28 at 9:13















      5














      I fixed this issue by going Pods Project then to the building settings and setting Compilation Mode to Incremental for Release. Then clean and archive, should compile fine then.






      share|improve this answer























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

        – Olcay Ertaş
        Mar 28 at 9:13













      5












      5








      5







      I fixed this issue by going Pods Project then to the building settings and setting Compilation Mode to Incremental for Release. Then clean and archive, should compile fine then.






      share|improve this answer













      I fixed this issue by going Pods Project then to the building settings and setting Compilation Mode to Incremental for Release. Then clean and archive, should compile fine then.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Mar 26 at 15:44









      Neil FaulknerNeil Faulkner

      3501 gold badge3 silver badges19 bronze badges




      3501 gold badge3 silver badges19 bronze badges












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

        – Olcay Ertaş
        Mar 28 at 9:13

















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

        – Olcay Ertaş
        Mar 28 at 9:13
















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

      – Olcay Ertaş
      Mar 28 at 9:13





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

      – Olcay Ertaş
      Mar 28 at 9:13











      1














      So I had same issue when updating my project to Swift 5.
      For some reason, Cocoapods (latest version, 1.6.1) set the SWIFT_VERSION of some pods to Swift 5 even if they're released as Swift 4, 4.1, 4.2 pods.
      So I had to add a post install script that set the correction version of swift like so



      post_install do |installer|
      installer.pods_project.targets.each do |target|
      if target.name == 'CryptoSwift' || target.name == 'SwiftyBeaver'
      target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.2'
      end
      end
      end
      end





      share|improve this answer























      • I've set all the target of Pod Project's Swift Language Version to 4.2 manually, as well as my own project, but still it won't work.

        – Ran Bi
        Mar 26 at 14:20















      1














      So I had same issue when updating my project to Swift 5.
      For some reason, Cocoapods (latest version, 1.6.1) set the SWIFT_VERSION of some pods to Swift 5 even if they're released as Swift 4, 4.1, 4.2 pods.
      So I had to add a post install script that set the correction version of swift like so



      post_install do |installer|
      installer.pods_project.targets.each do |target|
      if target.name == 'CryptoSwift' || target.name == 'SwiftyBeaver'
      target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.2'
      end
      end
      end
      end





      share|improve this answer























      • I've set all the target of Pod Project's Swift Language Version to 4.2 manually, as well as my own project, but still it won't work.

        – Ran Bi
        Mar 26 at 14:20













      1












      1








      1







      So I had same issue when updating my project to Swift 5.
      For some reason, Cocoapods (latest version, 1.6.1) set the SWIFT_VERSION of some pods to Swift 5 even if they're released as Swift 4, 4.1, 4.2 pods.
      So I had to add a post install script that set the correction version of swift like so



      post_install do |installer|
      installer.pods_project.targets.each do |target|
      if target.name == 'CryptoSwift' || target.name == 'SwiftyBeaver'
      target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.2'
      end
      end
      end
      end





      share|improve this answer













      So I had same issue when updating my project to Swift 5.
      For some reason, Cocoapods (latest version, 1.6.1) set the SWIFT_VERSION of some pods to Swift 5 even if they're released as Swift 4, 4.1, 4.2 pods.
      So I had to add a post install script that set the correction version of swift like so



      post_install do |installer|
      installer.pods_project.targets.each do |target|
      if target.name == 'CryptoSwift' || target.name == 'SwiftyBeaver'
      target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.2'
      end
      end
      end
      end






      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Mar 26 at 10:22









      DimillianDimillian

      2,0973 gold badges26 silver badges46 bronze badges




      2,0973 gold badges26 silver badges46 bronze badges












      • I've set all the target of Pod Project's Swift Language Version to 4.2 manually, as well as my own project, but still it won't work.

        – Ran Bi
        Mar 26 at 14:20

















      • I've set all the target of Pod Project's Swift Language Version to 4.2 manually, as well as my own project, but still it won't work.

        – Ran Bi
        Mar 26 at 14:20
















      I've set all the target of Pod Project's Swift Language Version to 4.2 manually, as well as my own project, but still it won't work.

      – Ran Bi
      Mar 26 at 14:20





      I've set all the target of Pod Project's Swift Language Version to 4.2 manually, as well as my own project, but still it won't work.

      – Ran Bi
      Mar 26 at 14:20











      1














      I had the same issue after upgrading to Xcode 10.2. After following the steps below it worked for me:



      1. Update pods

      2. Clean project folder

      3. Change Pods project's Swift Language Version to Unspecified and (as suggested by @Neil Faulkner) Compilation Mode to Incremental





      share|improve this answer



























        1














        I had the same issue after upgrading to Xcode 10.2. After following the steps below it worked for me:



        1. Update pods

        2. Clean project folder

        3. Change Pods project's Swift Language Version to Unspecified and (as suggested by @Neil Faulkner) Compilation Mode to Incremental





        share|improve this answer

























          1












          1








          1







          I had the same issue after upgrading to Xcode 10.2. After following the steps below it worked for me:



          1. Update pods

          2. Clean project folder

          3. Change Pods project's Swift Language Version to Unspecified and (as suggested by @Neil Faulkner) Compilation Mode to Incremental





          share|improve this answer













          I had the same issue after upgrading to Xcode 10.2. After following the steps below it worked for me:



          1. Update pods

          2. Clean project folder

          3. Change Pods project's Swift Language Version to Unspecified and (as suggested by @Neil Faulkner) Compilation Mode to Incremental






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 27 at 21:56









          cgontijocgontijo

          261 silver badge4 bronze badges




          261 silver badge4 bronze badges





















              1














              I had to set "Optimization Level" in "Swift Compiler - Code Generation" to "Release" - "No Optimization [-Onone]" from "Optimize for speed" to make Cache pass Archive.



              Same with SwiftyBeaver



              It seems a problem related to Xcode 10.2. Also other pod projects seems to be fine with Optimization, like Toucan or XCGLogger.






              share|improve this answer



























                1














                I had to set "Optimization Level" in "Swift Compiler - Code Generation" to "Release" - "No Optimization [-Onone]" from "Optimize for speed" to make Cache pass Archive.



                Same with SwiftyBeaver



                It seems a problem related to Xcode 10.2. Also other pod projects seems to be fine with Optimization, like Toucan or XCGLogger.






                share|improve this answer

























                  1












                  1








                  1







                  I had to set "Optimization Level" in "Swift Compiler - Code Generation" to "Release" - "No Optimization [-Onone]" from "Optimize for speed" to make Cache pass Archive.



                  Same with SwiftyBeaver



                  It seems a problem related to Xcode 10.2. Also other pod projects seems to be fine with Optimization, like Toucan or XCGLogger.






                  share|improve this answer













                  I had to set "Optimization Level" in "Swift Compiler - Code Generation" to "Release" - "No Optimization [-Onone]" from "Optimize for speed" to make Cache pass Archive.



                  Same with SwiftyBeaver



                  It seems a problem related to Xcode 10.2. Also other pod projects seems to be fine with Optimization, like Toucan or XCGLogger.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 31 at 12:12









                  An ChinAn Chin

                  3783 silver badges8 bronze badges




                  3783 silver badges8 bronze badges





















                      0














                      you can follow this steps...



                      1. Make sure to change Swift version to your current version.

                      2. Update all your pods.

                      3. Clean all derived data of Xcode.

                      4. Now Restart your Mac.

                      You are getting all those error's just because of pods..so either you need to update every pod that you are using.






                      share|improve this answer


















                      • 1





                        Thanks for answering, but I've tried all these steps, it didn't work for me.

                        – Ran Bi
                        Mar 26 at 7:50















                      0














                      you can follow this steps...



                      1. Make sure to change Swift version to your current version.

                      2. Update all your pods.

                      3. Clean all derived data of Xcode.

                      4. Now Restart your Mac.

                      You are getting all those error's just because of pods..so either you need to update every pod that you are using.






                      share|improve this answer


















                      • 1





                        Thanks for answering, but I've tried all these steps, it didn't work for me.

                        – Ran Bi
                        Mar 26 at 7:50













                      0












                      0








                      0







                      you can follow this steps...



                      1. Make sure to change Swift version to your current version.

                      2. Update all your pods.

                      3. Clean all derived data of Xcode.

                      4. Now Restart your Mac.

                      You are getting all those error's just because of pods..so either you need to update every pod that you are using.






                      share|improve this answer













                      you can follow this steps...



                      1. Make sure to change Swift version to your current version.

                      2. Update all your pods.

                      3. Clean all derived data of Xcode.

                      4. Now Restart your Mac.

                      You are getting all those error's just because of pods..so either you need to update every pod that you are using.







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Mar 26 at 7:46









                      AshishAshish

                      1013 bronze badges




                      1013 bronze badges







                      • 1





                        Thanks for answering, but I've tried all these steps, it didn't work for me.

                        – Ran Bi
                        Mar 26 at 7:50












                      • 1





                        Thanks for answering, but I've tried all these steps, it didn't work for me.

                        – Ran Bi
                        Mar 26 at 7:50







                      1




                      1





                      Thanks for answering, but I've tried all these steps, it didn't work for me.

                      – Ran Bi
                      Mar 26 at 7:50





                      Thanks for answering, but I've tried all these steps, it didn't work for me.

                      – Ran Bi
                      Mar 26 at 7:50

















                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351736%2fxcode-10-2-swift-5-command-compileswift-failed-while-build-the-program-with-re%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                      SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                      은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현