How can I know the name of country? - iphone

I want to know how can get the name of the country for who installs my app like whatsapp or line app.
Hints:
1 - in the settings I choose U.S.
2 - in app store I choose Saudi Arabia store.
I am currently in Jordan, when installing and open the (whatsapp or line) application is automatically choosing Jordan directly, and it does not ask me to allow location services to calculate?
So it is not reading it from setting or from store setting or from location services...
So how can I know user country???

You could use the CTCarrier class, which gives you the MCC.

Related

Specific Country restriction Appstore

I have made application only visible to Germany, Now Apple informed to include Monitoring Shape-Based Regions for if the user move away after installing from Germany? How to monitor the region to restrict the application if exceed Germany area?
I have tried with following links
1) Core Location region monitoring
2) Apple: Location Awareness Programming Guide
My doubt is how to restrict application only available to Germany. Should I try with latitude, longitude. And how to monitor the regions/territory exception.
I uploaded it to the app store, but they reject with the following reason :
22.1: Apps must comply with all legal requirements in any location where they are made available to users. It is the developer's
obligation to understand and conform to all local laws.Please see
Monitoring Shape-Based
Regions
for information on how to apply Geo restriction.
My doubt is how to restrict Geo location.
By default, the app will be available in all countries the App Store currently supports, unless you specifically select individual countries/stores. You can choose individual countries.
log into iTunesConnect and click Manage Your Apps. Select your app and click the Rights and Pricing button. You can select the stores you want from this page. For More you can
review the page 48
Update
As Updated
Easiest way to solve this topic would probably is to decide which countries you want to make your app available in ? and as i have search something like review countries local laws to see if any thing is illegal related to the app. And this relate to your Questions
What if I make my app available on other countries than usa?
If your application relies on location services to function properly,
you should include the UIRequiredDeviceCapabilities key in the app’s Info.plist file.
You can use this key to specify the location services that must be present in order to execute your application. The App Store uses the information in this key from preventing users from downloading apps to devices that do not contain the listed features.
http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html
this link contains all the information you need.

App with different functionality based on the user's country

I need to develop an application that will behave differently depending on the user's country. Let's say, if the user is in France, some functionality would be available. But, if the user were from India, he would be able to acces a different set of functionality.
If it were only language based restrictions, I could switch functionality using NSLocale class methods. But my functionality is really dependent on the user's country because of licensing and legal reasons.
What are the best practices for dealing with this situation?
For each market where you have specific requirements due to market-specific licensing or legal issues, you can create a separate app in iTunes Connect and make it available for download only in the relevant market. And if you need to, this also allows you to provide a market-specific EULA. It's a big maintenance burden, but it would ensure that only users in a given market can access the app.
Note that in XCode you can fairly easily build, deploy and publish multiple versions of your project built from different configurations (XCode calls this "Targets"), so you could still achieve this in a single codebase by simply adding some preprocessor definitions in the relevant target definitions and putting #ifdef in your code where you want differentiated logic.
A 3rd party app has no access whatsoever to any information about the user of the device or access to the iTunes account. There is no way to know the user's true country. At any given time, the device may not even be associated with any one person. An iPod touch, for example, may have no user logged into any iTunes account. The same device can ultimately be logged into one of several different accounts.
All you have access to is the user's current GPS location (if the user allows your app to access that information) or their current locale.
Basically, there is no way to do what you need. Of course you could prompt the user but obviously there is no way to verify this information.

Different data sources for iPhone app in the App Store

I'm going to release an app in the UK and US App Stores. I would like to have two different data sources according to the store my application is downloaded from. Basically I would like my app to connect to my US servers when downloaded from the US store and to the UK servers when downloaded from the british one.
I was thinking of including the origin URL in the as localised string but I don't think this is a stable solution.
Any idea?
thanks a lot
Claus
I'm not sure, but I don't think the app has knowledge from where it was downloaded from.
You could create two apps, one for UK and one for US, and make the apps only available in their respective local App Stores.
However, depending on the amount of apps you would have to produce (if you intend to distribute your app in more than 2 countries in the future), it might be easier to just ask the user which data source to use on startup, or let him define one in the settings etc.
Or use the iPhone's current language or even location to select the data source.

iPhone Application Name Availability

Is there a way to check whether an iphone application name is available to use? Would a search on iTunes and checking to see if there is an existing application already out there be indicative that an iphone application name is available to use or not?
As pointed out here, even if you search the traditional channels, there may still be someone who has claimed that same name but not submitted an application yet. If you wish to truly test this out, it sounds like you can start the process of submitting an application on iTunes Connect, fill in the name of your new application, but don't complete the submission. You should receive an indication as to whether someone else has this same store name. If not, it appears you now have a claim to that name.
In any case, because you can have a different name in the store than is displayed on the iPhone, you might be able to use a slight permutation on the name for your store submission, and your desired name within the iPhone application itself.
However, I would second sgmeyer's suggestion that you do a USPTO trademark search first before using a name. Trademark infringement can get you in trouble later on.
I would recommend searching the app store for the name you wish to use. Also, you might want to check the United States Patent and Trademark Office www.uspto.gov/ to ensure there isn't a trade mark that exists on the name you choose.
You must search from iTunes Connect as if you are adding a new app, just searching on Google doesn't show app names that are alreadcoques iphone 4
Search the app store, and search google.
I'd say if the name you want to use doesn't turn up in a search on iTunes, you should be in the clear to grab that name. I assume all app names are subject to approval by Apple, also, so make sure you pick something that's not called "iBabyShake."

Can we publish two versions of an iphone application?

HI,
I am developing an application for an esteemed client in Australia. They have certain copyright issues when it comes to uses outside Australia accessing the content via the app.
Is it possible to have a local and an international version of the app, both available via iTunes Store? The international version will only have permissible content. If not, please advice the best option to deal with this issue.
Thanking you in anticipation
Cheers,
Amit
Yes, you can create two versions of the application with different SKUs. The best way to do this would by by using a wildcard certificate and using a different project identifier in the application's plist file.
Using the administrative panel on iTunes Connect you can then restrict the sale of the SKUs to different territories.
These options become available when you have paid the $99 for a development certificate, and and when you upload your application to iTunes.
As others have noted, it's possible to build two versions and to use the iTunes store to restrict distribution based on the nation where the buyer is located.
However there's another issue to consider. You say that the problem is "accessing the content via the app" outside of Australia. But you're on a platform which is inherently mobile, and may not be located in the same country it was when the user got your app. What happens if someone is in Australia, gets the app legitimately, and then travels to some other country? They're no longer in Australia but they have a copy of the app that assumes they are. Would your client's copyright restrictions still permit them to access content that's supposed to be Australia-only?
If not, your problem is rather different than using app-store restrictions. But it might also mean that you get to have a better solution to the problem that doesn't require multiple versions of the app.
Think about it: the iPhone knows where it is. A 3g phone can get GPS-accurate location info, and the older phones get reasonable approximations anytime they have a phone network connection. That gives you lat/long coordinates.
What then? Since your home area is pretty well defined, it might be simple-- draw a rectangle around Australia on a map, and define "in Australia" as being in that rectangle (being a whole continent comes in handy here). If you want something more precise, feed that lat/long into a reverse-geocoding API (there are many-- Flickr has one, for example) to find out what country you're in.
And voila, you can make the app behave one way in Australia and another way outside of it, and you only need one version of the app to do it.
You can restrict which apps are sold in which country/geographical region. Your Australian app you can restrict to Australia and sell another app worldwide.