I am trying to implement the CAS login objective-C code to my current Xcode project but I keep having code compilation errors everytime I try to get the text from one of my IBOutlets the error comes up. Here is the code for the CAS View Controller:
CASViewController.m - Look at the username and password strings that's where the problem is
CASViewController.h - the username and passwords swift IBOutlets are hat connect the storyboard to code and which are causing the problem
I am new to swift so I've been looking around to get this working. I have made the CAS client a static linked library and I have made a bridging file to connect the code however I am still at a loss. Thank you in advance for the help.
the error I am getting:
error is:2017-07-03 12:31:22.520 SAF[2947:45298] Unknown class _TtC11CAS library17CASViewController in Interface Builder file. 2017-07-03 12:31:22.530 SAF[2947:45298] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]:
UILabel IBOutlets are missing the required connection. You need to connect them to the labels in Storyboard's UIViewController.
Specifically, UILabel authResultMessage isn't connected to Storyboard. Use Ctrl+drag to connect it with relevant label in Storyboard.
Related
I'm having problems to import Paypal SDK sample app into my existing project.
I added Paypal .xcodeproject into my existing project (now i have all the frameworks, etc)
Compile = OK.
The Paypal SDK Sample has a Storyboard with 2 Views and i want to connect them into my existing project, for this i added a Button and created a segue to those views. Then I updated my views class with the module Paypal that it successfully recognized, but it did not work and give me 3 errors: (I already tried to fix them, delete the segue and link again, I have searched for the errors on stackoverflow, etc.. no success)
1- *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7f8bd2f98870> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key successView.'
2- Could not load the "check.png" image referenced from a nib in the bundle with identifier "ru.test.SwiftSideMenu"
3- Unknown class _TtC25PayPal_iOS_SDK_Sample_App18MainViewController in Interface Builder file.
I think this problem is a little complex to paste code here, so i will leave the download links to be easier to check:
https://mega.nz/#!4BZ0UZZS!cRfcXl5jvem8v-_Cs7q0jpEFLGtqUA2RKVQ2ADnEjXU
I found an open source project (link here) that I need to implement in my next project.
The problem is that the framework is setup as a storyboard project, which I will not use.
I have problems in converting this project to a non-storyboard, non .xib project.
I asked already some help in the comments of another SA question and on the gitpage of this framework but time is shrinking.
I keep getting this error: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier RPSlidingCellIdentifier - must register a nib or a class for the identifier or connect a prototype cell in a storyboard' even though the class/nib is registered.
A push in the right direction would be appreciated a lot. I added my test project to my dropbox for your convenience.
The Cell class gets registered in RPSlidingMenuViewController.m viewDidLoad
Thanks to Aiden, who pointed out that my project was actually working, I figured out that cleaning out the simulator and /DerivedData was the solution.
This question already has answers here:
Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
(79 answers)
Closed 7 years ago.
I have performed some changes on my storyboard file and deleted a bar button. Before deleting, I removed all the connections in both storyboards for both screens.
Next, I deleted all the code, connected with this button.
Now I'm getting an error on startup:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
'[<TTPDepartmentViewController 0xe805bd0> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key nextButton.'
I've checked for this nextButton all over the source code of storyboards and all. No sign, no connections, still this error bumps out. More, I've reseted the simulation. What can I do?
UPD: I totally removed the problematic (as I thought) storyboard and the problem still appears, even that other storyboards do not contain these views with this key at all.
UPD2:
As you can see the connection thing is not filled, so there should be no connection. When I uncomment this line it builds and runs, though it is not obviously used at all.
select file's owner in your document outline window and switch to connections inspectors tab. More likely than not, you will see a connection with a yellow exclamation sign on it saying "nextButton". Just remove that and you should be good to go.
Well, this was the case now:
https://stackoverflow.com/a/21883809/2084479
I don't know, why but even before this bug appeared, I had "Main" in my Main Interface in the deploy info, but this was working. Now, I've updated to some other value (in the answer it's told that you can even leave it blank) and this fixed the build.
I have developed a Web Browser app called iBrowse for iPad. Now when I try to add iPhone support with a xib file I get a SIGBRT error in the Simulator.
The app uses xib files as the main page and I have had the iPad xib file since I created the app and it works fine. Because I want iPhone support I added a new iPhone xib file (with .h and .m files). When I make the Application Type Universal and select the xib file from the dropdown I get the following error when I launch the app for iPhone.
2014-01-07 14:03:35.262 iBrowse[2207:907] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x753e440> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
*** First throw call stack:
(0x1c95012 0x10d2e7e 0x1d1dfb1 0xb7ee41 0xb005f8 0xb000e7 0xb2ab58 0x234019 0x10e6663 0x1c9045a 0x232b1c 0x2348da 0x1668b 0x169a2 0x15876 0x26cb5 0x27beb 0x19698 0x1bf0df9 0x1bf0ad0 0x1c0abf5 0x1c0a962 0x1c3bbb6 0x1c3af44 0x1c3ae1b 0x1517a 0x16ffc 0x2395 0x22d5)
libc++abi.dylib: terminate called throwing an exception
(lldb)
as well as a Thread 1: SIGBRT error
The files only include the default content and I have not added anything to them. I have also had this error when declaring the xib file to use for iPad so I let it chose the only xib file that existed. Now with a separate one for iPhone I have to explicitly declare the xib file to use otherwise it uses the iPad one which does not fit on the screen.
Right Click on the xib file to see referencing Outlets. Turned-out some of the control that still referencing and older name and causing this error to happen.
I made simple app with 2 languages. When it was done I've decided to delete one language (and did so): I deleted language from project-info-localizations.
After that I've tested app on the device (iPhone) and found that app still has additional (deleted) language. Then I've deleted the app from the iPhone and run project again - it had no sense to my changes. I don't understand the reason... However, later I've found mistake (grammar) in the name of the button and renamed it. That action completely killed my app - it can't be run on the iPhone from that very moment.
Error is: 2013-01-25 11:46:34.087 timeLimiter[13649:907] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key startAlerButton.'
It mentions "startAlerButton" which was renamed (I've checked all relations in .h, .m, storyboad).
Please check if there is still some connection to outlet startAlerButton in the xib files.