Skip to content

Instantly share code, notes, and snippets.

@gshaw
Created March 20, 2026 18:20
Show Gist options
  • Select an option

  • Save gshaw/2046599984f8ef8894f04ba0c908d64c to your computer and use it in GitHub Desktop.

Select an option

Save gshaw/2046599984f8ef8894f04ba0c908d64c to your computer and use it in GitHub Desktop.

iOS: Apostrophes in User-Facing Strings

Recommendation

Use straight apostrophes (', U+0027) in Swift source code for user-facing strings.

Why

  • iOS renders straight apostrophes as typographic/curly ones automatically when displayed in Text, UILabel, etc.
  • The system font (SF Pro) handles this via OpenType ligature substitution.
  • The rendered result looks identical to the user regardless of which character is in the source.

Avoid

  • U+02BC (ʼ) — Modifier letter apostrophe. Works but non-standard; confuses spell checkers (e.g., cspell won't recognize canʼt).
  • U+2019 (') — Right single quotation mark / typographic apostrophe. Unnecessary since iOS auto-renders this from straight quotes.
  • U+2018 (') — Left single quotation mark. Not an apostrophe.

Summary

Straight apostrophe in source → typographic apostrophe on screen. Keep it simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment