nicolasgomollon / AppSales-Mobile

AppSales allows iOS and Mac App Store developers to download and analyze their daily and weekly sales reports from iTunes Connect.
39 stars 10 forks source link

Download of payment reports is (for me) not working any more. #67

Open meyer-solutions opened 8 months ago

meyer-solutions commented 8 months ago

In my special case the provider selection stops working someday near the end of 2023 which leads to problems in downloading payment reports. After some investigation of the Apple developer website I found that adding the "X-Request-With" header solves this issue.

[authSessionRequest setValue:@"olympus-ui" forHTTPHeaderField:kITCRXRequestedWithKey];

ddaddy commented 8 months ago

Is this for the daily reports, or the monthly payments in the Payments section? What do you mean 'provider selection'?

meyer-solutions commented 8 months ago

@ddaddy I mean the Payments section, which looks like a calendar. (not Sales and Trends)

'provider selection' means the method name changeToProvider calling /olympus/v1/session

ddaddy commented 8 months ago

Ah ok. Mine have been working, although I have 2 accounts and have to enable/disable to do one at a time as the 2FA doesn't work with 2 at a time. I'll add your line to my current pull request which has several fixes and improvements.

I don't know what's happened to @nicolasgomollon I'm tempted to start my own branch of this is the PR doesn't get approved soon.

meyer-solutions commented 8 months ago

Thank you - I also already using my own branch. I have around 10 accounts with 2FA enabled.

ddaddy commented 8 months ago

Oh wow. Does it manage to connect to them all? I disable payments until after a payment has been made as it adds overhead to the daily requests.

meyer-solutions commented 8 months ago

No, I'm using AppSales only for my personal account and not for the customers. But Apple is choosing the first provider after the login randomly and AppSales has to change it every time after login.

ddaddy commented 8 months ago

I've added that to my PR #65 It seems with multiple accounts, it starts logging into the 2nd account before the 1st has completed the Payments login. If I disable my 2nd account I can get the first to download its payments.

When I get time I might add either a Payments toggle per account, or a Disable toggle per account to be able to temporarily halt.

You should check out my PR, I love the ability to filter and show how many New Subscriptions I get each day.

ddaddy commented 8 months ago

Done it :) Added the ability to disable downloading per account.