Search results for

“DTiPhoneSimulatorErrorDomain Code 2”

162,372 results found

Post

Replies

Boosts

Views

Activity

Reply to Explicit dynamic loading of a framework in macOS - recommended approach?
@DTS Engineer I see folks avoid load-time imports because of initialisation order issues, and that’s especially true of folks coming from other platforms I'm working on a cross-platform project and there is a dynamic library. In all other OSes, the dynamic library is loaded at runtime and to ensure consistency, wanted to use the same approach for Apple OSes. Further, if the Posix C APIs such as dlopen and dlsym are used, Apple OSes can directly use the same code as Linux, resulting in good simplification. The Framework will be a dependency for the App target (but not linked), signed, embedded in the .app package and all the extension targets (such as Notification Service Extension, Widget extension etc.) will also load it at runtime. But one concern is, to use dlopen and dlsym, the path to the internal MachO binary is required, whereas .so file is used for Linux. Not able to find this documented or attempted, so the question is: Can we use the Posix C APIs such as dlload and dlsym to load MachO binar
Topic: App & System Services SubTopic: Core OS Tags:
1w
Switch to organization membership - HELP?
I have an individual membership which I want to switch to organization membership. Ive completed all the forms and stuff, now multiple times, without getting any response. So 2 months ago I contacted support, and then again last month, and now earlier this week - No answer. So what do I do now? Ive tried submitting the form, nothing happens. Multiple times now. Ive tried contacting support, nothing happens. Multiple times. Whats my solution here? This is stopping me from publishing.
2
0
76
1w
UIRequiresFullScreen Deprecation
I work on a universal app that targets both iPhone and iPad. Our iPad app currently requires full screen. When testing on the latest iPadOS 26 beta, we see the following warning printed to the console: Update the Info.plist: 1) `UIRequiresFullScreen` will soon be ignored. 2) Support for all orientations will soon be required. It will take a fair amount of effort to update our app to properly support presentation in a resizable window. We wanted to gauge how urgent this change is. Our testing has shown that iPadOS 26 supports our app in a non-resizable window. Can someone from Apple provide any guidance as to how soon “soon” is? Will UIRequiresFullScreen be ignored in iPadOS 26? Will support for all orientations be required in iPadOS 26?
10
0
1.8k
1w
ViewBridge to RemoteViewService Terminated (...)
After updating to Sonoma, the following is logged in the Xcode console when an editable text field becomes key. This doesn't occur on any text field, but it seems to happen when the text field is within an NSPopover or an NSSavePanel. ViewBridge to RemoteViewService Terminated: Error Domain=com.apple.ViewBridge Code=18 (null) UserInfo={com.apple.ViewBridge.error.hint=this process disconnected remote view controller -- benign unless unexpected, com.apple.ViewBridge.error.description=NSViewBridgeErrorCanceled} What does this mean?
Topic: UI Frameworks SubTopic: AppKit
12
0
4k
1w
AlarmKit leaves an empty zombie Live Activity in Dynamic Island after swipe-dismiss while unlocked
Hi, We are the developers of Morning Call (https://morningcall.info), and we believe we may have identified an AlarmKit / system UI bug on iPhone. We can reproduce the same behavior not only in our app, but also in Apple’s official AlarmKit sample app, which strongly suggests this is a framework or system-level issue rather than an app-specific bug. Demonstration Video of producing zombie Live Activity https://www.youtube.com/watch?v=cZdF3oc8dVI Related Thread https://developer.apple.com/forums/thread/812006 https://developer.apple.com/forums/thread/817305 https://developer.apple.com/forums/thread/807335 Environment iPhone with Dynamic Island Alarm created using AlarmKit Device is unlocked when the alarm begins alerting Steps to reproduce Schedule an AlarmKit alarm. Wait for the alarm to alert while the device is unlocked. The alarm appears in Dynamic Island. Instead of tapping the intended stop or dismiss button, swipe the Dynamic Island presentation away. Expected result The alarm should be fully dismissed.
6
0
649
1w
Reply to Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, Thanks for your help! I was able to run the app without any issue but after upgrading Xcode to v26.x.x, I am having similar issue again. I’m encountering an issue with background location tracking stopping after the app remains in the background/killed mode for around 1–2 days. After some time in the background, the location events stop arriving entirely. While diagnosing the issue, I noticed logs/messages related to “service session required”. I would like clarification regarding CLServiceSession lifecycle management. Currently, I create the session locally inside a function like this: let session = CLServiceSession( authorization: .always, fullAccuracyPurposeKey: Trip ) I’m wondering whether the session being scoped locally could cause the service session to be deallocated or invalidated, eventually stopping background location delivery. Would it be more appropriate to maintain a strong reference at the class level, for example: private var serviceSession: CLServiceSession? and then initialize
1w
Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, I am creating a Driving Behaviour Monitoring app in which I range beacons and I require location updates in foreground, background and in terminated state all the time. I am using CLServiceSession with Always Authorisation to get location events. I create CLServiceSession object in the foreground and start monitoring driving and then re-create it when the app is relaunched after termination. Doing this works fine. But sometimes when app is terminated and is not opened again, the app runs on its own even when the device is stationary ( I can see the app is using Location in the Control Centre) and after that Location updates are not received and I am not able to track the driving behaviour. I tried to add diagnostics to know the cause and found Insufficiently In Use and then Service Session Required in the diagnostics. It would be of great help if the proper usage of CLServiceSession is provided. Important Question: When does the CLServiceSession gets invalidated or destroyed that was created when the app
2
0
346
1w
Programatically adding to a TextField and moving the TextSelection point in SwiftUI
Hi! I am trying to create a simple SwiftUI TextField, with an external button to add text to the field at the current insertion point (the cursor in the TextField). When I add the text, the cursor (I-Beam) remains at the original insertion point, so I want it to move over to the end of what I added. The trouble is, it sometimes moves further forward or to the end (visibly) but works as if it is still at the point I moved it to. This seems to possibly be due to emojis in the TextField (because, I assume, they are composed of more bytes). Further, sometimes the addition of the text can cause an emoji to appear unexpectedly, I assume because it is combining the bytes in an odd way. So moving the cursor seems to sometimes introduce weird behaviour. This comes from a much larger project, but I have distilled this down to the smallest example project I could. And I have a video to show how it behaves. Here's the main part of the code, and I'll attach an Xcode project: import SwiftUI struct ContentView: Vie
2
0
450
1w
Reply to Switch view that digital crown controls
The digital crown controls the current focused view. Did you try to use focused(_:equals:) and focusable() to make sure the focus is on your target view? If that doesn't work, maybe you can share your code here for folks to take a look? Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: General Tags:
1w
Switch view that digital crown controls
I wonder if there is way to switch the view that the digital crown controls. Like if have a list and a vertical tab view, when the tab displays, I want the crown control the scrolling in the tab. I dont want to use sheet, cause I have some special UX design, and also dont want to use if else to toggle between the two views. I have tried with resetFocus and other focus related functions, not working
1
0
194
1w
Reply to How to handle all the core AppleEvents
You're right that SwiftUI covers oapp/rapp/odoc/quit natively, plus GURL via the .onOpenURL modifier. For the events you're asking about: Open content — could you clarify which event you mean? If you're thinking of GURL (Open URL / open this URL or content), that's the onOpenURL path. If you mean something else (a custom ocon or app-specific event), let me know and I can answer specifically. Print document (pdoc) — SwiftUI does not route this to NSApplicationDelegate.application(_:printFiles:withSettings:showPrintPanels:). I verified by sending osascript -e 'tell application Test to print POSIX file ...' to test apps using both WindowGroup and DocumentGroup in macOS 26.4 — the delegate method never fired. So the standard delegate path is silent under SwiftUI. The path that does work is registering directly with NSAppleEventManager. Install your handler in applicationWillFinishLaunching: (before any events arrive) and SwiftUI doesn't fight you for ownership: @main struct MyApp: App { @NSApplicationDelegateAdap
Topic: UI Frameworks SubTopic: SwiftUI Tags:
1w
Reply to NSTextAttachment view flicker while typing in same paragraph
Thanks for posting. I built a minimal test to try to reproduce this — a SwiftUI NSViewRepresentable-wrapped NSTextView with a custom NSTextAttachment subclass and a viewProvider returning a custom NSView. I then stress-tested it against five plausible causes, and none of them reproduced any flicker: Baseline pattern — custom attachment + view provider returning a tinted layer-backed view, type in the same paragraph as the inserted attachment: stable. No caching in loadView() — every call constructs a brand-new NSView with fresh subviews and constraints: stable. Aggressive layout invalidation on every keystroke — NSTextLayoutManager.invalidateLayout(for: documentRange) from a textDidChange: delegate: stable. Mixed content sources — both attachment.image set to a programmatically drawn NSImage and a custom viewProvider returning a separate NSView: stable. Raster image content — loadView() returns an NSView containing an NSImageView with a real NSBitmapImageRep-backed NSImage instead of a layer-tinted plain view
Topic: UI Frameworks SubTopic: AppKit
1w
Reply to After binding to NSBrowser indexPaths the browser assumes I'm using NSBrowserCell and calls unimplemented methods on my NSCell subclass
Hi Macho Man Randy Savage, Your diagnosis is essentially right, and I dug deeper than I expected after reproducing it. The situation is worse than just one wrong selector — NSBrowser's Cocoa Bindings layer doesn't compose with the item-based delegate API at all, regardless of cell class. I built a small test project (item-based NSBrowser, an NSTextFieldCell subclass installed as cellPrototype, and selectionIndexPaths bound to a property). With the binding in place, the app crashes during draw with: *** -[NSTextFieldCell setLeaf:]: unrecognized selector sent to instance ... The actual selector is setLeaf:, not setIsLeaf: (worth knowing if you grep for it). The stack tells the rest of the story: 0 CoreFoundation __exceptionPreprocess 1 libobjc.A.dylib objc_exception_throw ... 5 AppKit -[NSBrowserBinder browser:willDisplayCell:atRow:column:] + 156 6 AppKit -[_NSBindingAdaptor browser:willDisplayCell:atRow:column:] + 288 7 AppKit -[NSBrowser _sendDelegateWillDisplayCell:atRow:column:] + 64 When you bind selection
Topic: UI Frameworks SubTopic: AppKit Tags:
2w
Reply to Explicit dynamic loading of a framework in macOS - recommended approach?
@DTS Engineer I see folks avoid load-time imports because of initialisation order issues, and that’s especially true of folks coming from other platforms I'm working on a cross-platform project and there is a dynamic library. In all other OSes, the dynamic library is loaded at runtime and to ensure consistency, wanted to use the same approach for Apple OSes. Further, if the Posix C APIs such as dlopen and dlsym are used, Apple OSes can directly use the same code as Linux, resulting in good simplification. The Framework will be a dependency for the App target (but not linked), signed, embedded in the .app package and all the extension targets (such as Notification Service Extension, Widget extension etc.) will also load it at runtime. But one concern is, to use dlopen and dlsym, the path to the internal MachO binary is required, whereas .so file is used for Linux. Not able to find this documented or attempted, so the question is: Can we use the Posix C APIs such as dlload and dlsym to load MachO binar
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Switch to organization membership - HELP?
I have an individual membership which I want to switch to organization membership. Ive completed all the forms and stuff, now multiple times, without getting any response. So 2 months ago I contacted support, and then again last month, and now earlier this week - No answer. So what do I do now? Ive tried submitting the form, nothing happens. Multiple times now. Ive tried contacting support, nothing happens. Multiple times. Whats my solution here? This is stopping me from publishing.
Replies
2
Boosts
0
Views
76
Activity
1w
UIRequiresFullScreen Deprecation
I work on a universal app that targets both iPhone and iPad. Our iPad app currently requires full screen. When testing on the latest iPadOS 26 beta, we see the following warning printed to the console: Update the Info.plist: 1) `UIRequiresFullScreen` will soon be ignored. 2) Support for all orientations will soon be required. It will take a fair amount of effort to update our app to properly support presentation in a resizable window. We wanted to gauge how urgent this change is. Our testing has shown that iPadOS 26 supports our app in a non-resizable window. Can someone from Apple provide any guidance as to how soon “soon” is? Will UIRequiresFullScreen be ignored in iPadOS 26? Will support for all orientations be required in iPadOS 26?
Replies
10
Boosts
0
Views
1.8k
Activity
1w
ViewBridge to RemoteViewService Terminated (...)
After updating to Sonoma, the following is logged in the Xcode console when an editable text field becomes key. This doesn't occur on any text field, but it seems to happen when the text field is within an NSPopover or an NSSavePanel. ViewBridge to RemoteViewService Terminated: Error Domain=com.apple.ViewBridge Code=18 (null) UserInfo={com.apple.ViewBridge.error.hint=this process disconnected remote view controller -- benign unless unexpected, com.apple.ViewBridge.error.description=NSViewBridgeErrorCanceled} What does this mean?
Topic: UI Frameworks SubTopic: AppKit
Replies
12
Boosts
0
Views
4k
Activity
1w
AlarmKit leaves an empty zombie Live Activity in Dynamic Island after swipe-dismiss while unlocked
Hi, We are the developers of Morning Call (https://morningcall.info), and we believe we may have identified an AlarmKit / system UI bug on iPhone. We can reproduce the same behavior not only in our app, but also in Apple’s official AlarmKit sample app, which strongly suggests this is a framework or system-level issue rather than an app-specific bug. Demonstration Video of producing zombie Live Activity https://www.youtube.com/watch?v=cZdF3oc8dVI Related Thread https://developer.apple.com/forums/thread/812006 https://developer.apple.com/forums/thread/817305 https://developer.apple.com/forums/thread/807335 Environment iPhone with Dynamic Island Alarm created using AlarmKit Device is unlocked when the alarm begins alerting Steps to reproduce Schedule an AlarmKit alarm. Wait for the alarm to alert while the device is unlocked. The alarm appears in Dynamic Island. Instead of tapping the intended stop or dismiss button, swipe the Dynamic Island presentation away. Expected result The alarm should be fully dismissed.
Replies
6
Boosts
0
Views
649
Activity
1w
Reply to Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, Thanks for your help! I was able to run the app without any issue but after upgrading Xcode to v26.x.x, I am having similar issue again. I’m encountering an issue with background location tracking stopping after the app remains in the background/killed mode for around 1–2 days. After some time in the background, the location events stop arriving entirely. While diagnosing the issue, I noticed logs/messages related to “service session required”. I would like clarification regarding CLServiceSession lifecycle management. Currently, I create the session locally inside a function like this: let session = CLServiceSession( authorization: .always, fullAccuracyPurposeKey: Trip ) I’m wondering whether the session being scoped locally could cause the service session to be deallocated or invalidated, eventually stopping background location delivery. Would it be more appropriate to maintain a strong reference at the class level, for example: private var serviceSession: CLServiceSession? and then initialize
Replies
Boosts
Views
Activity
1w
Lifecycle and Usage of CLServiceSession after the app is terminated
Hi, I am creating a Driving Behaviour Monitoring app in which I range beacons and I require location updates in foreground, background and in terminated state all the time. I am using CLServiceSession with Always Authorisation to get location events. I create CLServiceSession object in the foreground and start monitoring driving and then re-create it when the app is relaunched after termination. Doing this works fine. But sometimes when app is terminated and is not opened again, the app runs on its own even when the device is stationary ( I can see the app is using Location in the Control Centre) and after that Location updates are not received and I am not able to track the driving behaviour. I tried to add diagnostics to know the cause and found Insufficiently In Use and then Service Session Required in the diagnostics. It would be of great help if the proper usage of CLServiceSession is provided. Important Question: When does the CLServiceSession gets invalidated or destroyed that was created when the app
Replies
2
Boosts
0
Views
346
Activity
1w
Reply to Programatically adding to a TextField and moving the TextSelection point in SwiftUI
Thank you! Very much appreciate the workaround ideas and the correction to the code. I will also file a feedback report.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1w
Programatically adding to a TextField and moving the TextSelection point in SwiftUI
Hi! I am trying to create a simple SwiftUI TextField, with an external button to add text to the field at the current insertion point (the cursor in the TextField). When I add the text, the cursor (I-Beam) remains at the original insertion point, so I want it to move over to the end of what I added. The trouble is, it sometimes moves further forward or to the end (visibly) but works as if it is still at the point I moved it to. This seems to possibly be due to emojis in the TextField (because, I assume, they are composed of more bytes). Further, sometimes the addition of the text can cause an emoji to appear unexpectedly, I assume because it is combining the bytes in an odd way. So moving the cursor seems to sometimes introduce weird behaviour. This comes from a much larger project, but I have distilled this down to the smallest example project I could. And I have a video to show how it behaves. Here's the main part of the code, and I'll attach an Xcode project: import SwiftUI struct ContentView: Vie
Replies
2
Boosts
0
Views
450
Activity
1w
Reply to Switch view that digital crown controls
The digital crown controls the current focused view. Did you try to use focused(_:equals:) and focusable() to make sure the focus is on your target view? If that doesn't work, maybe you can share your code here for folks to take a look? Best, —— Ziqiao Chen  Worldwide Developer Relations.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
1w
Switch view that digital crown controls
I wonder if there is way to switch the view that the digital crown controls. Like if have a list and a vertical tab view, when the tab displays, I want the crown control the scrolling in the tab. I dont want to use sheet, cause I have some special UX design, and also dont want to use if else to toggle between the two views. I have tried with resetFocus and other focus related functions, not working
Replies
1
Boosts
0
Views
194
Activity
1w
Reply to How to handle all the core AppleEvents
You're right that SwiftUI covers oapp/rapp/odoc/quit natively, plus GURL via the .onOpenURL modifier. For the events you're asking about: Open content — could you clarify which event you mean? If you're thinking of GURL (Open URL / open this URL or content), that's the onOpenURL path. If you mean something else (a custom ocon or app-specific event), let me know and I can answer specifically. Print document (pdoc) — SwiftUI does not route this to NSApplicationDelegate.application(_:printFiles:withSettings:showPrintPanels:). I verified by sending osascript -e 'tell application Test to print POSIX file ...' to test apps using both WindowGroup and DocumentGroup in macOS 26.4 — the delegate method never fired. So the standard delegate path is silent under SwiftUI. The path that does work is registering directly with NSAppleEventManager. Install your handler in applicationWillFinishLaunching: (before any events arrive) and SwiftUI doesn't fight you for ownership: @main struct MyApp: App { @NSApplicationDelegateAdap
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
1w
Reply to NSTextAttachment view flicker while typing in same paragraph
Thanks for posting. I built a minimal test to try to reproduce this — a SwiftUI NSViewRepresentable-wrapped NSTextView with a custom NSTextAttachment subclass and a viewProvider returning a custom NSView. I then stress-tested it against five plausible causes, and none of them reproduced any flicker: Baseline pattern — custom attachment + view provider returning a tinted layer-backed view, type in the same paragraph as the inserted attachment: stable. No caching in loadView() — every call constructs a brand-new NSView with fresh subviews and constraints: stable. Aggressive layout invalidation on every keystroke — NSTextLayoutManager.invalidateLayout(for: documentRange) from a textDidChange: delegate: stable. Mixed content sources — both attachment.image set to a programmatically drawn NSImage and a custom viewProvider returning a separate NSView: stable. Raster image content — loadView() returns an NSView containing an NSImageView with a real NSBitmapImageRep-backed NSImage instead of a layer-tinted plain view
Topic: UI Frameworks SubTopic: AppKit
Replies
Boosts
Views
Activity
1w
StoreKit 2 returns empty products array on device (iPhone) even though IAP is Ready to Submit
Hi, I'm experiencing an issue with StoreKit 2 in my iOS app where Product.products(for:) always returns an empty array on a real iPhone device. 📱 Environment iOS: 26 Device: iPhone 16 pro max Xcode: 26.5 StoreKit: StoreKit 2
Replies
1
Boosts
0
Views
102
Activity
1w
Reply to After binding to NSBrowser indexPaths the browser assumes I'm using NSBrowserCell and calls unimplemented methods on my NSCell subclass
Hi Macho Man Randy Savage, Your diagnosis is essentially right, and I dug deeper than I expected after reproducing it. The situation is worse than just one wrong selector — NSBrowser's Cocoa Bindings layer doesn't compose with the item-based delegate API at all, regardless of cell class. I built a small test project (item-based NSBrowser, an NSTextFieldCell subclass installed as cellPrototype, and selectionIndexPaths bound to a property). With the binding in place, the app crashes during draw with: *** -[NSTextFieldCell setLeaf:]: unrecognized selector sent to instance ... The actual selector is setLeaf:, not setIsLeaf: (worth knowing if you grep for it). The stack tells the rest of the story: 0 CoreFoundation __exceptionPreprocess 1 libobjc.A.dylib objc_exception_throw ... 5 AppKit -[NSBrowserBinder browser:willDisplayCell:atRow:column:] + 156 6 AppKit -[_NSBindingAdaptor browser:willDisplayCell:atRow:column:] + 288 7 AppKit -[NSBrowser _sendDelegateWillDisplayCell:atRow:column:] + 64 When you bind selection
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
2w