Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DVIA-v2/DVIA-v2/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand Down Expand Up @@ -60,5 +58,7 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// For more information, visit www.thejuniperfund.org
// Or watch this video https://www.youtube.com/watch?v=HsV6jaA5J2I
// And this https://www.youtube.com/watch?v=6dHXcoF590E



import UIKit
Expand All @@ -24,15 +24,15 @@ class DeviceLogsViewController: UIViewController, UITextFieldDelegate {
@IBOutlet var passwordTextField: UITextField!
@IBOutlet var phoneNoTextField: UITextField!
@IBOutlet var emailTextField: UITextField!

override func viewDidLoad() {
super.viewDidLoad()
self.navigationItem.title = "Device Logs"
}

func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.resignFirstResponder()
return true
textField.resignFirstResponder()
return true
}

@IBAction func signupTapped(_ sender: Any) {
Expand All @@ -47,14 +47,8 @@ class DeviceLogsViewController: UIViewController, UITextFieldDelegate {
user["phone"] = phoneNoTextField.text
user["email"] = emailTextField.text
print("user saved: \(user.description)")
user.saveInBackground(block: {(_ succeeded: Bool, _ error: Error?) -> Void in
if succeeded {
DVIAUtilities.showAlert(title: "Success", message: "User signed up successfully, look for the logs now", viewController: self)
os_log("Saved user info: %@",user.description)
} else {
DVIAUtilities.showAlert(title: "Oops", message: "Sign Up failed.", viewController: self)
}
self.signUpButton.setTitle("Sign Up", for: .normal)
})
DVIAUtilities.showAlert(title: "Success", message: "User signed up successfully, look for the logs now", viewController: self)
os_log("Saved user info: %@", user.description)
self.signUpButton.setTitle("Sign Up", for: .normal)
}
}