歡迎嚟到香港行山會!
這裡是與志同道合的人一起享受香港數百條步道樂趣的好去處。

⬅ 返回部落格概覽
New Blog Entry

Daniel Kohler 發佈於 17.02.2026
查看圖片庫

Quick diagnostic checklist for your app

  1. Reproduce on device (same iOS version as your users). If good on device, suspect Simulator. [developer.apple.com]
  2. Update Xcode + runtimes (and consider re‑downloading the runtime as “Universal” if you’re on 26.x). [stackoverflow.com], [code-examples.net]
  3. Inspect your fonts:
  4. Are you forcing a custom font on the entire string?
  5. Try with systemFont and compare.
  6. Look at the exact emojis failing: are they new (added in the last iOS cycle)? If so, ensure your runtime includes that Apple Color Emoji version. [handwiki.org], [poomsmart.github.io]
  7. Encoding: confirm UTF‑8 end to end; watch for U+FFFD vs tofu to separate encoding vs font coverage. [symbolfyi.com]


New Blog Entry

Loading map...

Waypoints

LabelName
ACheung Chau Ferry Pier
BCheung Chau Beach
CWarwick Hotel
DKwun Yam Beach
EKwun Yam Temple
FMini Great Wall Trail
GChi Ma Hang View Point
HLittle Great Wall
IBethany Ministries Lodge
JDon Bosco Road
KFa Peng Road
LCheung Chau Peak Road
MTinford Garden House
NPeak Road West
OChung Lok Pavilion
PCheung Chau Crematorium
QCamping Site
RPirate Bay Cheung Chau
SCheung Chau Fireboat Station
TCheung Chau Public Pier

Why you’re seeing “squares with a ?” (aka tofu)

That “question mark in a box” or empty square is the “.notdef” placeholder shown when a font has no glyph for a code point. It’s a rendering/fallback problem, not (usually) an encoding issue. [thomasphinney.com], [symbolfyi.com]

Typical causes in Simulator:

  1. Emoji/version mismatch.
  2. You’re sending/receiving newer emoji (e.g., from a web client or a device on a newer OS), but your Simulator runtime predates that emoji set. The web UI can look “correct” if the desktop/browser has a newer emoji font than the Simulator’s iOS runtime. [handwiki.org], [poomsmart.github.io]
  3. Recent Simulator regression.
  4. There are fresh reports of Xcode 26.3 with iOS 26.2/26.3 Simulator failing to render Unicode/emoji in Canvas and Simulator, while the same app renders fine on a real device — i.e., exactly the kind of discrepancy you’re describing. [developer.apple.com]
  5. Custom font blocking fallback.
  6. If you set a custom font on UILabel/Text that lacks emoji and you compose text in a way that prevents iOS font fallback, emoji can turn into tofu. (UIKit typically falls back to Apple Color Emoji, but certain Core Text/attributed-string setups or strict font constraints can break fallback.)


How to fix it (start with the least invasive)

A. Verify it’s not your text pipeline

  1. Encoding: Ensure everything is UTF‑8 end‑to‑end (network payloads, database, JSON decoding). If you ever see the replacement character (U+FFFD), that’s an encoding problem; boxes/“?” in a box are missing glyphs (font coverage). [symbolfyi.com]
  2. Emoji sequences: Some emojis are ZWJ sequences (e.g., family/flag/skin tones). An older iOS runtime may not compose them (shows boxes) even if single-codepoint emojis work. [symbolfyi.com]

B. Eliminate a Simulator/runtime mismatch

  1. Update Xcode and the Simulator runtimes to the latest available (Xcode > Settings > Platforms/Components). This fetches the newest Apple Color Emoji included with that iOS version. [developer.apple.com]
  2. If you’re on the Xcode 26.x line and still seeing issues, reinstall or switch architecture of the runtime (some teams needed the “Universal” variant to resolve other Simulator weirdness):
xcodebuild -downloadPlatform iOS -architectureVariant universal
  1. Then reinstall the iOS runtime in Xcode’s Components and re-create the simulator. (This step has helped with several 26.x simulator inconsistencies.) [stackoverflow.com], [code-examples.net]
  2. Test on a physical device running the same iOS version. If the device shows the emojis but the Simulator doesn’t, you’ve likely hit a Simulator bug. There’s an open thread for Xcode 26.3 specifically about emoji/Unicode not rendering in Simulator while working on device. [developer.apple.com]

C. Make sure your UI allows system emoji fallback

  1. Prefer system fonts (e.g., UIFont.preferredFont(forTextStyle:) or SwiftUI .font(.body)).
  2. If you must use a custom font, build your attributed strings so only the text portions use the custom font; leave emoji runs unstyled or use UIFont.systemFont(ofSize:) for them so the system can pull from Apple Color Emoji. (Overconstraining a single custom font for the whole string can block fallback.)
  3. Avoid converting text to glyph runs too early in Core Text unless you handle fallback yourself.

D. Confirm you’re not testing brand‑new emoji on an older runtime

  1. If you rely on emojis introduced in Unicode 15.1/16.0 (rolled into recent iOS 17/18 point releases), be sure your Simulator runtime version matches or exceeds the iOS version that added them. Otherwise, those will show as tofu until you update the runtime/device. [handwiki.org], [poomsmart.github.io]


查看圖片庫

評論

新增評論:
名稱:

  • 評論來自 Rachel 18.03.2026 (18:49)
    Test
  • 評論來自 Daniel 10.03.2026 (23:08)
    I like it
  • 評論來自 Rachel 08.03.2026 (22:01)
    Test
  • 評論來自 Rachel 08.03.2026 (21:44)
    Test
    • 回覆者 Rachel 08.03.2026 (21:44)
      Test
  • 評論來自 Rachel 08.03.2026 (21:29)
    Sdfadsfadf
  • 評論來自 Rachel 08.03.2026 (15:22)
    Great to be here.
  • 評論來自 Daniel Kohler 27.02.2026 (19:55)
    Wishing you all also a Happy Chinese New Year!
© 2026 Hong Kong Hikers Club