Search results for

“show when run”

115,062 results found

Post

Replies

Boosts

Views

Activity

How can I reliably get the final restored window size on macOS when onAppear / viewDidAppear fires too early?
I’m running into a macOS window restoration behavior issue where viewDidAppear (AppKit) or onAppear (SwiftUI) fires before the window’s final restored size is applied. AppKit example class MyViewController: NSViewController { override func viewDidLayout() { print(viewDidLayout: (view.bounds.size)) } override func viewDidAppear() { print(viewDidAppear: (view.bounds.size)) } } Logs on launch: viewDidAppear: (480.0, 270.0) viewDidLayout: (480.0, 270.0) viewDidLayout: (556.0, 476.0) viewDidLayout: (556.0, 476.0) The correct restored size is (556.0, 476.0), but viewDidAppear initially reports the old default size (480.0, 270.0). SwiftUI equivalent struct MyView: View { var body: some View { GeometryReader { geo in VStack {} .onAppear { print(onAppear: (geo.size)) } .onChange(of: geo.size) { print(onChange: (geo.size)) } } } } Logs on launch: onAppear: (900.0, 450.0) onChange: (680.0, 658.0) Problem I need to run some setup code: Only once After the view/window has its correct restored size Withou
0
0
9
9m
SwiftData with CloudKit Error: Error updating background task request
Hi, Overview I have a SwiftData project which automatically syncs with CloudKit. When I run the app, I see the following error in Xcode logs. Error updating background task request: Error Domain=BGSystemTaskSchedulerErrorDomain Code=3 (null) My attempt I can enable Background processing (under Signing & Capabilities > Background modes), but I don't know the BGTaskSchedulerPermittedIdentifiers to add in the Info.plist Questions How can I resolve this? If I should enable background processing, what are the BGTaskSchedulerPermittedIdentifiers to add in Info.plist?
0
0
8
3h
applicationWillTerminate to wrap up Background Recording
Hello together, the user is able to do recordings with my app. The recordings also runs, while the App is in Background. I have Background Modes Audio & Background enabled. When the user accidentally terminates the App while the recording is still running, the whole recording is lost. I tried AppDelegate applicationWillTerminate on my iOS 26 App and it works perfectly to wrap up the LiveActivity that is shown while the recording is active. But it does not save the Audio and also doesn't update the Widgets (they are interactive and show a different state while recording and stay stuck in recording-state on accidental termination). Any ideas? Best wishes, Dominik
0
0
21
5h
Is there a recommended architecture from Apple for continuous proximity detection between iOS devices?
I'm developing an iOS application that relies on peer-to-peer discovery and connection using Bluetooth. The expected behavior is: Two iOS devices with the application installed. Both users marked as visible. When within Bluetooth range, the devices should discover each other and establish a connection. However, the problem occurs when: The application is in the background (minimized) OR The device is locked (screen off). In these states: The devices can no longer be detected. The search returns no nearby devices. Connection could not be established. ChatGPT: What you want to do probably runs into a structural limitation of iOS — it's not a bug. And iOS: severely limits background BLE scanning. reduces advertising frequency. may even stop completely depending on the state (lock screen). In other words: 👉 iPhone was not designed to function as a continuous radar between background apps. Apps that do something similar (like AirDrop or Find My): use Apple's private or privileged APIs or combine BLE + Wi
0
0
30
5h
Reply to Transaction.unfinished not getting unfinished transactions
Hello, I can confirm that there is a bug in iOS 26.4.2 when testing local StoreKit 2 in Xcode. The Transaction.unfinished loop has nothing inside, although the transaction manager clearly shows there are unfinished transactions. If testing it on iOS 18.6 (only on simulator), it will loop through unfinished and successfully clear any unfinished transactions. Also it might be possible that the local storekit daemon is out of sync, I have filed a bug report for that under: Transaction.currentEntitlements sometimes does not emit a result until device is reboot (FB22349195)
Topic: App & System Services SubTopic: StoreKit Tags:
6h
Enrollment Pending more than 2 days after ID upload and successful payment
Hello, I recently enrolled in the Apple Developer Program and successfully completed the payment. Afterward, I received an email requesting identity verification documents, which I have already uploaded. It has now been over the stated 2 business days, but my account status has not been updated. Furthermore, when I log into the Apple Developer portal, it still prompts me to Complete Enrollment and asks me to pay the fee again. Because of this, I am unsure if the Enrollment ID currently displayed on my account is the same one from when I originally completed the payment. For your reference to help investigate: Current Enrollment ID: P2N3MR4UDN Order Number: W1498763945 Note: My credit card statement already shows that the payment was charged successfully. Please kindly look into this for me and let me know if everything is on track. Thank you so much for your time and help.
0
0
69
7h
Apple Development Certificate Being Issued Under Wrong Team (Mismatch Between Team IDs)
I am experiencing an issue with Apple Development certificate creation in Xcode for my organization account. Account details: Organization: Jtecx LLC Team ID: 8V397ULNY4 Issue: When I attempt to create a new Apple Development certificate in Xcode under the Jtecx LLC (8V397ULNY4) team, the certificate is consistently generated under a different team: Apple Development: Joseph Salmond (67P4AAZ5TA) This appears to be my personal team, not the organization team. Impact: Because of this mismatch: Provisioning profiles created under 8V397ULNY4 cannot find a matching signing certificate Xcode shows “Signing Certificate: None” Xcode reports that the provisioning profile does not include the signing certificate I am unable to run or test the app on physical devices due to signing failures Troubleshooting performed: Deleted all Apple Development certificates from Keychain Access Revoked existing Apple Development certificates in the Apple Developer Portal Created a new Certificate Signing Request (CSR
0
0
63
8h
Can Xcode Cloud produce a notarized .pkg for a macOS daemon?
I have a macOS app (a background daemon) that I distribute outside the App Store as a .pkg installer. My build process is: Build the app (xcodebuild archive) Sign the app with Developer ID Application Package it with pkgbuild, signed with Developer ID Installer Notarize with notarytool Staple with stapler This works perfectly on my local machine using custom build_pkg.sh. I'm trying to automate this in Xcode Cloud using a ci_post_xcodebuild.sh script so a new build is triggered whenever I push to git repository. The problem is: • security find-identity shows 0 valid identities in the post-build script environment • The archived app has Signature=adhoc (no Developer ID signing) • pkgbuild can't sign the .pkg without a Developer ID Installer certificate • Notarization rejects everything because nothing is signed with Developer ID My question: Is there any way to make Developer ID certificates available in Xcode Cloud's post-build scripts? Or is Xcode Cloud only designed for App Store distribution, and
0
0
87
8h
Reply to The APNs delay to send notification on iOS 26.4
But recently, I found some disordered VoIP notifications. My VoIP app received the StopRing push before the StartRing push. Do you know what was happening on the device? It's possible there is a push level issue involved here, but I can also see why this could happen under very normal conditions. Notice the odd discrepancy in timing: Then we can see the StartRing send first, but received in the app after the StopRing. The StartRing took about 6s to send and the StopRing took about 1s. The pushes were sent 5s apart. // receive StopRing 2026-04-0909:54:48.858 // receive StartRing 2026-04-0909:54:49.524 ...but were delivered ~2/3 of a second from each other. You are actually thinking about the question here the wrong way— the question isn't just why did stop arrive before start, it's how did they end up arriving so close to each other. I suspect what started this is that the device was actually offline at the point the original push was sent, then came back online shortly after the stop push was queued. So, the
10h
Run iOS simulator, mediaanalysisd hogs my CPU
Any idea why this might happen and how to stop it? I try to run a simple iOS app from Xcode, in the iOS Simulator, and it takes a very long time to start. I see mediaanalysisd in the Activity Monitor, taking a lot of CPU, fans are blowing. When I quit the simulator, the mediaanalysisd process goes away and the fans stop. Maybe related: I have a 2020 MacBook Pro with Intel chips, and general it's been having more bogged down performance and fans blowing that in years past. My suspicion is the latest macOS updates are not caring much about Intel CPUs...
0
0
92
10h
Crash while running NSAlert.runModal
My application overrides AppDelegate.menuWillOpen(). During startup of the application (in AppDelegate.applicationDidFinishLaunching) I attempt to install a privileged helper tool using SMAppService. On detecting that the tool needs to be allowed/installed I open the Login Items & Extensions settings and then display a modal dialog, advising the user to authorise the privileged helper. Then the application crashes with a message in the crash file Application Specific Information: BUG IN CLIENT OF LIBDISPATCH: trying to lock recursively Maybe I could avoid this by removing the menuWillOpen() override so am looking for a workaround. i.e. is it possible to install the override function programmatically later during initialisation, rather then declaring it in an extension. I have attached the crash log. ChronyControl-2026-04-29-111332.crash
2
0
47
10h
Reply to Access to process unique id
Thanks for the post, this is a great post and hope many developers jump into this thread and provide suggestions and opinions of the best way to accomplish that. proc_pidinfo() PROC_PIDUNIQIDENTIFIERINFO looks something I haven't use to be honest. Using them in production code sounds risky because is subject to breakage in future macOS/iOS updates without warning? If your concern about PID reuse races you should not use PIDs at all. If you are iterating over running processes or monitoring a specific process and want to ensure the PID hasn't been reused by a new process, the standard approach is to combine the PID with the process's start time, it is practically impossible for a PID to be reused in the exact same microsecond. Albert
  Worldwide Developer Relations.
Topic: App & System Services SubTopic: Core OS Tags:
15h
Is App Store Connect Subscriptions Down for anyone else?
I'm trying to create two new subscriptions for my app and I get a loader for quite awhile when I click on a subscription I'm trying to edit to add pricing info, introductory offer, etc. Once the subscription page finally loads, the Supscription Prices section shows this error: An error has occurred. Try again later. It's showing 500's in the console logs too: /iris/v1/subscriptions/6764495098/prices?include=territory,subscriptionPricePoint&limit=500:1 Failed to load resource: the server responded with a status of 500 () I've tried clearing browser cache, restarting my browser/computer and trying other browsers..nothings working.
1
0
25
15h
MPS backend reports ~40 GiB 'other allocations' on 48 GB M5 Pro under macOS 26.4.1, blocking large tensor operations (PyTorch)
Product macOS Version macOS 26.4.1 (public release) Hardware Apple M5 Pro, 48 GB unified memory Summary On macOS 26.4.1, the MPS backend consistently reports approximately 40 GiB of “other allocations” on a 48 GB M5 Pro machine, even on a freshly rebooted system with minimal user applications running. This leaves insufficient memory for large GPU tensor operations that previously succeeded on earlier macOS versions. The failure manifests as: RuntimeError: MPS backend out of memory (MPS allocated: 17.60 GiB, other allocations: 40.17 GiB, max allowed: 63.65 GiB). Tried to allocate 7.63 GiB on private pool. The “other allocations: 40.17 GiB” value is consistent across reboots and does not change materially when user applications are quit. This suggests macOS 26.4.1 has increased its baseline GPU/unified memory consumption compared to prior releases in a way that is visible to the MPS allocator. Steps to Reproduce Fresh reboot of M5 Pro, 48 GB, macOS 26.4.1 Launch a PyTorch 2.11.0 application using MPS a
1
0
130
16h
How can I reliably get the final restored window size on macOS when onAppear / viewDidAppear fires too early?
I’m running into a macOS window restoration behavior issue where viewDidAppear (AppKit) or onAppear (SwiftUI) fires before the window’s final restored size is applied. AppKit example class MyViewController: NSViewController { override func viewDidLayout() { print(viewDidLayout: (view.bounds.size)) } override func viewDidAppear() { print(viewDidAppear: (view.bounds.size)) } } Logs on launch: viewDidAppear: (480.0, 270.0) viewDidLayout: (480.0, 270.0) viewDidLayout: (556.0, 476.0) viewDidLayout: (556.0, 476.0) The correct restored size is (556.0, 476.0), but viewDidAppear initially reports the old default size (480.0, 270.0). SwiftUI equivalent struct MyView: View { var body: some View { GeometryReader { geo in VStack {} .onAppear { print(onAppear: (geo.size)) } .onChange(of: geo.size) { print(onChange: (geo.size)) } } } } Logs on launch: onAppear: (900.0, 450.0) onChange: (680.0, 658.0) Problem I need to run some setup code: Only once After the view/window has its correct restored size Withou
Replies
0
Boosts
0
Views
9
Activity
9m
SwiftData with CloudKit Error: Error updating background task request
Hi, Overview I have a SwiftData project which automatically syncs with CloudKit. When I run the app, I see the following error in Xcode logs. Error updating background task request: Error Domain=BGSystemTaskSchedulerErrorDomain Code=3 (null) My attempt I can enable Background processing (under Signing & Capabilities > Background modes), but I don't know the BGTaskSchedulerPermittedIdentifiers to add in the Info.plist Questions How can I resolve this? If I should enable background processing, what are the BGTaskSchedulerPermittedIdentifiers to add in Info.plist?
Replies
0
Boosts
0
Views
8
Activity
3h
applicationWillTerminate to wrap up Background Recording
Hello together, the user is able to do recordings with my app. The recordings also runs, while the App is in Background. I have Background Modes Audio & Background enabled. When the user accidentally terminates the App while the recording is still running, the whole recording is lost. I tried AppDelegate applicationWillTerminate on my iOS 26 App and it works perfectly to wrap up the LiveActivity that is shown while the recording is active. But it does not save the Audio and also doesn't update the Widgets (they are interactive and show a different state while recording and stay stuck in recording-state on accidental termination). Any ideas? Best wishes, Dominik
Replies
0
Boosts
0
Views
21
Activity
5h
Is there a recommended architecture from Apple for continuous proximity detection between iOS devices?
I'm developing an iOS application that relies on peer-to-peer discovery and connection using Bluetooth. The expected behavior is: Two iOS devices with the application installed. Both users marked as visible. When within Bluetooth range, the devices should discover each other and establish a connection. However, the problem occurs when: The application is in the background (minimized) OR The device is locked (screen off). In these states: The devices can no longer be detected. The search returns no nearby devices. Connection could not be established. ChatGPT: What you want to do probably runs into a structural limitation of iOS — it's not a bug. And iOS: severely limits background BLE scanning. reduces advertising frequency. may even stop completely depending on the state (lock screen). In other words: 👉 iPhone was not designed to function as a continuous radar between background apps. Apps that do something similar (like AirDrop or Find My): use Apple's private or privileged APIs or combine BLE + Wi
Replies
0
Boosts
0
Views
30
Activity
5h
Reply to Transaction.unfinished not getting unfinished transactions
Hello, I can confirm that there is a bug in iOS 26.4.2 when testing local StoreKit 2 in Xcode. The Transaction.unfinished loop has nothing inside, although the transaction manager clearly shows there are unfinished transactions. If testing it on iOS 18.6 (only on simulator), it will loop through unfinished and successfully clear any unfinished transactions. Also it might be possible that the local storekit daemon is out of sync, I have filed a bug report for that under: Transaction.currentEntitlements sometimes does not emit a result until device is reboot (FB22349195)
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
6h
Enrollment Pending more than 2 days after ID upload and successful payment
Hello, I recently enrolled in the Apple Developer Program and successfully completed the payment. Afterward, I received an email requesting identity verification documents, which I have already uploaded. It has now been over the stated 2 business days, but my account status has not been updated. Furthermore, when I log into the Apple Developer portal, it still prompts me to Complete Enrollment and asks me to pay the fee again. Because of this, I am unsure if the Enrollment ID currently displayed on my account is the same one from when I originally completed the payment. For your reference to help investigate: Current Enrollment ID: P2N3MR4UDN Order Number: W1498763945 Note: My credit card statement already shows that the payment was charged successfully. Please kindly look into this for me and let me know if everything is on track. Thank you so much for your time and help.
Replies
0
Boosts
0
Views
69
Activity
7h
Apple Development Certificate Being Issued Under Wrong Team (Mismatch Between Team IDs)
I am experiencing an issue with Apple Development certificate creation in Xcode for my organization account. Account details: Organization: Jtecx LLC Team ID: 8V397ULNY4 Issue: When I attempt to create a new Apple Development certificate in Xcode under the Jtecx LLC (8V397ULNY4) team, the certificate is consistently generated under a different team: Apple Development: Joseph Salmond (67P4AAZ5TA) This appears to be my personal team, not the organization team. Impact: Because of this mismatch: Provisioning profiles created under 8V397ULNY4 cannot find a matching signing certificate Xcode shows “Signing Certificate: None” Xcode reports that the provisioning profile does not include the signing certificate I am unable to run or test the app on physical devices due to signing failures Troubleshooting performed: Deleted all Apple Development certificates from Keychain Access Revoked existing Apple Development certificates in the Apple Developer Portal Created a new Certificate Signing Request (CSR
Replies
0
Boosts
0
Views
63
Activity
8h
Can Xcode Cloud produce a notarized .pkg for a macOS daemon?
I have a macOS app (a background daemon) that I distribute outside the App Store as a .pkg installer. My build process is: Build the app (xcodebuild archive) Sign the app with Developer ID Application Package it with pkgbuild, signed with Developer ID Installer Notarize with notarytool Staple with stapler This works perfectly on my local machine using custom build_pkg.sh. I'm trying to automate this in Xcode Cloud using a ci_post_xcodebuild.sh script so a new build is triggered whenever I push to git repository. The problem is: • security find-identity shows 0 valid identities in the post-build script environment • The archived app has Signature=adhoc (no Developer ID signing) • pkgbuild can't sign the .pkg without a Developer ID Installer certificate • Notarization rejects everything because nothing is signed with Developer ID My question: Is there any way to make Developer ID certificates available in Xcode Cloud's post-build scripts? Or is Xcode Cloud only designed for App Store distribution, and
Replies
0
Boosts
0
Views
87
Activity
8h
Reply to The APNs delay to send notification on iOS 26.4
But recently, I found some disordered VoIP notifications. My VoIP app received the StopRing push before the StartRing push. Do you know what was happening on the device? It's possible there is a push level issue involved here, but I can also see why this could happen under very normal conditions. Notice the odd discrepancy in timing: Then we can see the StartRing send first, but received in the app after the StopRing. The StartRing took about 6s to send and the StopRing took about 1s. The pushes were sent 5s apart. // receive StopRing 2026-04-0909:54:48.858 // receive StartRing 2026-04-0909:54:49.524 ...but were delivered ~2/3 of a second from each other. You are actually thinking about the question here the wrong way— the question isn't just why did stop arrive before start, it's how did they end up arriving so close to each other. I suspect what started this is that the device was actually offline at the point the original push was sent, then came back online shortly after the stop push was queued. So, the
Replies
Boosts
Views
Activity
10h
Run iOS simulator, mediaanalysisd hogs my CPU
Any idea why this might happen and how to stop it? I try to run a simple iOS app from Xcode, in the iOS Simulator, and it takes a very long time to start. I see mediaanalysisd in the Activity Monitor, taking a lot of CPU, fans are blowing. When I quit the simulator, the mediaanalysisd process goes away and the fans stop. Maybe related: I have a 2020 MacBook Pro with Intel chips, and general it's been having more bogged down performance and fans blowing that in years past. My suspicion is the latest macOS updates are not caring much about Intel CPUs...
Replies
0
Boosts
0
Views
92
Activity
10h
Crash while running NSAlert.runModal
My application overrides AppDelegate.menuWillOpen(). During startup of the application (in AppDelegate.applicationDidFinishLaunching) I attempt to install a privileged helper tool using SMAppService. On detecting that the tool needs to be allowed/installed I open the Login Items & Extensions settings and then display a modal dialog, advising the user to authorise the privileged helper. Then the application crashes with a message in the crash file Application Specific Information: BUG IN CLIENT OF LIBDISPATCH: trying to lock recursively Maybe I could avoid this by removing the menuWillOpen() override so am looking for a workaround. i.e. is it possible to install the override function programmatically later during initialisation, rather then declaring it in an extension. I have attached the crash log. ChronyControl-2026-04-29-111332.crash
Replies
2
Boosts
0
Views
47
Activity
10h
Reply to Access to process unique id
Thanks for the post, this is a great post and hope many developers jump into this thread and provide suggestions and opinions of the best way to accomplish that. proc_pidinfo() PROC_PIDUNIQIDENTIFIERINFO looks something I haven't use to be honest. Using them in production code sounds risky because is subject to breakage in future macOS/iOS updates without warning? If your concern about PID reuse races you should not use PIDs at all. If you are iterating over running processes or monitoring a specific process and want to ensure the PID hasn't been reused by a new process, the standard approach is to combine the PID with the process's start time, it is practically impossible for a PID to be reused in the exact same microsecond. Albert
  Worldwide Developer Relations.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
15h
Is App Store Connect Subscriptions Down for anyone else?
I'm trying to create two new subscriptions for my app and I get a loader for quite awhile when I click on a subscription I'm trying to edit to add pricing info, introductory offer, etc. Once the subscription page finally loads, the Supscription Prices section shows this error: An error has occurred. Try again later. It's showing 500's in the console logs too: /iris/v1/subscriptions/6764495098/prices?include=territory,subscriptionPricePoint&limit=500:1 Failed to load resource: the server responded with a status of 500 () I've tried clearing browser cache, restarting my browser/computer and trying other browsers..nothings working.
Replies
1
Boosts
0
Views
25
Activity
15h
Reply to Xcode 26.4: IBOutlets/IBActions gutter circles missing — cannot connect storyboard to code (works in 26.3)
Thanks for providing this, so you said the is the work around of dragging from the outlets inspector now does not work pm 26.4? Do you have a bug number showing that? Thanks Albert
  Worldwide Developer Relations.
Replies
Boosts
Views
Activity
15h
MPS backend reports ~40 GiB 'other allocations' on 48 GB M5 Pro under macOS 26.4.1, blocking large tensor operations (PyTorch)
Product macOS Version macOS 26.4.1 (public release) Hardware Apple M5 Pro, 48 GB unified memory Summary On macOS 26.4.1, the MPS backend consistently reports approximately 40 GiB of “other allocations” on a 48 GB M5 Pro machine, even on a freshly rebooted system with minimal user applications running. This leaves insufficient memory for large GPU tensor operations that previously succeeded on earlier macOS versions. The failure manifests as: RuntimeError: MPS backend out of memory (MPS allocated: 17.60 GiB, other allocations: 40.17 GiB, max allowed: 63.65 GiB). Tried to allocate 7.63 GiB on private pool. The “other allocations: 40.17 GiB” value is consistent across reboots and does not change materially when user applications are quit. This suggests macOS 26.4.1 has increased its baseline GPU/unified memory consumption compared to prior releases in a way that is visible to the MPS allocator. Steps to Reproduce Fresh reboot of M5 Pro, 48 GB, macOS 26.4.1 Launch a PyTorch 2.11.0 application using MPS a
Replies
1
Boosts
0
Views
130
Activity
16h