SKProductMBS priceLocale ?

Hi,

I’m testing MBS StoreKit (in MacCloud) to handle MAS in-app purchases (macOS, Xojo 2019r3.1).

When running the example with my own identifiers, I can’t get the correct localized info from SKProductMBS.

In AppStoreConnect the price is
1,09 €
$ 0.99

I want to display the in-app purchase localized price info but SKProductMBS always returns

priceString: $0.99
price 0,99
priceLocale is US, USD, $, …

However, my system locale is French, fr_FR, €, Metric, … it’s what I get when using NSLocaleMBS.currentLocale

dim n as NSLocaleMBS n=NSLocaleMBS.currentLocale

Does someone know how I can get the correct priceString (price and currency) ?

Thanks !

Your app does have a French localization?

My app default language is ‘English’ but all strings are localized in 6 languages.
The in-app purchase in MAS has also 6 languages defined.

Changing the app default language to ‘Default’ doesn’t change anything.

Probably a bug with Store Kit. It happens from time to time where it displays in correct info.

Change your system lanaguage and see if it displays the correct local price.

I believe there is a difference between what the system-wide locale (from NSLocale.current) is versus the one that your running app may be choosing (not sure how to check that out of my head right now, though). Although that probably doesn’t matter in this case.

Also check what preferred locale is set in the Info.plist - have a look at that in your built app.

Disclaimer: I’ve not used StoreKit yet, so my suggestions may be off and clueless.

Also: No spaces before “!” and “?” in any language other than french! (doesn’t matter here, but if you write docs or text in your app, make sure you do not use spaces for English etc.)

I changed the system language, rebooted and … no changes.
The NSLocaleMBS.currentLocale is correct and reflects my system language changes (even if not rebooting), with correct settings (language, currency, metric…).

But the priceLocale in SKProductMBS keep giving US (USD, $, non-metric, …).

Same problem if I run the MBS sample, with MBS identifier (product ‘test1’ exists in MAS).

On the other hand, the language setting changes are correctly reflected in all labels and buttons with localized text.

Could it be related to the Store that you’re logged into on your Mac? Do you have a US account?

See this: https://bendodson.com/weblog/2014/12/10/skproduct-localized-price-in-swift/

No, both account (system and developer) are Belgium based.

I think that’s what MBS does…

The real issue is the price itself which is different for the same product, formatting is less important:
1,09 €
$ 0.99

Yes, I realized only after writing my comment that you are already checking priceLocale, so I remove that part again :slight_smile:

But yes, it’s all tied to priceLocale being US and not FR/BE. Based on that locale, the formatting and price matches that (wrong) locale (locale is US, so the price shows the correct US price), correct?

So the question is: Why does SK identify the wrong locale?

Could it be that the Belgium price or locale is set up incorrectly or incomplete, and therefore the system falls back to the US locale? Eg. if you do not use the correct locale identifier, then the system may reject it. Is there any other way that you can verify that the BE price is correctly shown? E.g, when you try this on another computer, or when you look at it on the Web?

Actually, shouldn’t you use fr_BE if you’re in the Belgian store? At least give that a try to see if that makes a difference? (Unless that’s not how it works - as I said, I am clueless about SK).

What I mean is: Maybe SK can’t match your offered regions with your current locale, and therefore falls back to US locale for the price.

I’m afraid not.
I changed to FR, NL, US, IT, ES locales with the same result, these are about the only languages I understand enough to be able to reset the settings afterwards ;-).

If I look at System Preferences / Language & Region, I see all samples correctly formatted (dates, time, number, currencies …).
And again, all localized strings are correct and the NSLocaleMBS.currentLocale gives the correct results.

Could it be that SKProductMBS return incorrect values because the in-app purchase is not approved yet ?

wait a minute… I think it might be to do with the test account you configured at Apple, which is not the same as your main account.
Try here https://appstoreconnect.apple.com/access/testers, what does it say next to the account?

My test account Country or App Store region is ‘Belgium’.

My system country settings were fr_FR (I’m actually in France and the iMac was bought here). I changed this setting to fr_BE, still getting the $0.99 price.

