PHAsset位置元数据iCloud同步

Mac*_*wic 5 ios swift photosframework

我在多个iOS和macOS设备上都有一个iCloud数据库,当我更新它的时,即使它们看起来是同步的locationPHAsset它也不会传播到其他设备。该位置显示在本地设备照片库中,而不显示在其他设备上。我的理解是该元数据应该同步。没有?

码:

func setCoordinate(newCoordinate: CLLocationCoordinate2D) {
    guard let asset = asset else { return }

    willChangeValue(forKey: "coordinate")

    coordinate = newCoordinate

    PHPhotoLibrary.shared().performChanges({
        let request = PHAssetChangeRequest(for: asset)
        request.location = CLLocation(latitude: self.coordinate.latitude, longitude: self.coordinate.longitude)
    }, completionHandler: { (success, error) in
        self.didChangeValue(forKey: "coordinate")
    })
}
Run Code Online (Sandbox Code Playgroud)