-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login window customisation, Do not allow signup? #237
Comments
Hello @gazzer82, You can fully customize the screens by subclassing SPAuthenticationViewController.h, and mapping the authenticationViewControllerClass / authenticationWindowControllerClass properties to your own subclass (see: https://github.com/Simperium/simperium-ios/blob/develop/Simperium/Simperium.h#L189). There, you should be able to override the behavior in any required way. Please, let me know if i can further assist you with anything related! |
Hi @jleandroperez i will look into this, makes sense. Where is the logic that decides whether to display the login or signup view to the user located? Thanks Gareth |
@gazzer82 the entire sign-in vs sign-up logic is handled by means of the 'signingIn' property (Ref: https://github.com/Simperium/simperium-ios/blob/develop/Simperium/SPAuthenticationViewController.h#L27) You could potentially hack the setter, so it's always stuck in 'Sign In Mode' (See: https://github.com/Simperium/simperium-ios/blob/develop/Simperium/SPAuthenticationViewController.m#L76). Plus, hiding the 'Change' button, so there is no signup-toggle option (Ref.: https://github.com/Simperium/simperium-ios/blob/develop/Simperium/SPAuthenticationViewController.m#L169) Those changes feel a bit hacky, but i'd say it's the super quickest way to nuke Signup. |
Hi @jleandroperez i have managed to "hack" the flow to enable this, but yes, i think some sort of delegate method to set these sort of things might be useful in the future? |
If you're still having any issues or doubts, please, feel free to reopen this. Thanks! |
I am using the latest dev build in my iOS app, and i would like to restrict the ability for users to sign up and only allow login, before i start hacking into the code, is there a way to do this that's built in?
I would also like to customise the colour of the login window text, again, is this possible using anything built in, or do i need to modify the code?
Was hoping i could do it using delete methods so i don't have to re-do the mods every time i update the framework.
Thanks
Gareth
The text was updated successfully, but these errors were encountered: