2016-11-10 107 views
4

運行2個自定義shell腳本中的1個嘗試構建應用程序時,它停留了2分鐘。在Xcode中運行2分鐘的定製shell腳本2分鐘內停留

我試圖與解決方案來解決:Xcode custom shell scripts are slowing down the compiling time,但仍減緩構建過程:(

  • 構建卡住,實現2M這裏

enter image description here

  • 構建階段。 enter image description here enter image description here

進一步的信息:

  • 的Xcode 8.1

  • 夫特3.0

Podfile:

# Uncomment this line to define a global platform for your project 
platform :ios, '9.0' 
# Uncomment this line if you're using Swift 
use_frameworks! 

target 'MyProject' do 
    # Network 
    pod 'Alamofire' 
    pod 'SwiftyJSON' 

    # UI side 
    pod 'Material', git: 'https://github.com/CosmicMind/Material.git', branch: 'development' 
    pod 'SDWebImage' 
    pod 'UIScrollView-InfiniteScroll' 
    pod 'TPKeyboardAvoiding' 

    pod 'SwiftKeychainWrapper', git: 'https://github.com/jrendel/SwiftKeychainWrapper.git', branch: 'develop' 
    pod 'DropDown' 

    # Facebook 
    pod 'FacebookCore' 
    pod 'FacebookLogin' 
    pod 'FacebookShare' 

    # Autolayout 
    pod 'SnapKit' 
    pod 'KeepLayout' 

    # Metrics 
    pod 'Google/Analytics' 

    # Fabric.io 
    pod 'Fabric' 
    pod 'Crashlytics' 

end 

target 'MyProjectTests' do 

end 

target 'MyProjectUITests' do 

end 

回答

8

最後,我foun爲此提供解決方案。現在至少總建造時間是57秒。

我發現'Embed Pods Framework'(一旦'Embed Pods Framework''CP Embed Pods Framework')建立的兩倍。無論如何,我不知道我爲什麼在構建階段擁有他們兩個。

我在Report Navigator上找到了這個。 Report Navigator

解決方案:

1)我只讓積極✓ Run script only when installing只爲​​ enter image description here 2)構建設置優化級別調試是-None。我設置爲Fast..

3)提示:使用模擬器而不是爲最小的編譯時間設備

+0

我這樣做,我有更多的問題:/ – Pavlos

0

添加了這個在你們的末日Podfile

post_install do |installer| 
    puts("Update debug pod settings to speed up build time") 
    Dir.glob(File.join("Pods", "**", "Pods*{debug,Private}.xcconfig")).each do |file| 
    File.open(file, 'a') { |f| f.puts "\nDEBUG_INFORMATION_FORMAT = dwarf" } 
    end 
end