[英]Running 1 of 2 custom shell script stuck for 2 minutes in Xcode
Running 1 of 2 custom shell scripts it stuck for 2 minutes while trying to build the app. 在尝试构建应用程序时, 运行2个自定义shell脚本中的1个,它会停留2分钟。
I tried to fix with the solution : Xcode custom shell scripts are slowing down the compiling time , but still it slows the build process :(. 我试图修复解决方案: Xcode自定义shell脚本正在减慢编译时间 ,但仍然会减慢构建过程:(。
Further informations: 进一步的信息:
Xcode 8.1 Xcode 8.1
Swift 3.0 Swift 3.0
Podfile: 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
Finally, I found a solution for this. 最后,我找到了解决方案。 At least the total build time now is 57sec. 至少现在的总构建时间是57秒。
I found that 'Embed Pods Framework'
(Once 'Embed Pods Framework'
and 'CP Embed Pods Framework'
) builds twice. 我发现'Embed Pods Framework'
(曾经'Embed Pods Framework'
和'CP Embed Pods Framework'
)构建了两次。 Anyway, I don't have an idea why I have both of them on build phases. 无论如何,我不知道为什么我在构建阶段都有这两个。
I found for this on Report Navigator. 我在Report Navigator上找到了这个。
Solution: 解:
1) I let only active ✓ Run script only when installing
only for '[CP]Embed Pods Framework'
1)我只允许激活✓ Run script only when installing
'[CP]Embed Pods Framework'
✓ Run script only when installing
2) Optimization Level on Build Settings for debug was -None
. 2)构建的优化级别调试的设置是-None
。 I set to Fast..
. 我设置为Fast..
3) Tip: use Simulator instead of Device for minimal build time. 3)提示:使用模拟器而不是设备来缩短构建时间。
Added this at the end of you Podfile
在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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.