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

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.

Related

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

How to add momd(managed object model) into ios framework?

I am trying to convert my ios app(XYZ) into framework(XYZ.framework) so that it can be included in other ios applications. Went through below links and able to develop a framework.
LINK1:LINK1
LINK2:LINK2
But when i include my framework in other apps and try to compile for first time , xcode is throwing error "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.". I followed below steps and get rid of this error.
STEP1: Added XYZ.framework in other app and compiled for first time, but xcode gave error mentioned above.
STEP2: Added XYZ.momd(by drag and drop) along with XYZ.framework in other application. Compiled it and Xcode didn't throw any error.
STEP3: Removed XYZ.momd from other application and compiled it. Xcode didn't throw any error!!!!
Should i give XYZ.momd along with XYZ.framework while distributing XYZ.framework, so that XYZ.momd can be included in other applications? I googled, but didn't get how to add momd inside framework and include it in other applications.

Could not instantiate class named ADBannerView after Removing iAD

Weird thing that I have spent about 4 hours debugging:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named ADBannerView'
I used to have iAD and then removed it. Now I use Google AdMob.
I have macros set up to determine the free/paid version. On the free version that is supposed to show ads, everything is fine and it displays the AdMob ads.
In the paid version, which does not call any ads, I get this error: Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named ADBannerView'
The only thing I can think of is that I may have an old iAd Banner View somewhere, but I can't find it!
Any hints?
Also: Everything works fine on the simulator.
Have you checked to make sure that there are no ADBannerViews in Interface Builder? The sort of error you are seeing says that the app is trying to create one somewhere.
Educated guess:
are you using the UI State Preservation & Restoration API? If so return NO from application:shouldSaveApplicationState: to get rid of the current saved state.
Once that works you should implement some kind of restoration version checking to prevent crashes on your users devices.
If that doesn't work, or you are not using state restoration, try to delete the app from the device. If you deploy from Xcode files are only added, never removed. So it's possible that an old file references ADBannerView. Delete the app to get rid of such orphan files.
Edit: That link should take you to the "Encode version information along with the rest of your app’s state." section. It doesn't, but you will find a small info about version checking at the bottom of the page.

Running Haxe from iOS app – hxRunLibrary() error

For a client I've developed an iOS + Android app using Cordova (PhoneGap) for the user interface. Now, as an update to this app, I'm am attempting to add a game that was written in Haxe. Originally the game was written for the Flash target, but I've updated it to work with the C++ targets for Android and iOS.
On Android it was easy to integrate this with the Cordova app using activities (the Haxe part runs as a separate activity), but I am having some trouble achieving a similar result on iOS.
So far I have tried to include all hxcpp generated code in my project (in the same way that NME sets up the XCode project when you do "nme build ios"), and I'm calling hxRunLibrary() from my code when I want the game to run.
The problem is that hxRunLibrary() seems to want to create its own UIApplication instance, which fails with the following error, since my main app is already running an instance:
*** Assertion failure in void UIApplicationInstantiateSingleton(Class)(), /SourceCache/UIKit_Sim/UIKit-2380.17/UIApplication.m:2037
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'There can only be one UIApplication instance.'
I think it might have something to do with SDL, which Haxe uses for graphics. From what I understand SDL needs to run from the main function of the app, which created a conflict with Cocoa that also needs to run from the main function.
Is there any easy way around this? I've looked in the hxcpp sources, but been unable to find the UIApplication related code, or any entry code for SDL.
Perhaps someone could point me in the right direction. Thanks!
Well ,I have googled some information about Haxe . what i understood is that The Haxe will prouduce a completed application for you .that mean it include the main Function . That's why the error is happend .
And you can simulate the problem by invoke UIApplicationMain Function twice .
In my opinion , you have to remove the code about UIApplicationMain from the souce code file produced by Haxe.
cordova has the ability to be integrated as part of a bigger application
ran into the same issue.
http://devgirl.org/2012/11/15/embed-cordovaphonegap-in-your-native-ios-app/
this article will help
you dont actually create a new project instead you embed it in a webview via the ios webview and cordova acts a subview.

Getting an error from the Stanford iOS Class, but my code seems identical

I believe I did what the instructor did verbatim, but my app (it's a simple app) won't work and errors out if I press a button.
I click run, and it builds, but when I click a button in the iOS simulator the app crashes and brings me back to Xcode with an error.
I don't know what I did wrong. It brings me to the main.m file when we didn't even deal with that in the Stanford guide (maybe it has to do with the fact that the Stanford guide uses iOS 5.0 and I'm on 5.1?).
Here's the project if anyone wants to take a lot at it. I'm just really confused.
http://cl.ly/212A3q3J1m1F1y3A041A
(Also, did I just need to include the xcodeproject file, or was I right in including the whole project folder in a zip file?)
It looks like you have your buttons linked to a selector called digitedPressed:
They also appear to correctly be linked to digitPressed. Just remove the references to digitedPressed. (Right click the Calculator View Controller in your storyboard)
Don't forget to check the XCode debugger! This is the error the XCode debugger showed me:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CalculatorViewController digitedPressed:]: unrecognized selector sent to instance 0x9129cc0'

Resources