diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..d76d4eaae --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +# Required + +# https:///relay-to/development +NotificationEndpointDebug="" + +# https:///relay-to/production +NotificationEndpointRelease="" diff --git a/.github/scripts/setup.sh b/.github/scripts/setup.sh index 845730f1f..a630e28cb 100755 --- a/.github/scripts/setup.sh +++ b/.github/scripts/setup.sh @@ -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 "" -bundle exec pod keys set notification_endpoint_debug "" +# Setup notification endpoint +bundle exec arkana bundle exec pod install diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a2f99d23e..e4a1876a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,9 @@ jobs: - 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 diff --git a/Documentation/Acknowledgments.md b/Documentation/Acknowledgments.md index ff6dbc081..154514f5f 100644 --- a/Documentation/Acknowledgments.md +++ b/Documentation/Acknowledgments.md @@ -1,8 +1,9 @@ # 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) @@ -26,10 +27,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) \ No newline at end of file +- [UITextView-Placeholder](https://github.com/devxoul/UITextView-Placeholder) diff --git a/Documentation/Setup.md b/Documentation/Setup.md index 1c2f0a6c5..545b7ac5a 100644 --- a/Documentation/Setup.md +++ b/Documentation/Setup.md @@ -12,7 +12,7 @@ Intell the latest version of Xcode from the App Store or Apple Developer Downloa 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 @@ -50,6 +50,12 @@ bundle install ```zsh # make a clean build bundle install + +# setup notification endpoint +# please check the `.env.example` to create your's or use the empty example directly +bundle exec arkana -e `` + +# clean pods bundle exec pod clean # make install @@ -64,9 +70,8 @@ The CocoaPods-Key plugin will request the push notification endpoint. You can fu 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. #### 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 Cocoapod-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 one endpoint: +- NotificationEndpoint: (e.g. https:///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.