Skip to content

Decide whether to check on stateType before we call startUpdatingLocation() #6

@npvisual

Description

@npvisual

Good question ! Part of me thinks that "it doesn't matter™️". The reason being that the app wants to start the location service (that's what it controls), but has no way to prevent the user from changing the authorization status after the service has started. So would the app stop the service then ?
The app can provide a warning since we're emitting any authorization status change or decide to stop the location service altogether.
Or we could punt on the stateType check and separate those 2 concerns : essentially when you start the service, that's all the Middleware would do, that is call manager.startUpdatingLocation() regardless of the status. Then if the app wants to change the authorization status, it can do that off-band and decide whether or not to start the service based on the result of that operation.
So bottom line : 🤷‍♂️ ?
Since you brought that up, I am actually thinking the latter option might work best. But maybe you might be able to see something wrong with that approach...

Originally posted by @npvisual in #2 (comment)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions