facebookarchive / account-kit-samples-for-ios

Samples for the account kit product on ios.
43 stars 26 forks source link

Some thoughts on refactoring #2

Closed hansemannn closed 8 years ago

hansemannn commented 8 years ago

Hey there,

some thoughts on cleaner Framework API's:

Thanks guys!

olgaikuznetsova commented 8 years ago

Thanks for your feedback!

Our convention is to use "logOut" as log and out are separate words.

We used "Back" in the top left because that goes back - if you're on the confirmation code entry screen for example, it will take you to the phone number entry screen.

Numbers can be entered just in plain number form - select the country code from the drop down, and then enter the rest of the numbers.

toddkrabach commented 8 years ago

hansemannn,

AKFAccessToken is a protocol where it does not need to be a concrete class for the consumer. This could potentially change in the future, but as it currently stands the abstract nature of it as a final implementation works well with it being exposed as a protocol.

Back can be changed to anything you would like via the Advanced UI configuration. With the AdvancedUIManager protocol, you can specify a custom view for the top navigation bar and replace any part if it the way you see fit. https://developers.facebook.com/docs/accountkit/ios/customizing#using-the-advanced-ui-manager

As for the phone number format, that is an excellent suggestion. The docs will be updated in the next release to clarify the phone number. It will also accept any format in the next revision, and clean the strings in the initializer, so that the containing app does not need to clean user-input before passing to the AKFPhoneNumber class, if you have a phone number that you would like to start the flow with.

Thanks, Todd