Skip to content

Commit

Permalink
Merge branch 'release-1.4.6' into feature/package-refactor
Browse files Browse the repository at this point in the history
# Conflicts:
#	.arkana.yml
#	AppShared/Info.plist
#	Documentation/Setup.md
#	Gemfile
#	Gemfile.lock
#	Mastodon.xcodeproj/project.pbxproj
#	Mastodon.xcodeproj/xcuserdata/mainasuk.xcuserdatad/xcschemes/xcschememanagement.plist
#	Mastodon.xcworkspace/xcshareddata/swiftpm/Package.resolved
#	MastodonSDK/Package.swift
#	MastodonSDK/Sources/MastodonCore/AppSecret.swift
#	MastodonSDK/Sources/MastodonCore/Service/Notification/NotificationService.swift
#	Podfile
#	Podfile.lock
  • Loading branch information
MainasuK committed Nov 1, 2022
2 parents fe59614 + c58f3a2 commit 060aec6
Show file tree
Hide file tree
Showing 32 changed files with 282 additions and 113 deletions.
1 change: 1 addition & 0 deletions .arkana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ 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
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
2 changes: 0 additions & 2 deletions Documentation/Acknowledgments.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
- [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 Down
14 changes: 8 additions & 6 deletions Documentation/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ bundle install
```zsh
# make a clean build
bundle install
bundle exec pod clean

# setup notification endpoint
# setup arkana
# please check the `.env.example` to create your's or use the empty example directly
bundle exec arkana -e `<your-dot-env-file-path>`
bundle exec arkana -e ./env/.env

# clean pods
bundle exec pod clean
Expand All @@ -65,13 +66,14 @@ bundle exec pod install --repo-update
open Mastodon.xcworkspace
```

The CocoaPods-Key plugin will request the push notification endpoint. You can fufill 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](../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 Arkana. There are one endpoint:
- NotificationEndpoint: (e.g. https://<your-domain>/relay-to/production)
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 All @@ -87,4 +89,4 @@ Please check and set the `notification.Topic` to the app BundleID in [toot-relay

## What's next

We welcome contributions! And if you have an interest to contribute codes. Here is a document that describes the app architecture and what's tech stack it uses.
We welcome contributions! And if you have an interest to contribute codes. Here is a document that describes the app architecture and what's tech stack it uses.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ source "https://rubygems.org"
gem 'arkana'
gem "cocoapods"
gem "cocoapods-clean"
gem "xcpretty"

24 changes: 14 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ GEM
specs:
CFPropertyList (3.0.5)
rexml
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)
Expand Down Expand Up @@ -70,38 +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)
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)
xcpretty (0.3.0)
rouge (~> 2.0.7)
yaml (0.2.0)
zeitwerk (2.5.4)
zeitwerk (2.6.3)

PLATFORMS
ruby
arm64-darwin-21

DEPENDENCIES
arkana
cocoapods
cocoapods-clean
xcpretty

BUNDLED WITH
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
62 changes: 46 additions & 16 deletions Mastodon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3866,7 +3866,7 @@
CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets";
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = Mastodon/Info.plist;
Expand Down Expand Up @@ -3896,7 +3896,7 @@
CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets";
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = Mastodon/Info.plist;
Expand Down Expand Up @@ -4069,7 +4069,7 @@
CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets";
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = Mastodon/Info.plist;
Expand Down Expand Up @@ -4136,7 +4136,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4159,7 +4159,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = ShareActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4183,7 +4183,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = MastodonIntent/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4207,7 +4207,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = MastodonIntent/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4231,7 +4231,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = MastodonIntent/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4255,7 +4255,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = ShareActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4279,7 +4279,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = ShareActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -4366,7 +4366,7 @@
CODE_SIGN_ENTITLEMENTS = Mastodon/Mastodon.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_ASSET_PATHS = "Mastodon/Resources/Preview\\ Assets.xcassets";
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = Mastodon/Info.plist;
Expand Down Expand Up @@ -4426,13 +4426,43 @@
};
name = "Release Snapshot";
};
DBEB19E527E4658E00B0E80E /* Release Snapshot */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3E08A432F40BA7B9CAA9DB68 /* Pods-AppShared.release snapshot.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 147;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 147;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = AppShared/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = org.joinmastodon.app.AppShared;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = "Release Snapshot";
};
DBEB19E627E4658E00B0E80E /* Release Snapshot */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4455,7 +4485,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = ShareActionExtension/ShareActionExtension.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = ShareActionExtension/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4479,7 +4509,7 @@
buildSettings = {
CODE_SIGN_ENTITLEMENTS = MastodonIntent/MastodonIntent.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = MastodonIntent/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4504,7 +4534,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -4528,7 +4558,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = NotificationService/NotificationService.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 144;
CURRENT_PROJECT_VERSION = 147;
DEVELOPMENT_TEAM = 5Z4GVSS33P;
INFOPLIST_FILE = NotificationService/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
Loading

0 comments on commit 060aec6

Please sign in to comment.