Skip to content

Commit

Permalink
Merge branch 'develop' into patch-1
Browse files Browse the repository at this point in the history
# Conflicts:
#	Documentation/Setup.md
  • Loading branch information
MainasuK committed Nov 2, 2022
2 parents e5bfed5 + d50b8b9 commit e8370fa
Show file tree
Hide file tree
Showing 539 changed files with 12,924 additions and 8,706 deletions.
17 changes: 17 additions & 0 deletions .arkana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import_name: 'ArkanaKeys'
namespace: 'Keys'
result_path: 'Dependencies'
flavors:
- AppStore
swift_declaration_strategy: let
should_generate_unit_tests: true
package_manager: spm
environments:
- Debug
- Release
global_secrets:
# nothing
environment_secrets:
# Will lookup for <Key>Debug and <Key>Release env vars (assuming no flavor was declared)
# Mastodon Push Notification Endpoint
- NotificationEndpoint
7 changes: 7 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Required

# https://<your-domain>/relay-to/development
NotificationEndpointDebug=""

# https://<your-domain>/relay-to/production
NotificationEndpointRelease=""
2 changes: 1 addition & 1 deletion .github/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ set -eo pipefail

xcodebuild -workspace Mastodon.xcworkspace \
-scheme Mastodon \
-destination "platform=iOS Simulator,name=iPhone SE (2nd generation)" \
-destination "platform=iOS Simulator,name=iPhone SE (2nd generation)" \
clean \
build | xcpretty
5 changes: 2 additions & 3 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ gem install bundler:2.3.11
# Install Ruby Gems
bundle install

# stub keys. DO NOT use in production
bundle exec pod keys set notification_endpoint "<endpoint>"
bundle exec pod keys set notification_endpoint_debug "<endpoint>"
# Setup notification endpoint
bundle exec arkana

bundle exec pod install
7 changes: 4 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ on:
jobs:
build:
name: CI build
runs-on: macos-11
runs-on: macos-12
steps:
- name: checkout
uses: actions/checkout@v2
- name: force Xcode 13.2.1
run: sudo xcode-select -switch /Applications/Xcode_13.2.1.app
- name: setup
env:
NotificationEndpointDebug: ${{ secrets.NotificationEndpointDebug }}
NotificationEndpointRelease: ${{ secrets.NotificationEndpointRelease }}
run: exec ./.github/scripts/setup.sh
- name: build
run: exec ./.github/scripts/build.sh
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,7 @@ xcuserdata

# Localization/StringsConvertor/input
Localization/StringsConvertor/output
.DS_Store
.DS_Store

env/**/**
!env/.env
18 changes: 0 additions & 18 deletions AppShared/AppShared.h

This file was deleted.

22 changes: 0 additions & 22 deletions AppShared/Info.plist

This file was deleted.

11 changes: 5 additions & 6 deletions Documentation/Acknowledgments.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Acknowledgments

