Coder Social home page Coder Social logo

mastodon / mastodon-ios Goto Github PK

View Code? Open in Web Editor NEW
2.0K 2.0K 254.0 47.34 MB

Official iOS app for Mastodon

Home Page: https://app.joinmastodon.org/ios

License: GNU General Public License v3.0

Swift 99.78% Ruby 0.08% Objective-C 0.04% Shell 0.07% C 0.01% JavaScript 0.02%
ios mastodon

mastodon-ios's Introduction

Mastodon

GitHub release Ruby Testing Crowdin

Mastodon is a free, open-source social network server based on ActivityPub where users can follow friends and discover new ones. On Mastodon, users can publish anything they want: links, pictures, text, and video. All Mastodon servers are interoperable as a federated network (users on one server can seamlessly communicate with users from another one, including non-Mastodon software that implements ActivityPub!)

Click below to learn more in a video:

Screenshot

Navigation

Features

No vendor lock-in: Fully interoperable with any conforming platform

It doesn't have to be Mastodon; whatever implements ActivityPub is part of the social network! Learn more

Real-time, chronological timeline updates

Updates of people you're following appear in real-time in the UI via WebSockets. There's a firehose view as well!

Media attachments like images and short videos

Upload and view images and WebM/MP4 videos attached to the updates. Videos with no audio track are treated like GIFs; normal videos loop continuously!

Safety and moderation tools

Mastodon includes private posts, locked accounts, phrase filtering, muting, blocking, and all sorts of other features, along with a reporting and moderation system. Learn more

OAuth2 and a straightforward REST API

Mastodon acts as an OAuth2 provider, so 3rd party apps can use the REST and Streaming APIs. This results in a rich app ecosystem with a lot of choices!

Deployment

Tech stack

  • Ruby on Rails powers the REST API and other web pages
  • React.js and Redux are used for the dynamic parts of the interface
  • Node.js powers the streaming API

Requirements

  • PostgreSQL 12+
  • Redis 4+
  • Ruby 3.1+
  • Node.js 18+

The repository includes deployment configurations for Docker and docker-compose as well as specific platforms like Heroku, and Scalingo. For Helm charts, reference the mastodon/chart repository. The standalone installation guide is available in the documentation.

Development

Vagrant

A Vagrant configuration is included for development purposes. To use it, complete the following steps:

  • Install Vagrant and Virtualbox
  • Install the vagrant-hostsupdater plugin: vagrant plugin install vagrant-hostsupdater
  • Run vagrant up
  • Run vagrant ssh -c "cd /vagrant && bin/dev"
  • Open http://mastodon.local in your browser

macOS

To set up macOS for native development, complete the following steps:

  • Install Homebrew and run brew install postgresql@14 redis imagemagick libidn nvm to install the required project dependencies
  • Use a Ruby version manager to activate the ruby in .ruby-version and run nvm use to activate the node version from .nvmrc
  • Run the bin/setup script, which will install the required ruby gems and node packages and prepare the database for local development
  • Finally, run the bin/dev script which will launch services via overmind (if installed) or foreman

Docker

For production hosting and deployment with Docker, use the Dockerfile and docker-compose.yml in the project root directory.

For local development, install and launch Docker, and run:

docker compose -f .devcontainer/compose.yaml up -d
docker compose -f .devcontainer/compose.yaml exec app bin/setup
docker compose -f .devcontainer/compose.yaml exec app bin/dev

Dev Containers

Within IDEs that support the Development Containers specification, start the "Mastodon on local machine" container from the editor. The necessary docker compose commands to build and setup the container should run automatically. For Visual Studio Code this requires installing the Dev Container extension.

GitHub Codespaces

GitHub Codespaces provides a web-based version of VS Code and a cloud hosted development environment configured with the software needed for this project.

Open in GitHub Codespaces

  • Click the button to create a new codespace, and confirm the options
  • Wait for the environment to build (takes a few minutes)
  • When the editor is ready, run bin/dev in the terminal
  • Wait for an Open in Browser prompt. This will open Mastodon
  • On the Ports tab "stream" setting change Port visibility โ†’ Public

Contributing

Mastodon is free, open-source software licensed under AGPLv3.

You can open issues for bugs you've found or features you think are missing. You can also submit pull requests to this repository or submit translations using Crowdin. To get started, take a look at CONTRIBUTING.md. If your contributions are accepted into Mastodon, you can request to be paid through our OpenCollective.

IRC channel: #mastodon on irc.libera.chat

License

Copyright (C) 2016-2024 Eugen Rochko & other Mastodon contributors (see AUTHORS.md)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

mastodon-ios's People

Contributors

5sw avatar ataridreams avatar bracciata avatar cdoncarroll avatar cythb avatar gargron avatar hirossan4049 avatar ivannnito avatar j-f1 avatar jinsu35 avatar jk234ert avatar jordanekay avatar jvacek avatar jverkoey avatar kimar avatar kylebshr avatar mainasuk avatar marysaka avatar mattrobmattrob avatar nanosector avatar nossipova avatar painhapp avatar pietropizzi avatar reactiveraven avatar rizwankce avatar snxiaojian avatar tejuamirthi avatar treeshateorcs avatar woxtu avatar zeitschlag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mastodon-ios's Issues

Add toot's video/GIF support

Add inline video and GIF player for the toot.

Prefer to use the UIKit AVPlayerViewController without any custom to make the feature landing soon.

Add image preview supports

The preview scene needs full-screen displaying for the image when the user taps the image. And the context menu needs pop up when the user long-press the image.

The transitioning for preview scene present and dismiss following the Photo.app transition style if no UX required. And long press when previewing needs prompt a menu for "share" and "save" image.

[Task] Profile scene

  • profile display
    • name
    • username
    • lock icon
    • avatar image
    • header image
    • fields
    • bio
    • number for status
    • number for following
    • number for follower
  • edit profile
  • friendship display / actions
    • follow
    • following
    • blocking
    • blocked
    • muted
  • menu / actions
    • mute
    • block
    • report
    • block domain
    • share
    • reply
  • timeline
    • posts
    • replies
    • media

Aysnc loading needs for deeplink via URL.

Update timeline appearance

The timeline gap has top and bottom tooth saw now. And the cell internal spacing is set to 20pt (top 10pt bottom 10pt). Needs update to follow UI design.

Set user avatar and display name when user sign up

When the user following the sign-up flow. The avatar and display name needs to update correctly just when the user enters the home scene after confirming the email. Otherwise, discard the request.

@sxiaojian88 We do not implement related API now. So just make the UX works. I'll fulfill the user info update logic later.

Note:
Please check the new iOS Photo Library permission. We use the read-only grant with the latest API. So the user could directly select the photo without permission request.

Please check the TOCropViewController to make the user could crop the photo into the square shape avatar. Also, iPad test needs for TOCropViewController. There is an issue to present the modal on the iPad. Workaround needs to patch.

Compose content view overlap with keyboard when inputting lots of text

The compose scene sets the bottom inset when the keyboard displays. The inset looks different on the iPhone X and the old iPhone. And content still overlaps when the bottom inset set. The poll duration button can not select if input too many texts.

  1. Input lots of text
  2. Create a poll
  3. Can adjust poll duration due to overlap

Expect:
The keyboard does not overlap the content.

Add context menu for avatar select for sign up page

The context menu should appear when tapping the avatar button.

  • Photo Library
  • Take Photo or Video (Precondition the device has camera capability. Ask permission when choosing this option)
  • Browse (System file manager for image type media)
  • Remove (Display when avatar set)

Update status timestamp update behavior

The timestamp updates every second now.
1s -> 60s then 1m -> 60m and 1hโ€ฆ

Prefer to display "Now" if in the 60s to avoid a countdown timer. Also, i18n needs.

[BUG] more robust pick server scene

  • Handle HTML server description
  1. User input the custom server domain. e.g. "mastodon.social"
  2. App displays server description with HTML tags.

Expect:
The description may in HTML format. Needs to filter out the tags.

  • User count label
  1. User input the custom server domain
  2. Tap "See More"
  3. App always display server users count with 0

Expect:
The instance API returns accounts count. So just update the UI.

  • Crash when bad/without network
  1. User input the custom server domain (with the cellular network)
  2. Server slow response or no response
  3. App crash
    testflight_feedback.zip

Expect:
without crash issue. More robust data source design needs.

Display in reply to meta for timeline toot

The reblog header is now displayed for the reblogged toot. We use the same header display in-reply-to meta.

The toot contains an in-reply-to mastodon user ID only without the user object. So async API request for that user is required. Also, hide the header and keep the header height before fetched the user meta.

Update content warning UI and trigger logic

Currently, the content warning for spoiler text and media are separated. The new UX needs to group the behavior for both. And the content warning reveals state needs to take effect across all pages and persist until the next launching.

Update user profile avatar and display name when sign up success

We implement avatar and display name input for the user in #31. According to the doc. The avatar could upload as multipart/form-data without media attachment API.

  1. User sign up success
  2. User confirm register in the email
  3. App confirm the user token valid
  4. App present home scene
  5. App update profile in the background. And retry 3 times if failed

[Task] Compose scene

Toot

  • New Toot
  • New Reply

Meta

  • image attachment
  • image description
  • video #142
  • Poll (single)
  • Poll (multiple)
  • Emojis
  • spoilter text
  • visibility
  • input character counter

Auto-complete #137

  • Hashtag
  • Mention
  • Emojis

Highlight

  • URL
  • Hashtag
  • Mention

May be later

  • Draft

UITableView failed to layout after app resume from background

This is an AutoLayout issue for UI components.

  1. Enter Home to make the App enter background
  2. Resume the App and enter the foreground
  3. The table view layout with the wrong frame

Expect:
The table view should keep the correct layout after resuming.

[Task] Thread scene

Display thread posts.

  • Show thread when tapping post
  • Deep-link support for same domain post via URL
  • Clipped replies tree with "Show more" logic

Add user favorite scene

The favorite scene displays favorited statuses for "Me". The timeline always fetches the latest statuses from API. No needs to store the index in the DB.

  1. User enter favorites scene
  2. App displays favorited statuses (displays "No Status Found" when no favorited statuses)

Add indicator for navigation bar to prompt timeline status

Custom rounded rectangle button when timeline status changed. And handle the button when the user tapping.

  • See new toots (Display when timeline auto-refresh bring new toots)
  • Offline (Display when server request failed due to network error)

[Task] Home scene

Media:

  • text-only
  • image
  • video #41
  • GIF #41
  • audio #42
  • Poll

Content Warning:

  • spoilter text
  • reblog header
  • in reply to header #44

Toot Content

  • mention redirect
  • hashtag redirect
  • shorten link
  • normal link redirect
  • status link redirect #140
  • custom emojis

Toot action

  • reply
  • reblog #43
  • favorite
  • menu: share link
  • menu: copy link
  • menu: copy text
  • menu: delete

Handle keyboard return button for the form

The onboarding register scene needs handle keyboard "return" to make focus moving to next input filed. And make return key "Done" at the last input field to dismiss keyboard.

[Task] Search scene

Recommend

  • Hashtags
  • Accounts

Search

  • Search history
  • Search result

The search result scene fetching grouped results from the "People" and "Hashtags". The view controller and view model needs implemented as child view controller. Make application could directly set search text without search bar UI.

Add toot's poll UI support

The poll needs to display if the toot has one poll. The poll initiate by the user self could not vote. The User only could vote for others' poll.

There are several states for the poll. Make more detail explain when implement.

The home timeline does not fetch latest data after sign in.

The home timeline needs trigger timeline loading after the user login in when the timeline is empty. The same logic is implemented in the Hashtag scene. So just make that feature works for the home scene. The difference is the home scene inits without authentication info.

Also, the auto-refresh logic with a timer or scrolling bahvior needs to be considered.

Add poll supports for compose scene

Allow the user to create a poll with 2~4 options for the post.

Only one of the media and poll exist at the same time. The poll options need reorderable. The keyboard return or taps create poll button to make a new poll option. The delete backward makes the poll option remove and makes the other poll option active.

Onboarding scene

Display Onboarding(a.k.a Splash) page when the app first launches.

  • Server API
  • Welcom UI
  • Server List UI & UX
  • Sign up form UI & UX
  • Sign up email confirm UI & UX
  • Sign in form UI & UX

Search recommend scene i18n issue

The description placeholder for the account section needs to updated to meaningful string. The Zeplin UI string is not actually strings should place here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.