I’ve tried in debug, with the build and did a ‘sandbox’ check from AppWrapper after wrapping for the MAS.
I always get the $0.99 price.

I checked the app info.plist, the only language related entry is ‘Localization native development region=fr’.
Anyhow, I don’t see a reason for the plist to play a role here.

Maybe I have to trust SKProductMBS and see what happens when the app is on the store, but I’d hate people seeing $0.99 when their price will be 1,09€.

Any progress on this?

Nope…
I submitted the app anyway to see what price would be displayed in live situation, but the app is rejected now because

Which I don’t understand as I’m using an ‘application group container’ to store some json data.
I asked a few questions and waiting for their reply.
I’m still fighting them for the iOS app, now struggling for the macOS one.

[quote=495201:@Olivier Colard]Nope…
I submitted the app anyway to see what price would be displayed in live situation, but the app is rejected now because[/quote]
Damn.

This one is a pig of their own creation.
You need to tell the reviewer, why you’re saving the data where you are, and if they stick to their guns, appeal.

Don’t waste your time, they’re not there to explain their reasons of rejection for you, 9 times out of 10, they send some boiler plate response about paying for technical assistance. If you really want to talk to a human, you can request a phone call, but that can take a week to happen.

Good luck man.

Don’t forget we’re all here and between us, we have quite a bit of experience with the App Store. You’ll probably get better assistance from us than those reviewers.

Yeah, have the feeling that apple review is more about luck than logic ;-(

I know that and the 1st reason for sticking to Xojo is the incredible forum support.
Thanks !

My app is refused again.

This app contains a screensaver (regular .saver screensaver created with Xcode), stored in the package in Contents/Helpers.
To install the screensaver, the app simply open/launch the .saver file and let macOS perform the installation.

App Store review message is the following:

[quote]Guideline 2.4.5(ii) - Performance
Your app installs additional content that is not appropriate per guideline. Please revise the application so the application does not install screensaver files.
[/quote]

Guidelines 2.4.5(ii) says:

[quote]They must be packaged and submitted using technologies provided in Xcode; no third-party installers allowed. They must also be self-contained, single application installation bundles and cannot install code or resources in shared locations.
[/quote]
I don’t see why they invoke this as I’m not installing the screensaver, macOS does the install in System Preferences.

Both the app and the screensaver have entitlements in their respective plist to use an application group container.
Both are signed using AppWrapper.
I tried the app and the screensaver installation in sandbox and had no issues.

I don’t really mind providing a link to download the screensaver rather than delivering it within the bundle but:

  • I’m afraid it’s not allowed either because of Guidelines 2.4.5 (iv):

[quote]They may not download or install standalone apps, kexts, additional code, or resources to add functionality or significantly change the app from what we see during the review process.
[/quote]

  • if the screensaver is downloaded, thus not more distributed thru the MAS, it must be notarized, and, AFAIK, notarizing screensaver is only possible using a packager, does anyone know about that ? And the packager will probably infringe another guideline.

Thanks for your help !

Oh man… Me and my big mouth, I have literally zero experience in shipping screen savers on the Mac App Store. Hopefully there are some among us who have.

A quick Google reveals this… But don’t get too excited…
https://stackoverflow.com/questions/60467391/how-submit-macos-screensaver-saver-file-to-appstore

As for Notarizing a screensaver, this actually seems possible. App Wrapper is designed for .app packages, but I could modify it to handle Screensavers, and then you’ll be able to supply the screensaver on your own site.

The other option I can think of is to get the App Store Resolution team to call you and get them to tell you explicitly what needs to be done. Otherwise you get two DTS requests a year for technical assistance from Apple, you could use one of them to figure out the process.

This would be great … but I may be the only one needing this :wink:

Your app does trigger the installation the screensaver though, right? It may well be that that’s the part you need to change. I.e. only do that when the user asks for it, e.g. you first present a dialog explaining it, and then give the option not to install the saver. Or add a command to the menu bar for it, not even asking at start.

I have apps in the App Store that also added helpers, and I had a similar rejection back then, though the reviewer made it clear that I need to add a confirmation dialog back then instead of leaving me hanging.