ios: review fixes for wrong QR code recognition

Follow-up to "Recognise wrong QR code type in every scanner", from an iOS
review of that commit.

- ScanProtocolServer: a rejected scan now alerts in place instead of
  dismissing, but the sheet had no way out - move its title into the nav bar
  and add a Cancel button. Fixes the preview, which needs AppTheme now that
  the themed background is applied inside the view.
- MigrateToDevice: classify the pasted link off the main thread, as the
  Kotlin paste path already does - pasted text is unbounded and classifying
  a file link parses its YAML description. Guard the result, as the sheet can
  be dismissed while classifying.
- Relay message named the Chat relay screen but not that the address is only
  kept once the relay is tested, so following it lost the pasted address to
  an "Invalid relay name!" alert. The migration message named a label that
  only exists on desktop.
- ContentView: the /r deep link showed the relay alert without the guidance
  added to the other call site; both literals were identical before.
- Document WrongQRCode.swift per apps/ios/CODE.md, and refresh the specs and
  product docs that quote the changed messages.
This commit is contained in:
Narasimha-sc
2026-09-02 19:06:00 +00:00
parent 992f7f9781
commit f48377a3fa
14 changed files with 60 additions and 51 deletions
@@ -820,10 +820,10 @@
<string name="wrong_link">Wrong link</string>
<string name="wrong_qr_connection_link">This is a %s. To use it, open New chat, then scan or paste it there.</string>
<string name="wrong_qr_server_address">This is a SimpleX server address. To use it, open Network &amp; servers, Your servers, Add server, then Scan server QR code.</string>
<string name="wrong_qr_migration_link">This is a link to migrate to another device. To use it, when setting up a new device, choose to migrate from another device.</string>
<string name="wrong_qr_migration_link">This is a link to migrate to another device. To use it, choose Migrate when setting up a new device.</string>
<string name="wrong_qr_desktop_address">This is an address to connect to a desktop app. To use it, open Use from desktop and scan the QR code shown in the desktop app.</string>
<string name="wrong_qr_security_code">This is a security code. To use it, open the chat, then the contact\'s or member\'s name, then Verify security code.</string>
<string name="wrong_qr_relay_address">This is a %s. To use it, open Network &amp; servers, Your servers, Add server, then Chat relay, and paste the address there.</string>
<string name="wrong_qr_relay_address">This is a %s. To use it, open Network &amp; servers, Your servers, Add server, then Chat relay, paste the address, then Test relay.</string>
<!-- GetImageView -->
<string name="toast_permission_denied">Permission Denied!</string>
@@ -3191,7 +3191,7 @@
<!-- ConnectPlan.kt channel-related -->
<string name="relay_address_alert_title">Relay address</string>
<string name="relay_address_alert_message">This is a chat relay address, it cannot be used to connect. To use it, open Network &amp; servers, Your servers, Add server, then Chat relay, and paste the address there.</string>
<string name="relay_address_alert_message">This is a chat relay address, it cannot be used to connect. To use it, open Network &amp; servers, Your servers, Add server, then Chat relay, paste the address, then Test relay.</string>
<string name="connect_plan_open_channel">Open channel</string>
<string name="connect_plan_open_new_channel">Open new channel</string>
<string name="connect_plan_you_are_subscriber">You are a subscriber</string>