- [Alamofire](https://github.com/Alamofire/Alamofire)
- [AlamofireImage](https://github.com/Alamofire/AlamofireImage)
- [AlamofireNetworkActivityIndicator](https://github.com/Alamofire/AlamofireNetworkActivityIndicator)
- [Alamofire](https://github.com/Alamofire/Alamofire)
- [Arkana](https://github.com/rogerluan/arkana)
- [CommonOSLog](https://github.com/mainasuk/CommonOSLog)
- [CryptoSwift](https://github.com/krzyzanowskim/CryptoSwift)
- [DateToolSwift](https://github.com/MatthewYork/DateTools)
- [DiffableDataSources](https://github.com/ra1028/DiffableDataSources)
- [DifferenceKit](https://github.com/ra1028/DifferenceKit)
- [FLAnimatedImage](https://github.com/Flipboard/FLAnimatedImage)
- [FLEX](https://github.com/FLEXTool/FLEX)
- [FPSIndicator](https://github.com/MainasuK/FPSIndicator)
Expand All @@ -26,10 +25,10 @@
- [SwiftGen](https://github.com/SwiftGen/SwiftGen)
- [SwiftUI-Introspect](https://github.com/siteline/SwiftUI-Introspect)
- [SwiftyJSON](https://github.com/SwiftyJSON/SwiftyJSON)
- [Tabman](https://github.com/uias/Tabman)
- [TabBarPager](https://github.com/TwidereProject/TabBarPager)
- [TwidereX-iOS](https://github.com/TwidereProject/TwidereX-iOS)
- [Tabman](https://github.com/uias/Tabman)
- [ThirdPartyMailer](https://github.com/vtourraine/ThirdPartyMailer)
- [TOCropViewController](https://github.com/TimOliver/TOCropViewController)
- [TwidereX-iOS](https://github.com/TwidereProject/TwidereX-iOS)
- [TwitterProfile](https://github.com/OfTheWolf/TwitterProfile)
- [UITextView-Placeholder](https://github.com/devxoul/UITextView-Placeholder)
- [UITextView-Placeholder](https://github.com/devxoul/UITextView-Placeholder)
19 changes: 13 additions & 6 deletions Documentation/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Install the latest version of Xcode from the App Store or Apple Developer Downlo
This guide may not suit your machine and actually setup procedure may change in the future. Please file the issue or Pull Request if there are any problems.

## CocoaPods
The app use [CocoaPods]() and [CocoaPods-Keys](https://github.com/orta/cocoapods-keys). Ruby Gems are managed through Bundler. The M1 Mac needs virtual ruby env to workaround compatibility issues.
The app use [CocoaPods]() and [Arkana](https://github.com/rogerluan/arkana). Ruby Gems are managed through Bundler. The M1 Mac needs virtual ruby env to workaround compatibility issues.

#### Intel Mac

Expand Down Expand Up @@ -52,21 +52,28 @@ bundle install
bundle install
bundle exec pod clean

# setup arkana
# please check the `.env.example` to create your's or use the empty example directly
bundle exec arkana -e ./env/.env

# clean pods
bundle exec pod clean

# make install
bundle exec pod install --repo-update

# open workspace
open Mastodon.xcworkspace
```

The CocoaPods-Keys plugin will request the push notification endpoint. You can fulfill the empty string and set it later. To setup the push notification. Please check section `Push Notification` below.
The Arkana plugin will setup the push notification endpoint. You can use the empty template from `./env/.env` or use your own `.env` file. To setup the push notification. Please check section `Push Notification` below.

The app requires the `App Group` capability. To make sure it works for your developer membership. Please check [AppSecret.swift](../AppShared/AppSecret.swift) file and set another unique `groupID` and update `App Group` settings.
The app requires the `App Group` capability. To make sure it works for your developer membership. Please check [AppSecret.swift](../MastodonSDK/Sources/MastodonCore/AppSecret.swift) file and set another unique `groupID` and update `App Group` settings.

#### Push Notification (Optional)
The app is compatible with [toot-relay](https://github.com/DagAgren/toot-relay) APNs. You can set your push notification endpoint via CocoaPods-Keys. There are two endpoints:
- notification_endpoint: for `RELEASE` usage
- notification_endpoint_debug: for `DEBUG` usage
The app is compatible with [toot-relay](https://github.com/DagAgren/toot-relay) APNs. You can set your push notification endpoint via Arkana. There are two endpoints:
- NotificationEndpointDebug: for `DEBUG` usage. e.g. `https://<your.domin>/relay-to/development`
- NotificationEndpointRelease: for `RELEASE` usage. e.g. `https://<your.domin>/relay-to/production`

Please check the [Establishing a Certificate-Based Connection to APNs
](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns) document to generate the certificate and exports the p12 file.
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
source "https://rubygems.org"

gem 'arkana'
gem "cocoapods"
gem "cocoapods-clean"
gem "cocoapods-keys"
gem "xcpretty"

44 changes: 23 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ GEM
specs:
CFPropertyList (3.0.5)
rexml
RubyInline (3.12.5)
ZenTest (~> 4.3)
ZenTest (4.12.1)
activesupport (6.1.5.1)
activesupport (6.1.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
arkana (1.2.0)
colorize (~> 0.8)
dotenv (~> 2.7)
yaml (~> 0.2)
atomos (0.1.3)
claide (1.1.0)
cocoapods (1.11.3)
Expand Down Expand Up @@ -50,9 +51,6 @@ GEM
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.6.3)
cocoapods-keys (2.2.1)
dotenv
osx_keychain
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
Expand All @@ -61,8 +59,9 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
colorize (0.8.1)
concurrent-ruby (1.1.10)
dotenv (2.7.6)
dotenv (2.8.1)
escape (0.0.4)
ethon (0.15.0)
ffi (>= 1.15.0)
Expand All @@ -71,39 +70,42 @@ GEM
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (1.10.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.6.1)
minitest (5.15.0)
json (2.6.2)
minitest (5.16.3)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
osx_keychain (1.0.2)
RubyInline (~> 3)
public_suffix (4.0.7)
rexml (3.2.5)
rouge (2.0.7)
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
xcodeproj (1.21.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.5.4)
xcpretty (0.3.0)
rouge (~> 2.0.7)
yaml (0.2.0)
zeitwerk (2.6.3)

PLATFORMS
ruby
arm64-darwin-21

DEPENDENCIES
arkana
cocoapods
cocoapods-clean
cocoapods-keys
xcpretty

BUNDLED WITH
2.3.11
2.3.17
Original file line number Diff line number Diff line change
Expand Up @@ -224,17 +224,17 @@
<key>NSStringFormatValueTypeKey</key>
<string>ld</string>
<key>zero</key>
<string>لا إعاد تدوين</string>
<string>لَا إعادَةُ تَدوين</string>
<key>one</key>
<string>إعادةُ تدوينٍ واحِدة</string>
<string>إعادَةُ تَدوينٍ واحِدَة</string>
<key>two</key>
<string>إعادتا تدوين</string>
<string>إعادَتَا تَدوين</string>
<key>few</key>
<string>%ld إعاداتِ تدوين</string>
<string>%ld إعادَاتِ تَدوين</string>
<key>many</key>
<string>%ld إعادةٍ للتدوين</string>
<string>%ld إعادَةٍ لِلتَّدوين</string>
<key>other</key>
<string>%ld إعادة تدوين</string>
<string>%ld إعادَة تَدوين</string>
</dict>
</dict>
<key>plural.count.reply</key>
Expand Down
10 changes: 5 additions & 5 deletions Localization/StringsConvertor/input/fr.lproj/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
"Publishing": "Publication en cours ...",
"accessibility": {
"logo_label": "Bouton logo",
"logo_hint": "Tap to scroll to top and tap again to previous location"
"logo_hint": "Appuyez pour faire défiler vers le haut et appuyez à nouveau vers l'emplacement précédent"
}
}
},
Expand Down Expand Up @@ -546,10 +546,10 @@
"show_mentions": "Afficher les mentions"
},
"follow_request": {
"accept": "Accept",
"accepted": "Accepted",
"reject": "reject",
"rejected": "Rejected"
"accept": "Accepter",
"accepted": "Accepté",
"reject": "rejeter",
"rejected": "Rejeté"
}
},
"thread": {
Expand Down
8 changes: 4 additions & 4 deletions Localization/StringsConvertor/input/kmr.lproj/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,10 @@
"show_mentions": "Qalkirinan nîşan bike"
},
"follow_request": {
"accept": "Accept",
"accepted": "Accepted",
"reject": "reject",
"rejected": "Rejected"
"accept": "Bipejirîne",
"accepted": "Pejirandî",
"reject": "nepejirîne",
"rejected": "Nepejirandî"
}
},
"thread": {
Expand Down
8 changes: 4 additions & 4 deletions Localization/StringsConvertor/input/th.lproj/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -546,10 +546,10 @@
"show_mentions": "แสดงการกล่าวถึง"
},
"follow_request": {
"accept": "Accept",
"accepted": "Accepted",
"reject": "reject",
"rejected": "Rejected"
"accept": "ยอมรับ",
"accepted": "ยอมรับแล้ว",
"reject": "ปฏิเสธ",
"rejected": "ปฏิเสธแล้ว"
}
},
"thread": {
Expand Down
Loading

0 comments on commit e8370fa

Please sign in to comment.