Apple's account bag now returns the authentication endpoint as
https://auth.itunes.apple.com/auth/v1/native/fast. That endpoint only
responds correctly when the path has a trailing slash; posting to it
without the slash makes Apple's edge return a 301/204 with an empty or
HTML body, so 'ipatool auth login' fails to parse the response and
silently dies (observed as the 'plist: unexpected hex digit' error or a
-5000 with no usable message).
Also improve http client diagnostics: when an XML response body is not a
property list, return 'unexpected response from Apple (HTTP <code>):
<snippet>' instead of the opaque plist parse error.
login: increment 'attempt' while following redirects
Apple has introduced some dynamic GET parameters into their
redirects, forcing us to use the main domain ( no `p71-`
and such prefixes ) to obtain those parameters.
However, when following such redirects, we shall also increment
the `attempt` parameter (something that was hard-coded before).
- Move logging to command level.
- Simplify and unify interfaces for `appstore` package.
- Move sinf replication from "Download" API to "ReplicateSinf" API.
- Handle retries and command specific logic in the command level.
- Rename "Info" API to "AccountInfo".