Post

Replies

Boosts

Views

Activity

Reply to Using Combine-Future to Fetch Server Data
Why not just use async/await? I'm not sure why you're moving the http session time out 30 seconds to 7 seconds. It doesn't make the request any faster just creates problems if the call takes more than 7 seconds to complete. func fetchData(from url: URL) async throws -> [DataModel] { let session = URLSession.shared let (data, _) = try await session.data(from: url) let decoder = JSONDecoder() decoder.keyDecodingStratergy = .converFromSnakeCase // <-- depends on JSON you might not need it return try decoder.decode([DataModel].self, from: data) } View Controller Task { let dataModel = try? await viewModel.fetchData(from: URL(string:"https://api.github.com/repos/ReactiveX/RxSwift/events")!) DispatchQueue.main.async { // give the data model to some other API on the main thread } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Dec ’21
Reply to XCode stuck installing
For some with a prior version installed update deltas can be as small as 400 MB but have the same perception of being stuck. Eventually, it finishes but can assume the update duration has something to do with patching an already codesigned toolset with a foreign set of binaries that most likely will take on the new code signatures. Who knows, maybe Apple can provide information in the UI/UX when the process is either downloading or installing or patching, I'm just postulating!
Dec ’21
Reply to What API sends iOS notifications to Apple Watch
If you don't know where in the Apple Docs to begin take a look here: https://www.raywenderlich.com/11395893-push-notifications-tutorial-getting-started
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Using Iphone 7
Please post question -> https://discussions.apple.com/welcome and here https://faq.whatsapp.com/iphone
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to SIGTRAP crash occurred in dispatch_event_loop_end_ownership
if this is hybrid you'll have to follow up with the javascript framework creators seeing there is no visible objective-c or swift stack trace associated with what looks like controller which is not native - 'box.medusa.bbammsimagesearchviewcontroller1229'.
Replies
Boosts
Views
Activity
Dec ’21
Reply to iOS app crashes at launch on Testflight for iOS 14 and below but not iOS 15+
Take a look at the most recent set of framework APIs added, this could be an API only available to iOS 15 and higher.
Replies
Boosts
Views
Activity
Dec ’21
Reply to UDID for Apple TV for Provisioning Profile?
d8b db .d88b. .d8888. d888888b d8888b. db 888o 88 .8P Y8. 88' YP `88' 88 `8D 88 88V8o 88 88 88 `8bo. 88 88oobY' YP 88 V8o88 88 88 `Y8b. 88 88`8b 88 V888 `8b d8' db 8D .88. 88 `88. db VP V8P `Y88P' `8888Y' Y888888P 88 YD YP
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to 2 bugs in iphone 13 pro max
Wrong forum, you're looking for: https://discussions.apple.com/community/iphone
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to How to make sure a RunLoopObserver callback finishes before calling CFRunLoopRemoveObserver?
Maybe for the destructor call instead of using an if probably a while testing the function below. func CFRunLoopContainsObserver(_ rl: CFRunLoop!, _ observer: CFRunLoopObserver!, _ mode: CFRunLoopMode!) -> Bool https://developer.apple.com/documentation/corefoundation/1542815-cfrunloopcontainsobserver
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to LG 32UN88A USB-C Hub failing under Monterey 12.1
This question is better suited for the consumer support forum http://support.apple.com/
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Undefined symbols when adding an Objective-C framework to a Widget Extension
Try wrapping any C++ methods with Objective-C methods then only expose the Objective-C methods to Swift with a new Swift name. https://developer.apple.com/documentation/swift/objective-c_and_c_code_customization
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to API Calls Are Not Working in Xcode 13.1 Within Old macOS Application
Just means you have to do some debugging, root cause analysis looking for removed or deprecated APIs, read the release notes to find out what changes might have affected your code based or even try the new Xcode 13.2 from more downloads, upgrade macOS 12.1 and code defensively for old and any new APIs.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Using Combine-Future to Fetch Server Data
Why not just use async/await? I'm not sure why you're moving the http session time out 30 seconds to 7 seconds. It doesn't make the request any faster just creates problems if the call takes more than 7 seconds to complete. func fetchData(from url: URL) async throws -> [DataModel] { let session = URLSession.shared let (data, _) = try await session.data(from: url) let decoder = JSONDecoder() decoder.keyDecodingStratergy = .converFromSnakeCase // <-- depends on JSON you might not need it return try decoder.decode([DataModel].self, from: data) } View Controller Task { let dataModel = try? await viewModel.fetchData(from: URL(string:"https://api.github.com/repos/ReactiveX/RxSwift/events")!) DispatchQueue.main.async { // give the data model to some other API on the main thread } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to New 2021 Macbook Pro can not preview LandmarkList
Do have the latest Xcode 13.2.1?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to What's the folder structure standard for iOS frameworks?
The documentation above has been archived but this is a detail we should not worry about but one can assume the structures are the same.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to XCode stuck installing
For some with a prior version installed update deltas can be as small as 400 MB but have the same perception of being stuck. Eventually, it finishes but can assume the update duration has something to do with patching an already codesigned toolset with a foreign set of binaries that most likely will take on the new code signatures. Who knows, maybe Apple can provide information in the UI/UX when the process is either downloading or installing or patching, I'm just postulating!
Replies
Boosts
Views
Activity
Dec ’21