IB Designables: Failed to update auto layout status: Failed to load designables from path (null)

IosXcode

Ios Problem Overview


I'm seeing this error for a XIB. But everything else compiles and there doesn't seem to be any harm done by this error. Is this something I need to worry about? What's the problem here and how would I go about fixing this?

enter image description here

UPDATE: I've updated cocoapods to the latest version (0.36.3) and while that fixed the problem for a few compiles, the error has returned and I'm now seeing an additional error:

enter image description here

Ios Solutions


Solution 1 - Ios

It is a known issue in CocoaPods. It has been fixed in version 0.36.1. Just update your CocoaPods and then add specific line of code to your pod file: use_frameworks! after platform :ios, '7.0'

So your file will look like this:

platform :ios, '7.0'

use_frameworks!

/// here will be dependencies etc. ///

updated:

Full list of steps to get rid of the problem once and for all:

  • Close project;
  • Open Terminal App;
  • Update CocoaPods itself to ver. 0.36.1 or later;
  • Navigate to your project folder in Terminal;
  • Type: pod update;
  • Open your project in xCode;
  • Clean project;
  • Build project again.

Solution 2 - Ios

After doing some research and digging, I can confirm, that there is no way to solve this problem.

This is an Xcode's bug.

That's all. We must wait for update.

Just restart the Xcode for now.

Solution 3 - Ios

This worked for me:

  1. remove derived data (preferences > locations)
  2. restart Xcode
  3. clean project (product > clean)

Solution 4 - Ios

2016 is the year, xCode 7.3.1: I got this error. (Using cocoa pods 1.0 but it does not matter)

CAUSE: a special UILabel subclass was used in IB. ring a bell?

ELEGANT SOLUTION:

1: Subclass TTTAttributedLabel or FXLabel or whatever u have. Use that in IB.

2: Add these lines in the subclassed .h file:

#ifndef IB_DESIGNABLE
#define IB_DESIGNABLE
#endif

@class LabelFromPod;


IB_DESIGNABLE @interface YourLabel : LabelFromPod {
 ...
}

3: then I think you have to clear project, exit xCode, rebuild (usual xCode panic protocol) and the problem will go away.

UPDATE 2017 xCode 8.2.1: It all getting worse :( The blank VC problem: The IB does not even load the UI elements for a view controllers that have these IB_DESIGNABLEs. I'm clueless :)

Solution 5 - Ios

I faced the same problem using TTTAttributedLabel and followed Andrey's answer to try to fix it. The build was successful but after that it seems that the bundle files of other pod modules (TSMessage, SVProgressHUD in my case) cannot be loaded. This is also stated in the Cocoapods blog post and I do not want to move the bundle resources to the mainBundle (and I have not verified if this works.)

Therefore I choose to remove TTTAttributedLabel from the Podfile and just include the source directly to get rid of that error. This works for me and I hope it is also another answer to this problem.

Solution 6 - Ios

May be late, but adding these codes for initialization worked for me when I got this problem

required override init(frame: CGRect) {
    super.init(frame: frame)
}

required init?(coder aDecoder: NSCoder) {
    super.init(coder: aDecoder)
}

Solution 7 - Ios

I had the same issue as I was using custom view from POD on storyboard.

Doing the following things fixed the issue for me

  • Add the following line (To turn the POD in dynamic framework) on pod use_frameworks!
  • Do pod update
  • Restart the Xcode

Solution 8 - Ios

In Podfile add this script at the end and performed pod install again.

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

Solution 9 - Ios

Updating cocoapods in Mac, with following command solved this issue partially for me:

sudo gem install cocoapods

Solution 10 - Ios

Problem might be that you have used a framework or Custom UILabel class. like MarqueLabel or TTTAttributed Label. Uncomment #use_frameworks inside pod file. Run pod update. Clean and rebuild your project. This will solve your issue.

Solution 11 - Ios

I had a similar bug, when I was using Cocoapods and was not able to use_frameworks!. I ended up by forking a framework, that uses IBDesignable and IBInspectable and removing these keywords. All customization is done programmatically:

class CardFloatingLabelTextField: SkyFloatingLabelTextField {

    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)

        self.errorMessage = nil
        self.titleFont = UIFont.systemFont(ofSize: 11)
        self.titleFormatter = { (text: String) in return text }
        self.titleColor = UIColor.channelsColorGrayFootnoteAndCaptions()
        self.selectedTitleColor = UIColor.channelsColorGrayFootnoteAndCaptions()
        self.lineColor = UIColor.channelsColorGrayContentAndLines()
        self.selectedLineColor = UIColor.channelsColorDarkBlue()
        self.lineHeight = 1
        self.selectedLineHeight = 1

    }

}

It works and doesn't create bugs in Interface builder anymore. However, it's a pity, that I had to do this workaround.

Solution 12 - Ios

Remove what you've in the Podfile and just include the source directly to fix this issue.

It works for me!

Solution 13 - Ios

I have faced this problem when both base class and child class are mentioned as @IBDesignable class. May be check with the third party class and your class if it is inherited

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionOrenView Question on Stackoverflow
Solution 1 - IosAndrei KonstantinovView Answer on Stackoverflow
Solution 2 - IosBartłomiej SemańczykView Answer on Stackoverflow
Solution 3 - IosWojtek DmyszewiczView Answer on Stackoverflow
Solution 4 - IosYaroView Answer on Stackoverflow
Solution 5 - IosralphchanView Answer on Stackoverflow
Solution 6 - IosHan DanielView Answer on Stackoverflow
Solution 7 - IosDurai Amuthan.HView Answer on Stackoverflow
Solution 8 - IosHaroldo GondimView Answer on Stackoverflow
Solution 9 - IosKawaiKxView Answer on Stackoverflow
Solution 10 - IosAshish PiseyView Answer on Stackoverflow
Solution 11 - IosDenis KutlubaevView Answer on Stackoverflow
Solution 12 - IosSunil TargeView Answer on Stackoverflow
Solution 13 - IosPushpa RajaView Answer on Stackoverflow