UICollectionView - Porting Storyboard project to no IB project - ios

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.

Related

AWS Mobile Hub - How to Implement User Sign In Without Storyboard

I am currently working on a project that does not include storyboards and I am trying to create a user authentication and sign-in method. I was initially going to use FireBase but they did not have Carthage support so I decided to try out AWS. I initially tried using AWSCognitoIdentityProvider framework with my custom UI but the passwordauthentication method for signing in would not trigger a result. I moved onto the AWSAuthUI framework (plus AWSAuthCore, AWSFacebookSignIn, AWSGoogleSignIn, AWSUserPoolsSignIn) with the built in UI but I keep getting the error below before even getting to the login screen.
" Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'SignIn' in bundle NSBundle "
From all the documentation and demo applications that I've seen, I guess this is not possible without using storyboards? Can someone please confirm this.
You will need to add the Storyboard files in the Build Phases if you are using Carthage: See an example here: https://github.com/aws/aws-sdk-ios/pull/733/files. Currently the AuthUI implements the UI components in a storyboard file.

Code Compliance with Objective-C view controller

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.

Storyboard error with Target Membership(GREYED OUT)

I recently renamed my project and a variety of errors came up relating to the paths that Xcode was trying to use to access my files.
This was most likely due to an ill attempt at renaming the project so I retracted my efforts and decided I would just change the name of the App the customers see. Anyways a peculiar error has risen up because of this.
When I build the app it crashes with a THREAD 1 SIGABRT error. Here is the output of the console.
Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Could not find a storyboard
named 'Main' in bundle NSBundle
(loaded)'
*** First throw call stack: (0x18b2341c0 0x189c6c55c 0x191835bd0 0x191306b48 0x1910ef0a8 0x1913057c0 0x19131a080 0x1913028c4
0x18cdd58bc 0x18cdd5728 0x18cdd5ad0 0x18b1e2278 0x18b1e1bc0
0x18b1df7c0 0x18b10e048 0x1910e85dc 0x1910e3360 0x100037bb8
0x18a0f05b8) libc++abi.dylib: terminating with uncaught exception of
type NSException
I have cleaned my project several times as well as doubled check the plist to ensure the string was correct. Here is a link to a similar question whose answer I tried.
Could not find a storyboard named 'Main' in bundle
I found my problem but still am not sure how to fix it. In my main storyboard under The File Inspector my TARGET MEMBERSHIP for the App is GREYED OUT but the Test and UITest version of it are not.
I have tried a variety of build with different checks as well as deleted the app off of my physical device and cleaned the project and tried again. I even deleted the reference to the Main.storyboard and re-added by dragging from a pane like in one of the answers on the link provided and it lets me select all the Target Membership's but when I open the File inspector only the tests are selected on not the main top option. Can anyone help me out on this?
It would be greatly appreciated, I have been at it for hours and I am sure it is something small I am missing.
have you tried to verify the your info.plist?
you can also create a new storyboard (copy all viewController in Main.storyboard) and then in "Main storyboard file base name" key of your plist set the value of your new storyboard name.
Or check this Build Settings:
check also the target associated it.

Importing Paypal SDK sample app into my existing project

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

IOS5 - Could not load NIB in bundle

I have an app in the appstore which works fine on any iOS < 5.0.
But in iOS5 my app won't launch, the error I get is:
Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Could not load NIB in bundle: 'NSBundle
</var/mobile/Applications/****/***.app> (loaded)' with name 'MainWindow''
Does anyone know how to solve this error?
Update
The app seems to work on the iPad 2 but not on the iPad 1
(now I am even more confused)
The problem is probably that "MainWindow.nib" does not exist in the builded app. Either your xib is not named "MainWindow.xib" or your xib is not included into your project. YOu can check this by looking into the .app-directory on your phone or simulator.
I've got the same error yesterday and the problem was that I had a xib-file which was accidentally assigned a localization to. So maybe you have also added a localization to it then just remove it or provide a default one.

Resources