Description:
- When initiating the print flow via UIPrintInteractionController, and no printer is initially connected, iOS displays all possible paper sizes in the paper selection UI. However, if a printer connects in the background after this view is shown, the list of paper sizes does not automatically refresh to reflect only the options supported by the connected printer.
- If the user selects an incompatible paper size (one not supported by the printer that has just connected), the app crashes due to an invalid configuration.
Steps to Reproduce:
- Launch the app and navigate to the print functionality.
- Tap the Print button to invoke UIPrintInteractionController.
- At this point, no printer is yet connected. iOS displays all available paper sizes.
- While the paper selection UI is visible, the AirPrint-compatible printer connects in the background.
- Without dismissing the controller, the user selects a paper size (e.g., one that is not supported by the printer).
- The app crashes.
Expected Result: App should not crash
- Once the printer becomes available (connected in the background), the paper size options should refresh automatically.
- The list should be filtered to only include sizes that are compatible with the connected printer.
- This prevents the user from selecting an invalid option, avoiding crashes.
Actual Result: App crashes
- The paper size list remains unfiltered.
- The user can still select unsupported paper sizes.
- Selecting an incompatible option causes the app to crash, due to a mismatch between UI selection and printer capability.