Could not instantiate class named UIRefreshControl Xcode - xcode

I am building a RSS feed on a tableview. When i run the app, on my iPhone could run smoothly while in ipad, it crashed and showed "Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIRefreshControl'"
I tried to run the app on my ipad simulator, it also could run smoothly. May I know what is the problem for that?
Thanks

UIRefreshControl only exists on iOS 6. So if your iPad is running 5.1.1, you won't be able to use UIRefreshControl, because UIRefreshControl did not exist in iOS 5.1.1. So when the nib decoding happens, the decoder finds "UIRefreshControl", it doesn't know what to do with it, and it crashes.

In your storyboard, click on the tableview and go to the Attribute Inspector. Under the section "TableView Controller" there is a selection window for "Refreshing" that can be set to disabled. When I built for my iPad-1, running iOS 5.1 I got an empty tableView instead of the error, 'Could not instantiate class named UIRefreshControl'. This was to be expected since I haven't populated the device with files to select, yet.

Related

Xcode Error: Could not instantiate class named _UIScrollViewLayoutGuide

I am running my Xcode project (Xcode 11) on an iPhone 4S running iOS 9 and I am getting the following error:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIScrollViewLayoutGuide'
I have tried looking up solutions to this error but could not find any. My code has installed all constraints and am suspecting it is because I am using the Interface Builder to create the scroll view.
What is odd is that other scroll views in the app are working fine, but this one keeps giving me this error… Any way to solve it?
It seems that I have found an answer! I am unsure why Xcode did not flag the error in the first place. With the new Xcode support for iOS 13, ScrollView Content Layout Guides are automatically enabled. In iOS versions below iOS 11, there is no Content Layout Guide attribute.
I disabled the Content Layout Guides by selecting the Scroll View, going to the Size Inspector and deselecting 'Content Layout Guides' at the bottom of the first section.
This fixed my issue!

Xamarin Forms 2.3.3.175 Scroll View Layer exceeds max. dimensions supported by the GPU

After upgrading Forms from 2.3.2.127 my app began to crash. After downgrading the Forms to 2.3.2.127 the issue went away, and I did try 2.3.3.193 and the issue happens there as well.
I have included a link to a PCL test app that will recreate this issue if anyone has any idea as to what I could be doing wrong or some type of workaround that would be great.
Once you start the app you will notice the tab page shows up oddly, if you navigate to the menu and select any of the items the app will crash when it attempts to load that page and render the scroll view. You will also see this exception thrown java.lang.IllegalStateException: Unable to create layer for ScrollViewRenderer
PCL test app zip

iOS 8 - Swift - Xcode 6 Beta - working without interface builder (no nibs and no storyboard)

I have been searching a lot in the inter webs and Stackoverflow. Unfortunately there doesn't seem to be much info around the new Xcode version, iOS 8 specifically with Swift and working without the Interface Builder.
The Templates to choose from as a starting point now does not have the option to start with an empty application. The least setup you have is to take the single view application, which already gives you the ViewController and a basic Storyboard.
I hate storyboards and I hate nibs. I want to do everything in code. I tried to delete the storyboard file, instantiate the window, set the rootViewController and make it visible just like in the good old days. the ViewController initializes without nib and bundle.
The result is this a SIGABRT with this error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle </Users/[username]/Library/Developer/CoreSimulator/Devices/BC38B690-D30E-44FB-93B1-AB861D03B414/data/Containers/Bundle/Application/B6C160C8-67E1-4A74-9F81-55D097262050/blabla.app> (loaded)'
I sure hope that I will still be able to do UI without Interface Builder. Anyone has an idea on how to progress? I remember I was able to use an empty application with the previous Beta versions of Xcode 6.
In my opinion storyBoards are awesome. They make the development cycle easy and quick. But if you do not want them you can create a Single View Application template.
Delete the storyBoard and Follow these steps
1) Go to Your Target
2) Deployment Info
3) Main Interface -> Delete Main and keep field empty
It will not load a storyboard or any view. Now it's your responsibility to load Window and create rootViewControllers and views programmatically
The method outlined by codester is a good solution, but (in Xcode 6.0.1) the final step - deleting "Main" from the Main Interface section - would not work for me; I would delete the string, but as soon as I navigated away from that page or tried to run the app, the field would be repopulated with "Main". I ended up having to manually delete the "UIMainStoryboardFile" key/value entry in the applications Info.plist.

Could not load nib in bundle base internationalization

I have a project that I created in xcode 4.5 with a target ios of 5.0 and I used Base Internationalization. Base Internationalization moves the nib files to Base.lproj.
The project runs on my iPhone 4 running ios 6 and on my iPad 3 running ios 6. But this error shows when I try to run it on my iPad 1 running ios 5.1.1. In the Build Phase section of the target, the nib files are shown in red.
When I try to add the nib files to the Build Phases bundle resources, they add but they are still red (not found). I have tried every way I know to add the nib files to the bundle resources. How can I accomplish this?
Base Internationalization is only supported in iOS 6. It will cause a crash in iOS 5 or below when it tries to load a Xib.
Note: Strangely, running on Simulator with iOS 5 will work. That should to be a bug.
I have detailed my experience after releasing my app with this dumb startup crash: http://samwize.com/2012/11/22/warning-do-not-use-base-internationalization-in-ios-5/
I did not know that English (en) also must be localized. When I localized English, I was able to load the nib files into the bundle.
I'm still getting 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'MainViewController_iPad''
but at least now it's not because the nib files aren't in the bundle.

Interface builder is crashing upon startup

I downloaded xcode 3.2 and the iphone sdk 4.1, which has been working wonderfully, until a few days ago. For some reason whenever I open interface builder by clicking on a xib file all the pictures in the buttons and imageviews display a big blue question mark, and then interface builder gives me this:
Assertion Message: An uncaught exception was raised.
Exception Name: NSInvalidArgumentException
Reason: * -[NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: ../goldnquartz.jpg)
User Info: (null)
And asks if I want to crash or continue. If I continue, I cannot do anything useful in IB. I also made a new blank .xib file and tried to open that file with IB, but I got the same message.
How do I fix this?
I had the same problem today. It was a broken image file.

Resources