앱을 포함한 라이브러리 프로젝트 생성 Workspace 를 생성하여 라이브러리와 앱 프로젝트를 생성하는 방식. 우선 빈폴더를 만들고 프로젝트 이름을 정합니다. File > New > Workspace...을 클릭합니다. Workspace 이름을 지정하고 Save. File > New > Project...을 클릭합니다. 먼저 앱 프로젝트를 생성하겠습니다.(순서는 상관없음) Product Name 을 정하고 Interface, Life Cycle, Language 각자 선호도에 맞게 선택합니다. Add to, Group 모두 타겟을 처음 만든 Workspace 를 선택해줍니다.(Framework 생성도 똑같음) Framework 도 동일하게 진행하게 되면 프로젝트 폴더구조는 다음과 같습니다.
Objective-c + (UIViewController*) topMostController { UIViewController *topController = [UIApplication sharedApplication].keyWindow.rootViewController; while (topController.presentedViewController) { topController = topController.presentedViewController; } return topController; }Swift 3.0+ func topMostController() -> UIViewController? { guard let window = UIApplication.shared.keyWindow, let root..
찾아봐도 objc는 c++ c# java 처럼 enum에서 nsstring 으로 자료형캐스팅은 안되는것 같다 시간이 없기에 이와 같은 방식으로 처리함. 선언부 #import typedef NS_ENUM(NSInteger, LoginType) { GOOGLE, FACEBOOK, APPLE, GUEST, }; NS_ASSUME_NONNULL_BEGIN @interface EnumType : NSObject + (NSString*) convertToString:(LoginType)type; @end NS_ASSUME_NONNULL_END구현부 #import "EnumType.h" @implementation EnumType + (NSString*) convertToString:(LoginType) type {..
샌드박스 결제 테스트시 실패메시지 Error Domain=SKErrorDomain Code=0 “iTunes Store에 연결할 수 없음” UserInfo=0x717c7b40 {NSLocalizedDescription=iTunes Store에 연결할 수 없음}여러가지 방법 다 해봤지만 그냥 모든콘텐츠 및 설정 지우기 하는것이 가장 빠르다 테스트 기기는 iOS13.x 이었고 기존계정 로그아웃 안하고도 문제없이 샌드박스로그인이 잘됐다.
+ (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..
+ (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
- Total
- Today
- Yesterday
- nsurl 에서 nsstring 변환
- Locale.getDefault().getLanguage()
- abs
- tempfile
- abs 함수
- countryCode
- DeviceModel
- permissionCheck
- dialog
- LanguageCode
- tempdir
- Error Domain=SKErrorDomain Code=0
- 절대값함수
- 퍼미션체크
- setCancelable vs setCanceledOnTouchOutside
- iTunes Store에 연결할 수 없음
- NSUserDefaults 예제
- java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line
- convert nsurl to nsstring
- ioutil
- Golang
- nsurl to nsstring convert
- countryName
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |