Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[220906] TIL #123

Open
Taehyeon-Kim opened this issue Sep 6, 2022 · 0 comments
Open

[220906] TIL #123

Taehyeon-Kim opened this issue Sep 6, 2022 · 0 comments
Assignees

Comments

@Taehyeon-Kim
Copy link
Owner

Taehyeon-Kim commented Sep 6, 2022

Custom Font

사용시 주의할 점

  • 저작권
  • 용량
  • 로그는 이미지로 따는 것이 나음
  • 사용자가 입력하는 칸은 시스템 폰트로 두도록 함
    • Input 영역에 사용자가 어떤 것을 입력할지 모르기 때문
  • 사용자 경험 고려 (폰트마다 크기가 달라지기 때문)

다국어 지원

  • 문화에 대한 것도 고려
    • Color(미국) / Colour(영국)
    • LTR / RTL
    • 시간, 날짜, 화폐 단위
    • 폰트 (한국어, 영어 / 중국어 : 1~2pt 크게)
    • 브랜드 컬러 (어떤 나라에서는 민감한 색상일 수 있음)
  • 국제화
    • i18n (문화에 대한 대응)
  • 지역화, 현지화
    • 언어에 대한 대응
    • l10n (Localization)

다국어 대응

  • 시스템 언어 기준
  • 방식
    • plist
    • storyboard, object-id
      • preview에서 언어 대응 확인 가능
      • 정적인 텍스트에 대해서 대응 가능
      • 미리 등록된 객체에 대해서 대응
    • strings
      • 한국어로 set 만들어놓고, 나중에 일괄적으로 다른 나라 언어로 변경하는 것도 방법

strings

  • NSLocalizedString 이용
  • SwiftGen, R.Swift 오픈 소스도 많이 이용함
  • 세미콜론(;) 빼먹지 말기
extension String {
    
    var localized: String {
        return NSLocalizedString(self, comment: "")
    }
}
func localized<T: CVarArg>(with argument: T) -> String {
    return String(format: self.localized, argument)
}

Scheme 설정하기

Scheme마다 설정다르게 해서 언어 설정이나, DEBUG/RELEASE를 구분할 수 있다.

리뷰 남기기(옵션)

  • 리뷰 얼럿 : 1년에 한 디바이스 당 3회 제한 // 일기를 100개 쓴 사람, 일주일을 사용한 사람 - Count 체크, Realm에 있는 Record 기준으로
    • 소중한 리뷰 횟수를 날리지 말자
      • 다음에 남기기 횟수도 포함
    • StoreKit - SKStoreReviewController 사용 (Apple API)
    • 시간 많이 걸리지 않음

문의 남기기

  • MessageUI 프레임워크 이용
  • 메일로 문의 보내기
  • 디바이스 테스트
  • 아이폰 메일 계정을 등록해야 가능
import MessageUI
final class LocalizableViewController: UIViewController, MFMailComposeViewControllerDelegate, UINavigationControllerDelegate {}
func sendMail() {
    if MFMailComposeViewController.canSendMail() {
        let mail = MFMailComposeViewController()
        mail.setToRecipients(["taekki@taekki.com"])
        mail.setSubject("다이어리 문의사항")
        mail.mailComposeDelegate = self
        present(mail, animated: true)

    } else {
        // 메일 등록을 해주시거나, "~~@~~.com"으로 문의 주세요
        print("alert")
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant