rawrool / Group7_SmartGarden

CECS 491a Project - Group 7 Smart Garden. Team Members: Raul Herrera, Jason Shortino, Arjun Chawla, Jose Hernandez.
0 stars 1 forks source link

Create backend for user login in iOS app #57

Closed akagopher8 closed 5 years ago

akagopher8 commented 6 years ago

Create a working backend so users can actually login to the iOS application.

akagopher8 commented 5 years ago

Researching to learn more about user authentication from iOS to server with JSON web tokens and talking with Jose about what we currently have on our backend. 2 hours

akagopher8 commented 5 years ago

Figuring out how to extract and save the web token from the response from the server so that even when the app is closed it persists on the device. And miscellaneous syntax research and MVC research 3 hours.

akagopher8 commented 5 years ago

Getting an error when trying to send the request to our server. It is throwing:"-[SmartGarden.LoginViewController test:]: unrecognized selector sent to instance 0x7f8a4950d670" and "*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SmartGarden.LoginViewController test:]: unrecognized selector sent to instance 0x7f8a4950d670'"

Looking for the cause and the solution currently.

akagopher8 commented 5 years ago

Fixed the bug that was crashing the app and throwing the errors above. Had to delete the reference to test function created in class to show the professor how easy it is to link a button tap to a function. Getting the token still is not working however so working on that now. 2 hours

JosetheJedi commented 5 years ago

How are you sending the data?

akagopher8 commented 5 years ago

I fixed it. It was working the whole time to get the token. The variable that it was in was named differently than what I read everywhere else.

akagopher8 commented 5 years ago

Fixed/Figured out a way to store the username and token for future queries. 4 hours