-
Notifications
You must be signed in to change notification settings - Fork 40
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
Added automatic app version detection #50
base: master
Are you sure you want to change the base?
Added automatic app version detection #50
Conversation
This is a nice one, but I prefer to cache the file version from apple like we are doing with the token. Lets say we send in a file location for appversion instead of May you do that instead? I don't like pulling data from third party more than necessary. |
The data is only pulled on initialize, how often do you expect the library to be reinitialized? |
In my case I use the library in a cron job that is executed every 30 minutes. The best would be to use Apple service (and cache the result) only if the Panasonic server responds with the error:
|
@LudovicRousseau waiting for the error is not a good option, it looks like they have a 3-week grace period after releasing a new version before blocking the old version. |
Thumbs up, it's better doing the version check in the login routine instead of in the init, and better yet, only check it when login returns status 40X |
Hmm, I don't know how it's used, but when using it command line it would do this for every command issued |
If it's used in a py file called in say a cron job it will be initialized for each execution, so for that scenario I can see the point of caching it. |
I've refactored the token storage and consolidated it with version information into a settings class that stores the information as json. |
sorry for the delay, I see now that you have implemented a few changes and this is starting to look good! Since all users have to authenticate again when updating to the new settings file instead of a token file I have to review it properly. Have you thought about a migration process, where you update the token file the new format? |
Just a thought - how about fetching the new version when the we actually get rejected by PCC (eg on http error) and cache that until next version bump (hence new http error)? That'd result in a lot less requests, and only on a need to basis |
Added support to fetch the latest published app version from the Apple App Store