writefreely/writefreely-swiftui-multiplatform

[iOS] Add share button to post editor

Closed this issue · 2 comments

There should be a way to share a published post’s URL via the system share sheet on iOS and macOS.

To consider: in the iOS .compact size class (i.e., iPhone portrait orientation), there’s already limited toolbar space.

Thinking through this a bit more, the primary action button could be predicated on whether the post's status is published:

  • If published, set the primary action to a Share button (we have a URL we can share).
  • Otherwise, set the primary action to a Publish button (we have changes that can be pushed to the server).

However, I'm thinking this might be too rigid a policy in the edited state: the post has changes, but maybe they're not ready to be pushed to the server; however, the user may still want to get the URL of the (live) published post. In a .compact iOS size class, we can instead maybe show an Options button that presents a menu to either publish or share the post, whereas in other size classes (or on the Mac) we can have the publish and share buttons side-by-side.

Making this issue iOS-specific to unblock getting a first beta uploaded to TestFlight.