1

I'm creating a watch app and I'm noticing that "Program ended with exit code: 0" is shown in the debug window if the watch app is deactivated (via cmd+shift+h, lower wrist, etc). The code I'm using to present alert in the WKInterfaceController is:

presentAlert(withTitle: alert.title, message: alert.message, preferredStyle: .alert, actions: [cancelAction, continueAction])  

I'm trying to understand why the watch app is closing with no error if a wkalert is visible and active on the screen. The memory of the app is under 20mb and doesn't spike at all when the alert is shown. On every other screen the app simply deactivates. Maybe there is a workaround? Any help would be appreciated.

Thanks - Ross

Ross Barbish
  • 680
  • 6
  • 22

1 Answers1

0

I reported this bug to Apple:

Summary: Displaying an Alert will crash App (code 0) if Alert is presented and home button is pressed while displaying a modal view.

Steps to Reproduce: Display a modal view on Apple Watch then display an Alert. Taping Home button or when screen goes blank the App will crash with Code 0. With attached file tap the Modal button then the PopUp button then on simulator press cmd-shift-H or on watch allow screen to go blank. App will crash with Code 0.

Expected Results: App should not crash. Displaying with Push segue style instead of Modal will not cause crash.

Actual Results: crash with Code 0

Version: iOS 3.0 and iOS 3.1

After reporting this bug to Apple they responded but I am unable to provide the log feedback they requested:

This is a follow-up regarding regarding Bug ID# 29131322.

Engineering has requested the following information in order to further investigate this issue:

Could we get a sysdiagnose from the Watch right after the crash?

Thank you.

Please provide your response or results by updating your bug report and compress any bundled files (e.g. nested folders) prior to uploading.

watchOS sysdiagnose Instructions: https://developer.apple.com/services-account/download?path=/iOS/watchOS_Logs/sysdiagnose_Logging_Instructions.pdf

watchOS Logging Profile: https://developer.apple.com/services-account/download?path=/iOS/watchOS_Logs/watchOS_logging.mobileconfig

If you could provide the log feedback and attach it to bug report 29131322 that might help get it fixed.

Greg Robertson
  • 2,317
  • 1
  • 16
  • 30