+ (NSString*) getCountryCode { NSLocale *currentLocale = [NSLocale currentLocale]; NSString *countryCode = [currentLocale objectForKey:NSLocaleCountryCode]; return countryCode; } // output : KR + (NSString*) getCountryName { NSLocale *locale = [NSLocale currentLocale]; NSString *countryCode = [locale objectForKey: NSLocaleCountryCode]; NSLocale *usLocale = [[NSLocale alloc] initWithLocaleIdentif..
iOS 와 동일하게 출력됩니다. public static String getCountry() { return Locale.getDefault().getCountry(); } public static String getDisplayCountry() { return Locale.getDefault().getDisplayCountry(Locale.US); } 2020/08/13 - [Development Note/iOS] - [objective-c] 국가코드 및 국가명 가져오기
+ (NSString*) getLanguageCode { NSString *language = [[NSLocale preferredLanguages] firstObject]; NSDictionary *languageDic = [NSLocale componentsFromLocaleIdentifier:language]; NSString *preferredLanguageCode = [languageDic objectForKey:@"kCFLocaleLanguageCodeKey"]; return preferredLanguageCode; } //output : ko 출처 https://stackoverflow.com/questions/3910244/getting-current-device-language-in-ios
+ (NSString*) getDeviceID { NSString *uniqueIdentifier = [[[UIDevice currentDevice] identifierForVendor] UUIDString]; return uniqueIdentifier; } 출처 https://stackoverflow.com/questions/5468629/device-id-from-an-iphone-app 2020/08/13 - [Development Note/Android] - [Android Java] DeviceID 가져오기
유니티엔진에서 제공하는 deviceUniqueIdentifier 와 동일하게 만들어줍니다. md5 함수 구현부는 아래링크 참조바랍니다. 구글에서 권장하는 사용방법 public static String getDeviceId(Context context) { String deviceId = ""; String android_id = Settings.Secure.getString( context.getContentResolver(), Settings.Secure.ANDROID_ID); deviceId = md5Encode(android_id); return deviceId; }2020/08/13 - [Development Note/iOS] - [objective-c] DeviceID 가져오기 2020/04/1..
+ (NSString *) getDeviceName { struct utsname systemInfo; uname(&systemInfo); NSString* code = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; static NSDictionary* deviceNamesByCode = nil; if (!deviceNamesByCode) { deviceNamesByCode = @{@"i386" : @"Simulator", @"x86_64" : @"Simulator", @"iPod1,1" : @"iPod Touch", // (Original) @"iPod2,1" : @"iPod Touch", // (Second..
- Total
- Today
- Yesterday
- abs
- LanguageCode
- countryName
- permissionCheck
- tempfile
- iTunes Store에 연결할 수 없음
- setCancelable vs setCanceledOnTouchOutside
- 절대값함수
- ioutil
- Golang
- abs 함수
- Error Domain=SKErrorDomain Code=0
- nsurl to nsstring convert
- countryCode
- DeviceModel
- dialog
- 퍼미션체크
- convert nsurl to nsstring
- NSUserDefaults 예제
- tempdir
- nsurl 에서 nsstring 변환
- java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line
- Locale.getDefault().getLanguage()
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |