Post

Replies

Boosts

Views

Activity

Reply to SwiftUI, macOS, how to hook up to Edit menu's commands?
You can replace those (as you wish) as you mentioned in your question. CommandGroup(replacing: .newItem) { EmptyView() } or CommandGroup(replacing: .newItem) { } According to the document. You can’t modify or remove the Apple menu items as expected. Which is actually, perfectly reasonable. The Apple menu, which is always the first item on the leading side of the menu bar, includes system-defined menu items that are always available. You can’t modify or remove the Apple menu Best
Sep ’22
Reply to XCFramework and Mac Catalyst
Alternatively, you can try a command-line tool to create XCFrameworks, check the library line below: https://github.com/gurhub/surmagic With this approach, you'll create a file (Surfile) - https://github.com/gurhub/surmagic#what-is-the-surfile one time only, then you can use it multiple times / forever. Best
May ’21
Reply to Error Domain=CoreMediaErrorDomain Code=-16657
Hi @mritunjay, in some of my tests, it successfully downloaded after suspend/resume on iOS 14.4 too. The test screen and the scenario are so simple, and the same actually. But, even for the same file, it's changing from time to time. This is my suspend and the resume methods: swift /// Pauses an AVAssetDownloadTask via given productId.     /// - Parameter productId: The productId.     @objc public func pauseDownload(for productId: String) {         var asset: Asset?         var task: AVAggregateAssetDownloadTask?         for (taskKey, assetValue) in activeDownloadsMap where productId == assetValue.productId {             asset = assetValue             task = taskKey             task?.suspend()             break         }         // Here: I'm sending a notification to the UI cases     }          /// Resumes an AVAssetDownloadTask via given productId.     /// - Parameter productId: The productId.     @objc public func resumeDownload(for productId: String) {         var asset: Asset?         var task: AVAggregateAssetDownloadTask?         for (taskKey, assetValue) in activeDownloadsMap where productId == assetValue.productId {             asset = assetValue             task = taskKey             task?.resume()             break         }         // Here: I'm sending a notification to the UI cases     }
Mar ’21