How Bluesky draws its logo on screenshots
How Bluesky draws its logo on screenshots
Bluesky 是如何在截图上绘制其 Logo 的
Sometimes I take a screenshot of a post I like, either to send it to friends/meme channel or to save a “durable” copy. Like this one (I’ve cropped out the rest of the interface): Original, if you want to reskeet it.
有时我会截取自己喜欢的帖子,要么发给朋友或表情包频道,要么为了保存一份“持久”的副本。就像这张图一样(我已经裁剪掉了界面的其余部分):如果你想转发(reskeet),这是原帖。
I noticed the Bluesky logo in the right corner and thought that it was weird that the logo doesn’t bother me when I use the app. Then I looked at the post in the app again—logo wasn’t there, replaced by the “Follow” button. I remembered that a few apps hide their logo where the iPhone notch is, so that it doesn’t stick out, unless you take a screenshot. But here the logo is placed in the open, so how do they do it?
我注意到右上角的 Bluesky Logo,觉得很奇怪,因为我在使用 App 时并没有看到它。于是我再次查看 App 里的帖子——Logo 确实不在那里,取而代之的是“关注”(Follow)按钮。我记得有些 App 会把 Logo 藏在 iPhone 的刘海屏区域,这样它就不会突兀,除非你截图。但在这里,Logo 是直接显示在界面上的,他们是怎么做到的呢?
I tried to take another screenshot, this time mid-switching to the other app: The “Follow” button is visible when I take the screenshot mid-switch. Did they somehow set up a listener for two buttons I’m pressing to take a screenshot and do a switcheroo at the last moment? I’m not an iOS developer, so I’m not sure what’s possible and what is not over there. At this point I was mildly intrigued.
我试着再截一次图,这次是在切换到其他 App 的过程中:当我进行切换时截图,“关注”按钮是可见的。难道他们设置了一个监听器,在我按下截图组合键的最后一刻进行了“偷梁换柱”?我不是 iOS 开发者,所以不确定那边能实现什么、不能实现什么。此时,我产生了一丝好奇。
Thankfully, I remembered that Bluesky app is open source (or at least the code is available to look at). The answer was in the file literally called GrowthHack.tsx, introduced in January 2026 by mozzius. But it merely used a dependency, so to understand I looked into package expo-privacy-sensitive, also by them.
幸运的是,我记得 Bluesky App 是开源的(或者至少代码是公开可查的)。答案就在一个名为 GrowthHack.tsx 的文件中,该文件由 mozzius 于 2026 年 1 月引入。但它只是调用了一个依赖项,为了弄清楚原理,我查看了同样由他们开发的 expo-privacy-sensitive 包。
The package creates UITextField with isSecureTextEntry property set to true and renders the actual content (the button) into that field’s .layer. When I take the screenshot, iOS hides this UITextField by blanking the layer, allowing the Bluesky logo to flutter its wings through (it was here the whooole time). For other platforms it simply renders content as-is, without masking.
该包创建了一个 UITextField,并将 isSecureTextEntry 属性设置为 true,然后将实际内容(按钮)渲染到该字段的 .layer 中。当我截图时,iOS 会通过清空图层来隐藏这个 UITextField,从而让底下的 Bluesky Logo 显露出来(它一直都在那里)。对于其他平台,它只是按原样渲染内容,不会进行遮罩。
Why doesn’t it work when I switch between the apps? I suppose that iOS takes a snapshot itself at the start of the gesture (without triggering blanking), and when I do a screenshot, there is no live UITextField instance to react to that, only the inert snapshot. But once again, I’m not an iOS developer.
为什么在切换 App 时这个方法不起作用?我猜是因为 iOS 在手势开始时会自行拍摄快照(不会触发清空机制),而当我截图时,并没有活跃的 UITextField 实例来响应这一操作,只有那个静态的快照。但再说一次,我不是 iOS 开发者。
Nifty trick or an abuse of API meant for privacy? The people in the thread adding the behavior mostly didn’t like it, before the thread got locked. I think it’s cute. I googled a bit, and the trick is well-known. Telegram implemented similar thing for its “secret” chats, as did Signal, so I don’t expect it to be patched by Apple any time soon.
这是一个巧妙的技巧,还是对隐私保护 API 的滥用?在讨论区被锁定之前,参与讨论的人大多不喜欢这种行为。我觉得这挺可爱的。我稍微谷歌了一下,发现这个技巧很出名。Telegram 在其“秘密聊天”中实现了类似的功能,Signal 也是如此,所以我预计苹果短期内不会修复它。
Published at Sunday, 16 August 2026 by mt 发布于 2026 年 8 月 16 日,星期日,作者:mt