Skip to content

Resolve iOS pubky parity issues from #902#527

Open
ben-kaufman wants to merge 10 commits intomasterfrom
codex-pubky-session-backup-restore
Open

Resolve iOS pubky parity issues from #902#527
ben-kaufman wants to merge 10 commits intomasterfrom
codex-pubky-session-backup-restore

Conversation

@ben-kaufman
Copy link
Copy Markdown
Contributor

@ben-kaufman ben-kaufman commented Apr 22, 2026

Summary

This resolves the iOS side of the pubky profile and contacts follow-up work tracked in bitkit-android#902.

What Changed

  • Restored pubky session recovery from wallet backups
  • Improved pubky profile and contacts flows on iOS
  • Updated profile/contact edit screens and related copy
  • Improved add-contact validation and pubky key handling
  • Added smarter pubky clipboard and scanner routing
  • Refined delete/disconnect handling for pubky profile flows

Notes

  • Seed-based pubky identities reconnect from the wallet seed after restore
  • External pubky sessions restore from encrypted backup metadata
  • Valid pasted or scanned pubky keys now route to Profile, Contact Detail, or Add Contact before payment parsing
  • Env.swift is intentionally not included in this PR

Validation

  • Focused local validation was run during implementation for pubky session restore, contact/profile flows, and pubky routing

Comment thread CHANGELOG.md Outdated
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
@claude

This comment has been minimized.

@ben-kaufman ben-kaufman changed the title Add pubky session backup and restore Resolve iOS pubky parity issues from #902 Apr 22, 2026
Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings Outdated
Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings Outdated
Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings Outdated
@piotr-iohk
Copy link
Copy Markdown
Collaborator

I encountered this error with pubky-ring. It seems that the problem is with the old pubkys that are in the pubky-ring. When you create/import the pubky in pubky-ring while bitkit is installed, then it works. But when you reinstall bitkit and try the same pubky - then it fails.
Scenario:

  • install bitkit and create a wallet
  • create pubky identity in ring
  • import pubky from pubky ring -> 👍
  • uninstall bitkit and install again
  • create new wallet
  • import pubky from pubky ring -> 👎
    bitkit_logs_2026-04-23_10-06-14.zip
Screen.Recording.2026-04-23.at.12.05.33.mov

@ben-kaufman
Copy link
Copy Markdown
Contributor Author

@piotr-iohk this looks like a Ring issue as the error is showing up there.

@ben-kaufman
Copy link
Copy Markdown
Contributor Author

Did you also uninstall/ did something in Pubky Ring? Or only removed Bitkit?

Comment thread Bitkit/Components/ProfileEditFormView.swift
Comment thread Bitkit/Models/BackupPayloads.swift Outdated
@piotr-iohk
Copy link
Copy Markdown
Collaborator

Did you also uninstall/ did something in Pubky Ring? Or only removed Bitkit?

Only removed Bitkit.

@ben-kaufman
Copy link
Copy Markdown
Contributor Author

Just tested the exact same flow @piotr-iohk but it works well for me.
I have seen the error from the video before, but it happened to me when I tried to migrate Pubky Ring from one device to another, unrelated to Bitkit. But the flow of just deleting and reinstalling Bitkit works normally for me without error. So considering that, and that the error appears in Ring and not Bitkit, I'm quite confident it's a Ring error and not in our code.

Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings Outdated
Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings Outdated
Comment thread Bitkit/Resources/Localization/en.lproj/Localizable.strings Outdated
@claude

This comment has been minimized.

piotr-iohk
piotr-iohk previously approved these changes Apr 24, 2026
Copy link
Copy Markdown
Collaborator

@piotr-iohk piotr-iohk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to merge.
🙌 fot the tests.

I added a comment synonymdev/bitkit-android#902 (comment) and some subtasks - but I guess they can be addressed separately.

@ben-kaufman ben-kaufman requested review from jvsena42 and pwltr April 24, 2026 13:00
@ben-kaufman ben-kaufman enabled auto-merge (squash) April 24, 2026 17:10
@piotr-iohk
Copy link
Copy Markdown
Collaborator

Actually would be good to make it consistent with Android after latest changes, since it got latest ContactsIntro with "Add Contact" button to action adding first contact (for the sake of e2e development)

Screenshot 2026-04-25 at 15 11 20

@piotr-iohk
Copy link
Copy Markdown
Collaborator

Similar to the note on android: synonymdev/bitkit-android#905 (comment)

  • no validation for duplicate contact addition
  • the validation behavior is not consistent with the Android's when adding via scan QR (self add, invalid pubky, duplicate contact). On Android we have the "Retry" screens, no such thing on iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants