2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00
shannon bf2a1ce790 Remove Arkana
Was only used for setting push notification endpoints.
2025-03-31 10:39:51 -04:00

2.6 KiB

Setup

Requirements

  • Xcode 14+
  • Swift 5.7+
  • iOS 16.0+

Install the latest version of Xcode from the App Store or Apple Developer Download website. Also, we assert you have the Homebrew package manager.

This guide may not suit your machine and actually setup procedure may change in the future. Please file an issue or open a Pull Request if there are any problems.

Swiftgen and Sourcery

This app uses SwiftGen and Sourcery for Code Generation.

Note

Both tools are optional. Using the following command will install them system wide:

brew install swiftgen
brew install sourcery
# install the rbenv
brew install rbenv

# configure the terminal
which ruby
# > /usr/bin/ruby
echo 'eval "$(rbenv init -)"' >> ~/.zprofile
source ~/.zprofile
which ruby
# > /Users/mainasuk/.rbenv/shims/ruby

# restart the terminal

# install ruby (we use the version defined in .ruby-version)
rbenv install

# install gem dependencies
bundle install

Bootstrap


# open project
xed .

The app requires the App Group capability. To make sure it works for your developer membership. Please check AppSecret.swift file and set another unique groupID and update App Group settings.

Push Notification (Optional)

The app is compatible with toot-relay APNs. The push notification endpoint is set in AppSecret.swift.

Please check the Establishing a Certificate-Based Connection to APNs document to generate the certificate and exports the p12 file.

Note: Please check and set the notification.Topic to the app BundleID in toot-relay.go. The server needs use a reverse proxy to port this relay on 443 port with valid domain and HTTPS certificate.

Start

  1. Open Mastodon.xcodeproj
  2. Wait for the Swift Package Dependencies to be resolved.
  3. Check the signing settings make sure to choose a team. More info…
  4. Select Mastodon scheme and device then run it. (Command + R)

What's next

We welcome contributions! And if you have an interest to contribute code, here is a document that describes the app architecture and what tech stack it uses.