Post

Replies

Boosts

Views

Activity

In App purchase original transaction id is same for different purchases
I created one product in appstoreconnect and am testing in sandbox mode Purchase auto renewal product A . Original transaction id is 12345 renews few times and expires After 3 days , purchase same product A . Again the original transaction id received from receipt is 12345 . Is this expected behaviour? . If yes how to differentiate between old and new purchase?
1
1
775
Feb ’22
AVAssetDownloadDelegate methods are not called when resumed
I use AVAggregateAssetDownloadTask to download video contents . pause , resume works fine in the normal flow . AVAssetDownloadDelegate methods are not called when the task is resumed on app relaunch. Steps: download content quit app when download is in progress relaunch app create session and get all tasks and resume tasks delegates not called I have confirmed that session and tasks are not nil .   func restorePersistenceManager() {     guard !didRestorePersistenceManager else { return }     didRestorePersistenceManager = true     // Grab all the tasks associated with the assetDownloadURLSession     assetDownloadURLSession.getAllTasks { tasksArray in       let downloadsArray = DownloadManager.shared.getAllDownloadedAssets()       // For each task, restore the state in the app by recreating Asset structs and reusing existing AVURLAsset objects.       for task in tasksArray {         guard let assetDownloadTask = task as? AVAggregateAssetDownloadTask, let assetName = task.taskDescription else { break }          let downloadAsset = downloadsArray.filter {$0.stream.name == assetName}         if downloadAsset.count > 0 {           let urlAsset = assetDownloadTask.urlAsset           var asset = Asset(stream: (downloadAsset.first?.stream)!, urlAsset: urlAsset)           self.activeDownloadsMap[assetDownloadTask] = asset           StreamManager.shared.setStream(value: (downloadAsset.first?.stream)!)           self.resumeDownload(for: &asset)         }                }     }   }
2
0
860
Jan ’22