Programmatically detect which app store the app was downloaded from

后端 未结 3 2111
星月不相逢
星月不相逢 2020-12-29 11:28

I haven\'t found a thread about this so I must ask: is there a way to programmatically detect which app store the app was downloaded from? (ie: Germany App Store)

I

3条回答
  •  难免孤独
    2020-12-29 12:09

    I think you'd use the current locale of the user to detect in which country they are… but it could fail sometimes, so I'm not very sure if a not 100% effective way to detect the AppStore would work for you.

    You'd need to call

    [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode]
    

    Also, please see discussions in the following threads, some of them are old, but probably will help you to find alternatives solutions too Link1 and Link2

提交回复
热议问题