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

13

81

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

Heidiheidie answered 28/1, 2015 at 23:4 Comment(1)
#50644806 This will help youGumm
P
80

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.
Portcullis answered 6/3, 2015 at 20:39 Comment(15)
Actually just updating cocoapods seemed to do the trick for me. I'm surprised cocoapods was giving me an error in an unrelated XIB but so it goes...Heidiheidie
I take that back. The error has returned. I made the additional changes you suggested and the error still persists and I now also get multiple O-link warnings about iOS8Heidiheidie
What if you Clean project via Cmd + K and then Build again?Portcullis
Tried that multiple times. no luckHeidiheidie
Can you check one more time your CocoaPods version via Terminal?Portcullis
I had 0.36.1. The problem was actually I needed to regenerate the pod project again. Once I did that then the errors went away! Thanks!Heidiheidie
Geez now the errors are back again! It seems like that's only a temporary solution.Heidiheidie
I've updated my answer with full list of steps. Can you confirm that you already did this in the same exact order?Portcullis
I followed your exact steps, including updating cocoapods again (FYI, it's "pod update" for step 5). The error message again went away. But as soon as I opened the offending XIB again the error message reappeared.Heidiheidie
Maybe it's the problem with specific framework/ UI extension, because my errors all goes away, forever. What is the pod which still brings you the errors? And thanks for edit. Fixed that part.Portcullis
You're right. I'm referencing TTTAttributedLabel in my XIB. As soon as I remove that the error goes away. If I put it back, the error returns. I'm not sure what I can do about that now but at least I know the cause. Thanks for your help!Heidiheidie
I found one more solution, that may or may not help you. You need to check valid architectures of the project. So, they are ended like "arm64 armv7 armv7s".Portcullis
it seems best solution for now!Lindstrom
I just added "use_frameworks!" and everything starts working fine with FSCalender. ThanksStudner
I had this problem because my pod depended on another. Looks like this issue has been known for a couple years, but no one has had the time to fix it yet: github.com/CocoaPods/CocoaPods/issues/5334Zedoary
S
33

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.

Soosoochow answered 24/6, 2015 at 22:56 Comment(11)
that's true. for me it has nothing to do with cocoa pods, it happens with my own IB designables all the time. tried everything...Khartoum
Yes, I didnt use CocoaPods in my app for IBDesignables.Yawning
What version of Xcode was this? I'm using 7.1.0, I still have itLieutenancy
i was using 7.2 and just due to your this comment i waited for 7.3 , but the problem is same.. please let me know in case you have some other solutionHelotism
Same problem here. This is irritating as i'm using a custom form input view for all my form inputs and as soon as I add one... that's it... no more updating the constraints for me...Arista
I'm using Xcode 8.0 this issue is still not addressed.Comenius
The interface builder is very slow and buggy. Almost can't be used for Component design. Yes, it's still the same in Xcode 8.0. I think one of the most important reason I enjoy more in ios development than android development is the IDE tool is much better. Apple did very bad job in their xcode tool. It's becoming worse and worse!!!Affiche
I'm on Xcode 8.2, and it's still the same after 1.5 years. Unbelievable.Cryan
Same here with XCode 8.2.1. Also purging derived data or init methods definitions didn't change the situation. In addition in the project there is no pod or carthage or so onTubular
To jest już skandalButler
This came back with Xcode 13: Failed to render and update auto layout status for ...: Failed to load designables from path (null) - for me it's complaining about a color set, even though it exists. At first it threw the error for 3 ViewControllers, so I added a print and deleted it again, which removed it for 2 of them but after trying the same thing for the 3rd VC, the error now also shows up for a 4th. It also started an iPad simulator that I haven't used in a while, even though a different one is selected.Leverhulme
P
17

This worked for me:

  1. remove derived data (preferences > locations)
  2. restart Xcode
  3. clean project (product > clean)
Pashto answered 30/8, 2016 at 22:7 Comment(3)
It works! Looks like dumping the DerivedData cache is the way to go, I didn't even need to clean the project.Jolenejolenta
Yup, that did it for me too.Reversioner
The problem will be back again for sure. This is Xcode bug.Affiche
A
13

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 :)

Amati answered 14/7, 2016 at 8:6 Comment(2)
The errors will still occur randomly. Quitting Xcode will fix the problem.Cristobal
Kudos for identifying the exact problem @Jaro Though i have added ifndef statements problem is still there. Clearing, Quiting , Rebuilding will help. but still its a bug in xcode. And apple should fix it.Populous
C
9

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.

Cepheus answered 28/5, 2015 at 7:55 Comment(2)
Only helpful answer for me.Airworthy
I was using TTTAttributedLabel as well. As a workaround changed the class back to UILabel for TTTAttributedLabels temporarily, made my Auto Layout changes, then set the classes back. Pretty annoying but it worked.Olin
H
8

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)
}
Hart answered 4/12, 2015 at 2:51 Comment(1)
This did it! Man, I was going crazy not being able to get rid of that error!Owen
G
3

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
Giuseppinagiustina answered 5/12, 2017 at 20:26 Comment(0)
P
3

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
Percuss answered 25/5, 2018 at 1:43 Comment(0)
M
1

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

sudo gem install cocoapods
Manfred answered 15/3, 2017 at 9:19 Comment(0)
P
1

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.

Populous answered 12/5, 2017 at 6:16 Comment(0)
A
1

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.

Anjaanjali answered 22/7, 2019 at 12:9 Comment(0)
T
1

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

It works for me!

Troostite answered 14/8, 2019 at 2:17 Comment(0)
B
1

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

Bhili answered 29/4, 2020 at 7:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.