Skip to content

Add SFTP web publishing for iOS#1908

Draft
hackmajoris wants to merge 3 commits intoglushchenko:masterfrom
hackmajoris:feat/ios-sftp-server-configs
Draft

Add SFTP web publishing for iOS#1908
hackmajoris wants to merge 3 commits intoglushchenko:masterfrom
hackmajoris:feat/ios-sftp-server-configs

Conversation

@hackmajoris
Copy link

@hackmajoris hackmajoris commented Mar 15, 2026

Introduce SFTP Web Publishing Support for iOS

This PR ports the macOS SFTP web publishing feature to iOS, enabling users to publish and manage notes on a custom server directly from the iOS app.


What's Changed

SFTPUploader

  • New class built on top of Shout for SSH/SFTP connectivity
  • Supports uploading and removing notes from a remote server
  • Key-based authentication via temporary key files (written to the app's temp directory and cleaned up after use)
  • Descriptive error wrapping for actionable failure messages

SFTPViewController

  • New settings screen for configuring the SFTP connection
  • Fields: host, port, remote path, web URL, username, password, passphrase
  • Import and delete private/public key files
  • Test Connection button to validate credentials before use
  • Toggle to enable/disable the custom SFTP server

Persistence & Integration

  • Public key data persisted via UserDefaultsManagement
  • SFTP settings wired into SettingsViewController
  • NotesTableView Create/Update/Delete web actions now invoke SFTPUploader when the custom server toggle is enabled

Localization

  • Added localization keys and placeholder strings for all new UI elements

Project

  • Updated project.pbxproj to include new source files
  • Added required entitlements and project settings for outgoing network connections

Testing

  • Test connection with password auth
  • Test connection with key-based auth (RSA / Ed25519)
  • Upload a note and verify it appears at the configured web URL
  • Delete a note and verify removal from the server
  • Verify keys are not persisted to disk after session ends
  • Verify graceful error messages on bad credentials / unreachable host
  • Test on both iPhone and iPad
  • Localization strings

Notes

  • Still figuring out why is required to select both: Private Key and Public Key(in original macOS implementation)
  • Private keys are written to a temporary file only for the duration of the SFTP session and are deleted immediately after
  • The SFTP toggle in settings mirrors the existing macOS behaviour — when disabled, the app falls back to the default sharing path
  • If required, I can provide a test SFTP server.

Result

ScreenRecording_03-15-2026.22-37-45_1.mp4

Introduce SFTP web publishing support for iOS: add SFTPUploader (uses Shout) to upload/remove notes, including key-based auth via temporary key files and descriptive error wrapping. Add SFTPViewController for settings/UI (host, port, path, web URL, username/password, import/delete private/public keys, passphrase, test connection and toggle). Persist public key data in UserDefaultsManagement and integrate SFTP options into SettingsViewController and NotesTableView (Create/Update/Delete web actions use SFTPUploader when custom server is enabled). Add localization keys/placeholders and update project.pbxproj to include new sources and related entitlements/project settings.
@hackmajoris hackmajoris marked this pull request as draft March 15, 2026 21:04
@hackmajoris
Copy link
Author

@glushchenko let me know if you have an early feedback regarding the changes

@glushchenko
Copy link
Owner

Good work 👏. I'll try to test it as soon as possible.

@glushchenko
Copy link
Owner

glushchenko commented Mar 17, 2026

I used a private and public key with a passphrase and successfully uploaded a note with and without an image to the local server 👍

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