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
381 views
in Technique[技术] by (71.8m points)

ios - 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.

I tried to fix with the solution :Xcode custom shell scripts are slowing down the compiling time , but still it slows the build process :(.

  • Build Stuck for 2m here

enter image description here

  • Build Phases enter image description here enter image description here

Further informations:

  • Xcode 8.1

  • Swift 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
See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

Finally, I found a solution for this. At least the total build time now is 57sec.

I found that 'Embed Pods Framework' (Once 'Embed Pods Framework' and 'CP Embed Pods Framework') builds twice. 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' enter image description here 2) Optimization Level on Build Settings for debug was -None. I set to Fast... enter image description here

3) Tip: use Simulator instead of Device for minimal build time.


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

...