Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
801 views
in Technique[技术] by (71.8m points)

ios - Xcode 11 stuck on archiving

I‘m using Xcode 11 GM 2 to archive my app. It uses CocoaPods and Swift. When trying to archive my app, it infinitely gets stuck here: error This still happens after removing Firebase or other frameworks. Any ideas on how to resolve this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This could help (I was having an issue with SwiftSoup, another CocoaPod). I was experiencing inexplicable hangs while trying to get Xcode 11 to archive my app (even at the command line). This is not meant to be a permanent fix, but rather a temporary workaround (in other words, we shouldn't have to do this to get a problematic library to build)!

Add this to the bottom of your Podfile and re-run pod install.

post_install do |installer|
  installer.pods_project.targets.each do |target|
    next unless target.name == '<NAME OF POD>'
    target.build_configurations.each do |config|
      next unless config.name.start_with?('Release')
      config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
    end
  end
end

Then try to archive your project. If that doesn't work… perhaps try messing around with other compiler optimization settings?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...