본문 바로가기

분류 전체보기

[iOS][Alamofire] NSURLSession/NSURLConnection HTTP load failed Https 도메인을 연결하기 위해선 SSL 인증이 필요하다.이를 제대로 설정 하지 않으면 아래 와 같은 이슈를 보게 되는데요. NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843 참고로 -9843 에러가 어떤 에러 인지 알고 싶으신 분들은 아래 사이트 들어가보시면 됩니다.에러 번호 별로 설명이 되어 있습니다. https://gist.github.com/ubergoob/04a981caa92d766a7f37f59848b6bc07 위 에러가 발생하면 맨 처음 plist에서 설정을 변경 합니다.아래 내용을 참고 하시면 되겠습니다. 2개의 방법이 있는데, 전체의 HTTP를 허용하는 방법과 도메인마다 설정해서 허용하는 방법이 있.. 더보기
[Android] SSL Disable 시키기 (Retrofit2, OkHttp3) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384private RetrofitBuilder(Context context, String url) { builder = new Retrofit.Builder() .baseUrl(url) .addConverterFactory(GsonConverterFactory.create()) .client(getUnsafeOkHttpClient(context, token, SysUtils.getVersionName(context))) .bui.. 더보기
[Android] missing translation error apk를 release 시키는 missing translation error 발생 할때가 있다. AppName 그럴땐 위 소스와 같이 resource 태그에 2줄만 추가 하면 된다. 참고로 모든 strings.xml 파일에 2줄을 추가 해야만 한다.그렇지 않으면 계속 에러가 발생 할 것이다. 다른 방법을 원하시는분들은 아래 블로그를 참고 하세요.출처 : https://blog.asamaru.net/2015/11/05/android-is-not-translated-in-dot-dot-dot-lint-error/ 더보기
[iOS] Assets image stretching Android 에는 NinePatching이라는 좋은 기능이 있습니다.이미지를 원하는 형태로 stretching 해주지요. iOS는 어떻게 해야 할까요?? 위 화면 에서 우측 하단에 보시면 Slicing 이라는 부분이 있습니다.여기서 이미지를 어떻게 Stretch 할지 결정 할 수가 있어요. Nine Patch 처럼 자세하게는 안되지만 어느정도 조절은 가능해 보이네요. 이 속성은 이미지 파일을 하나 선택 해야 나오는 거구요.디폴트는 사용 안함 으로 되어 있다는 것을 참고 하세요. 더보기
[iOS] HTML 태그에 UIFont 적용 하기 UILabel 에 font를 적용 시키더라도 아래와 같이 HTML로 attributedText를 적용 하면 font가 변경 되어 버립니다. 1234567891011121314151617181920 fileprivate func getAttributedBodyText(_ html: String) -> NSMutableAttributedString { do { let str = try NSMutableAttributedString(data: html.data(using: .utf8, allowLossyConversion: true)! , options: [ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentA.. 더보기
[iOS] Archives 보기 archive 시켰던(iTunes connect에 업로드를 시키기 위해) 목록을 볼려면 어디로 가면 될까요? XCode 상단 메뉴중 Window -> Organizer (3번째 탭)를 눌러 주세요~ 그럼 상단에 Archives 탭이 있는 창이 뜰 겁니다. 그 탭을 클릭 하면 목록이 나와요~ 참고하세요. 더보기
[iOS][Swift] Swift에서 DeviceToken 얻기 func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { var token: String = "" for i in 0.. 더보기
[iOS][Animation] 혹시 CAKeyframeAnimation이 동작하지 않을때 CAKeyframeAnimation을 사용하여 잘 동작을 하다가,백그라운드에서 포그라운드로 이동할 경우Animation이 멈춰버리는 현상이 발생 animation.isRemovedOnCompletion = false 위와 같이 Animation에 isRemovedOnCompletions에 false를 줘보세요~ DiscussionWhen true, the animation is removed from the target layer’s animations once its active duration has passed. Defaults to true.https://developer.apple.com/reference/quartzcore/caanimation/1412458-isremovedoncompleti.. 더보기