iphone - Get User's Country -
i wanted know how find out current user's country using xcode (iphone dev sdk).
if want users country can 2 things. easiest deciper localization settings.
nslocale *locale = [nslocale currentlocale]; nsstring *country = [locale displaynameforkey:nslocaleidentifier value:[locale localeidentifier]];
this can unreliable (e.g. user abroad). if depend on information should use corelocation find users current location , use reverse geo-tagging country co-ordinates. take @ corelocation framework reference. should you.
Comments
Post a Comment