IB Designables: Failed to render and update auto layout status

后端 未结 14 1133
花落未央
花落未央 2020-12-13 04:11

I have a custom view (xib) that has a UIButton inside of it, I made id IBDesignable doing the following:

UserView.swif

相关标签:
14条回答
  • 2020-12-13 04:38
        post_install do |installer|
        installer.pods_project.build_configurations.each do |config|
            config.build_settings.delete('CODE_SIGNING_ALLOWED')
            config.build_settings.delete('CODE_SIGNING_REQUIRED')
        end
    end
    

    Entering the above-mentioned code in the Podfile solves the issues. This code just does away with the requirement of code signing for the installed framework via Cocoapods. But this seems to be a bug in IBDesignable too as using Xcode 10 bets 4 I don't get this bug due to new build system incorporated in Xcode 10.

    0 讨论(0)
  • 2020-12-13 04:41

    I disabled the 'User trait Variations' and my problem was solved.

    0 讨论(0)
  • 2020-12-13 04:42

    (xCode 9.2, Swift 4) The following may not help your exact problem but may help others with a very similar problem. This was my error:

    error: IB Designables: Failed to render and update auto layout status for CustomExampleView (XXXXX): the agent crashed

    I was able to remove the error when deleting the CustomExampleView.xib and CustomExampleView.swift. To replicate, I then re-created the files, went to the .xib and set the top level view's custom class to CustomExampleView.

    My mistake was setting the custom class to the top-level view on the .xib instead of setting the custom class on the File's Owner. After setting the proper custom class, my problem was solved.

    0 讨论(0)
  • 2020-12-13 04:42

    It is the problem with some cocoa pods versions like 1.5.0. If you are using this one then it cause to rendering failed to move from current version to other run this commands in terminal

    sudo gem uninstall cocoapods
    

    You can install any specific version by mentioning like this

    sudo gem install cocoapods -v 1.4.0
    

    Hope it will works for you.

    0 讨论(0)
  • 2020-12-13 04:44

    I don't really know much about the cause of this, but I've seen this a couple of times and every time it's fixed by just restarting xcode. I think that's where everyone should start and if that doesn't work then you can try the other suggested answers.

    0 讨论(0)
  • 2020-12-13 04:46

    I add this script at the end of my Podfile and performed pod install again. So I could build normally my project.

    post_install do |installer|
        installer.pods_project.build_configurations.each do |config|
            config.build_settings.delete('CODE_SIGNING_ALLOWED')
            config.build_settings.delete('CODE_SIGNING_REQUIRED')
        end
    end
    
    0 讨论(0)
提交回复
热议问题