PFSignupViewController Secondary email address
Is it possible to set the email field to a default value for the user in the PFSignUpViewController?
I have looked at the Apple App Store instructions and they say the following in the privacy section:
"17.2 Apps that require users to share personal information such as email address and date of birth in order to function will be rejected"
If I force the user to enter an email address, I am concerned that my application will be rejected.
I really don't want to create my own registration and login view controllers from scratch as I only have a subclass of PFLoginViewController and PFSignUpViewController to get them as I would like.
thank.
source to share
Quoting the Parse docs:
The PFSignUpViewController can be customized to provide a varied sign.
Here is the link: https://parse.com/docs/ios_guide#ui-signup/iOS
So this code will show the user and password (not email):
signUpController.fields = (PFSignUpFieldsUsernameAndPassword);
There are more examples in the docs.
Is this what you were looking for?
source to share
class ViewController: PFSignUpViewController, PFSignUpViewControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.signUpView.emailField.placeholder = "E-Mail (Optional)"
}
func signUpViewController(signUpController: PFSignUpViewController!, shouldBeginSignUp info: [NSObject : AnyObject]!) -> Bool {
if info["password"] as String != "" && info["username"] as String != "" {
return true
}else{
return false
}
}
}
source to share