-
Notifications
You must be signed in to change notification settings - Fork 82
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
Disambiguate userInfoItemTypes and signUpPermissionTypes #117
Conversation
@p2, @YuanZhu-apple Please take a look |
- This should be overriden by APHAppDelegate which will not call super.
I definitely agree that The permissions manager could stay separated from onboarding, only handling the permissions it's told to handle. For example Does this make sense? |
@@ -184,7 +184,7 @@ - (void)restoreSceneData | |||
} | |||
|
|||
- (NSArray *)prepareContent { | |||
NSArray *profileElementsList = [self onboardingManager].userProfileElements; | |||
NSArray *profileElementsList = [self onboardingManager].permissionsManager.userInfoItemTypes; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p2 permissionsManager.userInfoItemTypes being used here
@chrisinsfo What's the difference between |
@p2 APCSignUpPermissionsTypeS are in defined in APCConstants.h and determine whether we ask the user for permission to access the camera, microphone, photo library etc. APCUserInfoItemTypeS are defined in APCUserInfoConstants.h and allow us to show an appropriate user interface in APCProfileViewController for each type. The APCUserInfoItemTypeS are an amalgamation of quantity types, characteristic types and other items. |
@chrisinsfo In the spots you highlighted, To specify what is to be asked during signup and what is to be shown in the profile view controller should be handled elsewhere IMHO. For the former the onboarding manager seems the best fit, for the latter this fact can be exploited or a new config vehicle could be added. |
@p2 My understanding of your intent of adding an OnboardingManager was to handle which scenes are shown during on-boarding. This has a logical dependency on the permissionsManager. APCPermissionsManager is effectively a global variable holding a representation of the configuration of permissions, returning the state of permissions, and requesting those permissions when necessary. While userInfoItemTypes behave like permissions, you are right to question whether they are permissions or configurations, and whether they belong on the Permissions Manager, . Since userInfoItemTypes are used elsewhere in the app, I don't believe they belong on the OnboardingManager either, but because they are not expected to change throughout the lifetime of the app, and are mostly derived from permissions, this seems the best home for them until we decide how to handle differently. Since the userInfoItemTypes property is public on PermissionsManager, it can be set to different types as needed through the life cycle of the app. I like your config vehicle idea. Do you have bandwidth to implement after this PR? |
@chrisinsfo Yes, I agree with that assessment. My intention for the OnboardingManager was to be able to subclass and specify everything related to onboarding/signup. Then one can launch onboarding and the classes and view controllers would do the right thing. This is showing the scenes but also to configure what info to collect from the user (where the latter informs the former). As you say this also informs the permissions manager. I saw that the PermissionsManager has facilities to query for permissions from different core frameworks. So, for me it is a class that can be used standalone by configuring which permissions you'd like and then you use the manager to determine if you got them and, if not, request them. Hence I made the onboarding manager create the permissions manager and set it up as it needs to be for onboarding. Now this setup leaves two cases uncovered:
In both cases the items to show and the items to ask for permission are still the same as during onboarding. These can indeed be covered by using the permissions manager and have the app delegate supply the permissions manager, properly set up. While not ideal it's probably more convenient than abusing the onboarding manager for these tasks, which is currently the case. I won't have the bandwith in the near future and since I'm not using the profile view controller it's a little harder for me to implement nicely. I'll let you open an issue and hope somebody gets to it. ;) |
@YuanZhu-apple I'll open an issue after the merge of this to deal with the configuration question. |
Cool. |
Disambiguate userInfoItemTypes and signUpPermissionTypes
…efactor username->email refactor
Overview
Since APCOnboarding Manager now owns an APCPermissionsManager with a public properties of signUpPermissionTypes and userInfoItemTypes, it is no longer necessary for the Onboarding Manager to have a userProfileElements property.
Actions