Post

Replies

Boosts

Views

Activity

Watch OS11 My recording play gets paused after a while
Watch OS11 My recording play gets paused when watch I turned down. It was not happening in previous versions. In my app I recorded my recording. And When I play it in my app, it was playing good in debug mode(when Xcode is connected) could not debug. Otherwise, it was automatically paused(when my wrist is down or inactivity time is elapsed) I want it to be continued.
1
0
638
Sep ’24
SWIFT TASK CONTINUATION MISUSE - leaked its continuation!
SWIFT TASK CONTINUATION MISUSE: saveAndClose() leaked its continuation! Inside for loop, after executing few items, at one of the item, in save and close function, it is blocked, and says above error, and not moving to next item, so not able to return result. What could be wrong here, and is there any way to optimize any of these snippets? private func processTags(reqItems: [FTShelfItemProtocol], selectedTags: [String]) async throws -> FTShelfTagsResult { let items: [FTDocumentItemProtocol] = reqItems.filter({ ($0.URL.downloadStatus() == .downloaded) }).compactMap({ $0 as? FTDocumentItemProtocol }) var totalTagItems: [FTShelfTagsItem] = [FTShelfTagsItem]() for case let item in items where item.documentUUID != nil { guard let docUUID = item.documentUUID else { continue }//, item.URL.downloadStatus() == .downloaded else { continue } let destinationURL = FTDocumentCache.shared.cachedLocation(for: docUUID) print(destinationURL.path) // move to post processing phace do { let document = await FTNoteshelfDocument(fileURL: destinationURL) let isOpen = try await document.openDocument(purpose: FTDocumentOpenPurpose.read) if isOpen { let tags = await document.documentTags() let considerForResult = selectedTags.allSatisfy(tags.contains(_:)) if considerForResult && !tags.isEmpty { var tagsBook = FTShelfTagsItem(shelfItem: item, type: .book) tagsBook.tags = tags totalTagItems.append(tagsBook) } } let tagsPage = await document.fetchSearchTagsPages(shelfItem: item, selectedTags: selectedTags) totalTagItems.append(contentsOf: tagsPage) _ = await document.saveAndClose() } catch { cacheLog(.error, error, destinationURL.lastPathComponent) } } cacheLog(.success, totalTagItems.count) let result = FTShelfTagsResult(tagsItems: totalTagItems) return result } func saveAndClose() async -> Bool { return await withCheckedContinuation({ continuation in self.saveAndCloseWithCompletionHandler { isSuccess in continuation.resume(returning: isSuccess) } }) }
2
0
3.9k
Jun ’23
An unknown error occurred launching the helper task
When running instruments or when debug memory in Xcode, I am getting same error as An unknown error occurred launching the helper task Xcode: Xcode16.3 OS: 15.5 Beta (24F5068b) Mac mini: Apple M2 Pro
Replies
2
Boosts
2
Views
415
Activity
May ’25
How to make transparent or clear background title bar of UIWindowScene
MACCATALYST I am able to hide title bar title using below line. windowScene.titlebar?.titleVisibility = .hidden but, windowScene.titlebar?.toolbarStyle = .unifiedCompact windowScene.titlebar?.toolbar = nil with above 2 lines, my title bar is still visible with system defined some background color. I want to make it transparent(clear background color)
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
1
Boosts
0
Views
469
Activity
Oct ’24
Watch OS11 My recording play gets paused after a while
Watch OS11 My recording play gets paused when watch I turned down. It was not happening in previous versions. In my app I recorded my recording. And When I play it in my app, it was playing good in debug mode(when Xcode is connected) could not debug. Otherwise, it was automatically paused(when my wrist is down or inactivity time is elapsed) I want it to be continued.
Replies
1
Boosts
0
Views
638
Activity
Sep ’24
SWIFT TASK CONTINUATION MISUSE - leaked its continuation!
SWIFT TASK CONTINUATION MISUSE: saveAndClose() leaked its continuation! Inside for loop, after executing few items, at one of the item, in save and close function, it is blocked, and says above error, and not moving to next item, so not able to return result. What could be wrong here, and is there any way to optimize any of these snippets? private func processTags(reqItems: [FTShelfItemProtocol], selectedTags: [String]) async throws -> FTShelfTagsResult { let items: [FTDocumentItemProtocol] = reqItems.filter({ ($0.URL.downloadStatus() == .downloaded) }).compactMap({ $0 as? FTDocumentItemProtocol }) var totalTagItems: [FTShelfTagsItem] = [FTShelfTagsItem]() for case let item in items where item.documentUUID != nil { guard let docUUID = item.documentUUID else { continue }//, item.URL.downloadStatus() == .downloaded else { continue } let destinationURL = FTDocumentCache.shared.cachedLocation(for: docUUID) print(destinationURL.path) // move to post processing phace do { let document = await FTNoteshelfDocument(fileURL: destinationURL) let isOpen = try await document.openDocument(purpose: FTDocumentOpenPurpose.read) if isOpen { let tags = await document.documentTags() let considerForResult = selectedTags.allSatisfy(tags.contains(_:)) if considerForResult && !tags.isEmpty { var tagsBook = FTShelfTagsItem(shelfItem: item, type: .book) tagsBook.tags = tags totalTagItems.append(tagsBook) } } let tagsPage = await document.fetchSearchTagsPages(shelfItem: item, selectedTags: selectedTags) totalTagItems.append(contentsOf: tagsPage) _ = await document.saveAndClose() } catch { cacheLog(.error, error, destinationURL.lastPathComponent) } } cacheLog(.success, totalTagItems.count) let result = FTShelfTagsResult(tagsItems: totalTagItems) return result } func saveAndClose() async -> Bool { return await withCheckedContinuation({ continuation in self.saveAndCloseWithCompletionHandler { isSuccess in continuation.resume(returning: isSuccess) } }) }
Replies
2
Boosts
0
Views
3.9k
Activity
Jun ’23