Search results for

DTiPhoneSimulatorErrorDomain Code 2

158,641 results found

Post

Replies

Boosts

Views

Activity

Task cancellation behavior
Hi everyone, I believe this should be a simple and expected default behavior in a real-world app, but I’m unable to make it work: I have a View (a screen/page in this case) that calls an endpoint using async/await. If the endpoint hasn’t finished, but I navigate forward to a DetailView, I want the endpoint to continue fetching data (i.e., inside the @StateObject ViewModel that the View owns). This way, when I go back, the View will have refreshed with the fetched data once it completes. If the endpoint hasn’t finished and I navigate back to the previous screen, I want it to be canceled, and the @StateObject ViewModel should be deinitialized. I can achieve 1 and 3 using the .task modifier, since it automatically cancels the asynchronous task when the view disappears: view .task { await vm.getData() } I can achieve 1 and 2 using a structured Task in the View (or in the ViewModel, its the same behavior), for example: .onFirstAppearOnly { Task { away vm.getData() } } onFirstAppearOnly is a custom modifie
0
0
139
1w
Reply to Infinite loop getting "_dismiss changed"
I have managed to reproduce unwanted _dismiss changed behavior in the strangest way possible. If you add ANY StoreKit code then on swiping up (i.e. exiting the app) and returning it will produce a bunch of changes. In my app, this was an extremely disruptive bug as it would cause my WebView to reset, losing all state. Here's the code: import SwiftUI import StoreKit struct ContentView: View { @Environment(.dismiss) private var dismiss var body: some View { let _ = Self._printChanges() VStack { Image(systemName: globe) .imageScale(.large) .foregroundStyle(.tint) Text(Hello, world!) // Any StoreKit code causes `_dismiss changed.`. Comment the line below and it no longer happens ProductView(id: testing) } .padding() // Adding a View Modifier like .storeProductTask or .currentEntitlementTask also produces the issue } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
AVCaptureSession preview briefly goes blank after interruption (lock/unlock or camera switch) while isRunning == true
Environment Device: iPhone 15 Pro iOS: iOS 18.0 Framework: AVFoundation App type: Custom camera app using AVCaptureSession + AVCaptureVideoPreviewLayer I’m seeing an intermittent but frequent issue where the camera preview layer briefly flashes empty after certain interruptions, even though the capture session reports itself as running and no errors are emitted. This happens most often after: Locking and unlocking the device Switching cameras (back ↔ front) The issue is not 100% reproducible, but occurs often enough to be noticeable in normal usage. What happens The preview layer briefly flashes as empty (sometimes just a “micro-frame”) Duration: typically ~0.5–2 seconds before frames resume session.isRunning == true throughout No crash, no runtime error, no interruption end failure Focus/exposure restore correctly once frames resume Visually it looks like the preview layer loses frames temporarily, even though the session appears healthy. Repro Intermittent but frequent after: Lock → unlock device S
1
0
698
1w
Reply to Device and systems for SSC evaluation
Not sure you can know which device will be used. So, you could: mention in the submission that you use LIDAR in your code, test for LIDAR presence https://stackoverflow.com/questions/66383288/check-if-ios-device-has-lidar-in-swift and act accordingly. or ask directly to the support https://developer.apple.com/contact/ Good luck.
1w
Whether SSC can be connected to the iPad real machine with Xcode to run the evaluation
👋Hi This problem is related to SSC. I remember that the form submitted last year needed to be filled in with Xcode or Playground test, and it seems that it was also mentioned: • If you use Xcode, the judges may use Simulator to run. • If you use Playground, it's a real machine. But my work this time will encounter two limitations: It will use the framework/API only available in iPadOS 26 (so if it is a Playground environment, it may not run, playground can't use iPadOS 26 SDK) It will also use some content that must be real to run (such as ARKit), which means that Xcode Simulator is not good. So I would like to ask: Does this year's review allow you to compile and connect the iPad to the real machine? Or did I misremember last year's regulations? If the judge's environment is fixed (for example, only Playground or only Simulator), how should I adjust the submission method or implement the scheme? Looking forward to your reply, thank you.
0
0
99
1w
C function in library code gets stripped when distributed
This is a continuation of https://developer.apple.com/forums/thread/795348 I rambled too much and did not understand the underlaying problem. The problem is that I have a C function in a iOS library. I want to call this C function from a dylib that this library loads on runtime. When running directly from Xcode (either in debug or release mode) this works correctly. However, when the app is uploaded to testflight or distributed for debugging then the function is stripped and a null function pointer exception crashes the app. In the last post it was really hard to explain and I was pressed on time but I've created a minimal reproducible example: https://github.com/ospfranco/dylib_crash The instructions to run and reproduce the crash are on the README.
2
0
496
1w
OSSystemExtensionsWorkspace on iPadOS
Hello! I have app (macos and iPadOS platforms) with empbedded DEXT. The DEXT executable runs fine on both platforms (ver 26.2). Trying to execute from iPad App code: let sysExtWs = OSSystemExtensionsWorkspace.shared let sysExts = try sysExtWs.systemExtensions(forApplicationWithBundleID: appBudleId) but always getting OSSystemExtensionError.Code.missingEntitlement error. Which entitlement am I missing? Thank You!
1
0
129
1w
iOS Simulators Fail Download
I've been going through different fixes for a few weeks and nothing seems to work. Prior to updating everything to iOS 26 and OS 26, everything worked normally except for the predictive code which wouldn't download. Download failed. Domain: DVTDownloadableErrorDomain Code: 41 User Info: { DVTErrorCreationDateKey = 2026-01-02 23:41:12 +0000; } Download failed. Domain: DVTDownloadableErrorDomain Code: 41 Failed fetching catalog for assetType (com.apple.MobileAsset.iOSSimulatorRuntime), serverParameters ({ RequestedBuild = 23C54; }) Domain: DVTDownloadsUtilitiesErrorDomain Code: -1 Download failed due to a bad URL. (Catalog download for com.apple.MobileAsset.iOSSimulatorRuntime) Domain: com.apple.MobileAssetError.Download Code: 49 User Info: { checkConfiguration = 1; } System Information macOS Version 26.0 (Build 25A354) Xcode 26.2 (24553) (Build 17C52) Timestamp: 2026-01-02T16:41:12-07:00 What I've Tried Cleared caches Restarted my machine Reinstalled Xcode Installed
1
0
184
1w
Hover effects w/ Compositor Services w/ PSVR2 controllers
Hi, I would like clarification on whether the new hover effects feature introduced in vision os 26 supported pinch gestures through the psvr 2 controllers. In your sample application, I was not able to confirm that this was working. Only pinch clicking with my hands worked. Pulling the trigger on the controller whilst looking at a 3d object did not activate the hover effect spatial event in the sample application. (The object is showing the highlight though) This is inconsistent with hover effect behavior with psvr2 controllers on swift ui views, where the trigger press does count as a button click. The sample I used was this one: https://developer.apple.com/documentation/compositorservices/rendering_hover_effects_in_metal_immersive_apps
0
0
385
1w
Reply to APNS always returning "discarded as device was offline"
gateway.push.apple.com is the legacy APNs endpoint which has been shutdown earlier in 2025. So, if that's the endpoint you are using your notifications will not work at all. But it would have stopped working back in the spring, not on December 13th. But in any case, if that is indeed the endpoint you are using, you need to update your push servers to use the new HTTP/2 protocol and the new endpoints. You can read more about the new APNs Provider API here: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns/ If you have issues after migrating to the new interface, or have technical questions about the migration, we are happy to help troubleshoot your push requests once you have started using the HTTP/2 protocol. Please understand that we are unable to help with the specifics of your server side implementation. Unfortunately we also cannot make recommendations on which 3rd party resources to use to make this
1w
Reply to In need of a sample receipt file that uses the SHA-256 hash
Ahh, finally found the right answer here: https://github.com/iterate-ch/cyberduck/issues/16031 Basically, the default behavior of hiding the actual Mac's MAC address is the cause for the problem (Privaty Wi-Fi Address): If the Mac rotates or replaces the primary network interface's MAC address, and my code still uses the old code that would fetch the MAC from the higher level APIs, it would get the wrong MAC, and then fail the receipt check. To fix this, the MAC has to be fetched from IOKit registry, e.g. as shown in https://developer.apple.com/documentation/appstorereceipts/validating-receipts-on-the-device or https://lapcatsoftware.com/articles/2023/11/4.html
1w
Right-clicking at the top edge of the menu bar doesn't trigger a statusitem action event any more in Tahoe
I have a program that installs an NSStatusItem button in the Menubar. It registers for both the right and left click events. Before Tahoe, clicking into the statusitem with the mouse at the very top of the menubar would also invoke the Action handler, be it a right or a left click. Now, with Tahoe, where the menubar height was changed from 24 to 30, left clicks at the top edge still trigger the Action event, but right clicks do not - they only work if moving the mouse a few pixels down. This is quite inconvenient - the idea of the menubar being at the edge of the screen was always that one can just push the mouse to the edge and then click to interact. Tahoe has broken this basic GUI concept now partially. And since left clicks still work, it suggests that I don't do anything wrong - the clicks are controlled by the framework, and I'm never asked to provide a frame in which the clicks shall be accepted. It's that Apple's code apparently now uses the smaller statusitem's bounds instead of the full men
Topic: UI Frameworks SubTopic: AppKit
0
0
58
1w
Reply to In need of a sample receipt file that uses the SHA-256 hash
I can't seem to edit the message now that I know a bit more. So, here's a reply instead. Turns out that the basic receipt validation does not use SHA-256. The message rather seems to come up when my app quits with exit code 173 due to the receipt being invalid (as in when the app was copied from a different Mac, and now the GUID doesn't match). Whereas older macOS versions would then re-fetch a new receipt (and optionally ask the user to authenticate again), this doesn't apparently happen any more (WhyTF not? Why not keep the old method and only use the new method when the app makes it known to support the new method?!) Forcing a re-fetch of the receipt by simply deleting and re-installing the app from the MAS doesn't appear to work either as the receipt appears to be cached somewhere (again WTF - why isn't macOS being cautious here and falls back to downloading it when the app keeps returning 173???) It appears the app now has to explicitly request a new receipt. With SKReceiptRefreshRequest, which
1w