-
Notifications
You must be signed in to change notification settings - Fork 286
Description
Edited
Replace country
with region
.
Summary
I've been doing some Ansible role/playbook development, with the following goal: automate the complete provisioning/rebuild of my workstation. Since I work primarily on a Mac (OS X v10.12.2), the mas
CLI is extremely useful for automatically installing apps distributed through the App Store.
So far, the project is going well. I've been using the jhcook OS X Sierra box for testing with vagrant/virtualbox. However I've encountered a couple issues with using mas
when testing.
Invoking the mas signin <USERNAME> <PASSWORD>
command, a dialog pops up in the App Store GUI, requiring an acknowledgement of OK
that the App Store should go ahead and update the Region according to the signed-in user's Apple account's billing settings. Presumably, this is because the Region is either unset or doesn't match my Apple account's billing settings. The mas
CLI is unusable until that dialog has been completed. Below is the complete dialog text:
This Apple ID is only valid for purchases in the U.S. iTunes Store. You will be switched to that Store.
How to reproduce
I believe this can be reproduced with the following steps:
- Open the App Store
- Navigate to the Purchases tab
- Select the flag icon in the bottom right corner
- Select any Region other than that which is associated with your account.
- Run
mas signin ...
Follow-up questions
- Has anyone else run into this issue?
- Does anyone know of a good way to programmatically set the App Store's Region?
- Are there potentially any "bad" ways, such as modifying a plist file that is loaded into the App Store's runtime?
If there are no workarounds, would anyone be willing to implement another CLI command to mas
e.g. mas region <region>
? It could also be added as a --region
option to the mas signin
command, as long as setting the region occurs prior to authentication.
Also, since it is my first time reaching out to the developers and maintainers of this project, I'd like to say thank you for reading this issue and working on this project 😄 .