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.

+3


source to share


2 answers


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?

+1


source


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
        }

    }
}

      



+1


source







All Articles