微信反复读取你的相册!官方回应:为便于聊天时快速发图,最新版本将取消

砍柴网  •  扫码分享

来源:量子位

人在聊 微信 ,相册被 " 偷窥 "。

而且还是 反复读取 ,每次 长达 1 分钟 的那种。

微信反复读取你的相册!官方回应:为便于聊天时快速发图,最新版本将取消

图源:微博

这两天,一位数码博主在网上曝出的这件 " 隐私问题 " 成为了焦点。

毕竟很多人每天都离不开微信,可以是说与大多数人利益相关了。

而时隔数小时,微信官方对此作出了回应:

iOS 系统为 App 开发者提供相册更新通知标准能力,相册发生内容更新时会通知到 App,提醒 App 可以提前做准备。

App 的该准备行为会被记录成读取系统相册。

并且微信还补充解释道,这样的操作是为了方便用户在微信聊天中按 "+" 时可以快速发图。

但经此事发酵之后,微信表示会在最新版本中取消这样的操作,优化快速发图功能。

相册是如何被 " 偷窥 " 的?

事情的经过是这样的。

这位数码博主的一位群友,在群里分享了他的经历:

开启了 iOS 15 的隐私新特性 " 记录 App 活动 ",对所有 App 的隐私读取行为进行 7 天的监控。

并使用 App Privacy Insights 对记录进行读取。

微信反复读取你的相册!官方回应:为便于聊天时快速发图,最新版本将取消

图源:微博

真的是 " 不看不知道,一看吓一跳了 "。

在如此一通监测下,这位群友发现微信一直在 " 偷窥 " 手机 相册

在用户未主动激活 App 的情况下,在后台数次读取用户相册。

每次读取时间长达 40 秒 至 1 分钟不等。

而在后续的发现中,有如此行径的还不止微信这一家。

就连 QQ、淘宝等多款国产 App 均存在后台频繁读取用户相册的行为。

微信反复读取你的相册!官方回应:为便于聊天时快速发图,最新版本将取消

图源:微博

而后博主总结了这些 App 的运行状态和权限设置:

用户前台未主动运行

iOS 默认开启后台应用数据刷新,未手动改变过状态

上次使用微信后,直接上划返回主屏幕,没有彻底杀死后台

如此情况之下,博主对这些 App 进行了强烈的抨击,主要表达了 2 点:

照片是用户隐私 ,每次调取用户隐私时用户并不知情(从读取时间来看,用户在睡觉的时候它也在读)。如果仅仅是为了扫描是否添加了新图片,也没有必要如此过度请求。

占用系统内存、严重消耗电池续航 。手机的 RAM/ 电量续航都浪费在这种毫无意义的操作上了,严重降低用户体验。

如此话题瞬间在网络上引起了关注。

一位知乎网友(以下经授权)便特意查看了下 苹果 开发者文档。

他认为监听相册变动应该用的是 PHPhotoLibraryChangeObserver 协议。

这个监听器触发的逻辑是相册发生变动,并且无视变动来源。

那么可能的一种解释就是,用户确实在非微信环境修改了照片,可以是在相册里直接操作,也可能是别的 APP 修改导致的。

样例代码如下:

func photoLibraryDidChange ( _ changeInstance: PHChange ) {

guard let collectionView = self.collectionView else { return }

// Change notifications may be made on a background queue.

// Re-dispatch to the main queue to update the UI.

DispatchQueue.main.sync {

// Check for changes to the displayed album itself

// ( its existence and metadata, not its member assets ) .

if let albumChanges = changeInstance.changeDetails ( for: assetCollection )

// Fetch the new album and update the UI accordingly.

assetCollection = albumChanges.objectAfterChanges! as! PHAssetCollec

navigationController?.navigationItem.title = assetCollection.localiz

}

// Check for changes to the list of assets ( insertions, deletions, moves

if let changes = changeInstance.changeDetails ( for: fetchResult ) {

// Keep the new fetch result for future use.

fetchResult = changes.fetchResultAfterChanges

if changes.hasIncrementalChanges {

// If there are incremental diffs, animate them in the collectio

collectionView.performBatchUpdates ( {

// For indexes to make sense, updates must be in this order:

// delete, insert, reload, move

if let removed = changes.removedIndexes where removed.count

collectionView.deleteItems ( at: removed.map { IndexPath ( i

}

if let inserted = changes.insertedIndexes where inserted.cou

collectionView.insertItems ( at: inserted.map { IndexPath (

}

if let changed = changes.changedIndexes where changed.count

collectionView.reloadItems ( at: changed.map { IndexPath ( i

}

changes.enumerateMoves { fromIndex, toIndex in

collectionView.moveItem ( at: IndexPath ( item: fromIndex, s

to: IndexPath ( item: toIndex, sec

}

} )

} else {

// Reload the collection view if incremental diffs are not avail

collectionView.reloadData ( )

}

}

}

}

可见,在 hasIncrementalChanges 为 true 的情况下,相片的增删改都会 dispatch。

但是在 hasIncrementalChanges 为 false 的情况下,开发者也可以自行选择处理逻辑。

至于啥情况下会导致 hasIncrementalChanges 为 false,开发者文档也给出了解释:

If this value is false, the fetch result is too different from its original state for incremental change information to be meaningful.

也就是相册改变太过巨大导致。

如何解决?

虽说微信官方表示,在新版本中将取消这样的功能。

但在此之前,又该如何破解呢?

博主以微信为例,很贴心的给出了如下的 tips

进入 设置 > 下拉找到「微信」 > 相册 > 将「所有照片」改为「选中的照片」或「不允许」

在同设置页面, 关闭「后台 App 自动刷新」开关

在同设置页面,检查其他权限,例如:如果不通过电脑备份聊天记录,应关闭本地联网权限;如果不经常分享定位,应关闭定位权限;如果不在微信上使用小程序解锁共享单车,应关闭蓝牙权限。

对于其他国产 App 也建议进行同样操作。保证你的 App 拥有最小权限。能不给精确定位就不给。后台 App 自动刷新的功能如果没有特殊需求建议关闭,这项功能不影响 App 推送。

……

最后,虽然此次事件波及的是 iOS 用户,作为安卓用户的你,是否也有类似的经历呢?

随意打赏

提交建议
微信扫一扫,分享给好友吧。