Search code examples
iosswiftstoryboardaws-sdkaws-mobilehub

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.


Solution

  • 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.