diff --git a/.github/workflows/release-alpha.yml b/.github/workflows/release-alpha.yml new file mode 100644 index 000000000..af74f4827 --- /dev/null +++ b/.github/workflows/release-alpha.yml @@ -0,0 +1,88 @@ +name: Build alpha release + +on: + + # Triggers the workflow on any pull request + pull_request: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + # Make the git branch for a PR available to our Fastfile + MX_GIT_BRANCH: ${{ github.event.pull_request.head.ref }} + +jobs: + build: + name: Release + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + + # Common cache + # Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job + - name: Cache CocoaPods libraries + uses: actions/cache@v2 + with: + path: Pods + key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }} + restore-keys: | + ${{ runner.os }}-pods- + + - name: Cache Ruby gems + uses: actions/cache@v2 + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + + # Make sure we use the latest version of MatrixKit + - name: Reset MatrixKit pod + run: rm -rf Pods/MatrixKit + + # Common setup + # Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job + - name: Bundle install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + + - name: Use right MatrixKit and MatrixSDK versions + run: bundle exec fastlane point_dependencies_to_related_branches + + # Import alpha release private signing certificate + - name: Import signing certificate + uses: apple-actions/import-codesign-certs@v1 + with: + p12-file-base64: ${{ secrets.ALPHA_CERTIFICATES_P12 }} + p12-password: ${{ secrets.ALPHA_CERTIFICATES_P12_PASSWORD }} + + # Main step + # The Ad-hoc release link will be referenced as 'DIAWI_FILE_LINK' + # and QR link as 'DIAWI_QR_CODE_LINK' when the Diawi upload succeed + - name: Build Ad-hoc release and send it to Diawi + run: bundle exec fastlane alpha + env: + # Automaticaly bypass 2FA upgrade if possible on Apple account. + SPACESHIP_SKIP_2FA_UPGRADE: true + APPLE_ID: ${{ secrets.FASTLANE_USER }} + FASTLANE_USER: ${{ secrets.FASTLANE_USER }} + FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }} + DIAWI_API_TOKEN: ${{ secrets.DIAWI_API_TOKEN }} + + - name: Add or update PR comment with Ad-hoc release informations + uses: NejcZdovc/comment-pr@v1 + with: + message: | + :iphone: Scan the QR code below to install the build for this PR. + :lock: This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha. + + ![QR code](${{ env.DIAWI_QR_CODE_LINK }}) + + If you can't scan the QR code you can install the build via this link: ${{ env.DIAWI_FILE_LINK }} + # Enables to identify and update existing Ad-hoc release message on new commit in the PR + identifier: "GITHUB_COMMENT_ADHOC_RELEASE" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGES.md b/CHANGES.md index e5ce49c60..1433d58ab 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +## Changes in 1.5.1 (2021-08-12) + +🐛 Bugfixes + +- People Tab: Fix crash when showing an invite. ([#4698](https://github.com/vector-im/element-ios/issues/4698)) + + ## Changes in 1.5.0 (2021-08-11) ✨ Features diff --git a/Config/AppIdentifiers.xcconfig b/Config/AppIdentifiers.xcconfig index 0c7cf37a4..e3cb5d48b 100644 --- a/Config/AppIdentifiers.xcconfig +++ b/Config/AppIdentifiers.xcconfig @@ -21,11 +21,6 @@ BASE_BUNDLE_IDENTIFIER = im.vector.app APPLICATION_GROUP_IDENTIFIER = group.im.vector APPLICATION_SCHEME = element -// Version -MARKETING_VERSION = 1.5.1 -CURRENT_PROJECT_VERSION = 1.5.1 - - // Team DEVELOPMENT_TEAM = 7J4U792NQT diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig new file mode 100644 index 000000000..d2e96e1ce --- /dev/null +++ b/Config/AppVersion.xcconfig @@ -0,0 +1,19 @@ +// +// Copyright 2021 Vector Creations Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Version +MARKETING_VERSION = 1.5.2 +CURRENT_PROJECT_VERSION = 1.5.2 diff --git a/DesignKit/Common.xcconfig b/DesignKit/Common.xcconfig index 40cf7124b..eb4b88c16 100644 --- a/DesignKit/Common.xcconfig +++ b/DesignKit/Common.xcconfig @@ -18,6 +18,7 @@ // https://help.apple.com/xcode/#/dev745c5c974 #include "Config/AppIdentifiers.xcconfig" +#include "Config/AppVersion.xcconfig" PRODUCT_NAME = DesignKit PRODUCT_BUNDLE_IDENTIFIER = $(BASE_BUNDLE_IDENTIFIER).designkit diff --git a/Gemfile.lock b/Gemfile.lock index 3548311ee..d1cdbdf51 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.2) + CFPropertyList (3.0.3) activesupport (5.2.4.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) @@ -12,22 +12,23 @@ GEM algoliasearch (1.27.5) httpclient (~> 2.8, >= 2.8.3) json (>= 1.5.1) + artifactory (3.0.15) atomos (0.1.3) - aws-eventstream (1.1.0) - aws-partitions (1.393.0) - aws-sdk-core (3.109.2) + aws-eventstream (1.1.1) + aws-partitions (1.487.0) + aws-sdk-core (3.119.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.39.0) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-kms (1.46.0) + aws-sdk-core (~> 3, >= 3.119.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.84.1) - aws-sdk-core (~> 3, >= 3.109.0) + aws-sdk-s3 (1.98.0) + aws-sdk-core (~> 3, >= 3.119.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.2) + aws-sigv4 (1.2.4) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) claide (1.0.3) @@ -70,38 +71,54 @@ GEM cocoapods-try (1.2.0) colored (1.2) colored2 (3.1.2) - commander-fastlane (4.4.6) - highline (~> 1.7.2) + commander (4.6.0) + highline (~> 2.0.0) concurrent-ruby (1.1.8) declarative (0.0.20) - declarative-option (0.1.0) - digest-crc (0.6.1) - rake (~> 13.0) + digest-crc (0.6.4) + rake (>= 12.0.0, < 14.0.0) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) dotenv (2.7.6) - emoji_regex (3.2.1) + emoji_regex (3.2.2) escape (0.0.4) ethon (0.12.0) ffi (>= 1.3.0) - excon (0.78.0) - faraday (1.1.0) + excon (0.85.0) + faraday (1.7.0) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0.1) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) multipart-post (>= 1.2, < 3) - ruby2_keywords + ruby2_keywords (>= 0.0.4) faraday-cookie_jar (0.0.7) faraday (>= 0.8.0) http-cookie (~> 1.0.0) - faraday_middleware (1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-net_http (1.0.1) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday_middleware (1.1.0) faraday (~> 1.0) - fastimage (2.2.0) - fastlane (2.167.0) + fastimage (2.2.5) + fastlane (2.191.0) CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.3, < 3.0.0) + addressable (>= 2.8, < 3.0.0) + artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) colored - commander-fastlane (>= 4.4.6, < 5.0.0) + commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) excon (>= 0.71.0, < 1.0.0) @@ -110,18 +127,19 @@ GEM faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) - google-api-client (>= 0.37.0, < 0.39.0) - google-cloud-storage (>= 1.15.0, < 2.0.0) - highline (>= 1.7.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) multipart-post (~> 2.0.0) + naturally (~> 2.2) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.3) simctl (~> 1.6.3) - slack-notifier (>= 2.0.0, < 3.0.0) terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (>= 1.4.5, < 2.0.0) tty-screen (>= 0.6.3, < 1.0.0) @@ -131,76 +149,98 @@ GEM xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) fastlane-plugin-brew (0.1.1) - fastlane-plugin-versioning (0.4.4) + fastlane-plugin-diawi (2.1.0) + rest-client (>= 2.0.0) + fastlane-plugin-versioning (0.5.0) fastlane-plugin-xcodegen (1.0.0) fastlane-plugin-brew (~> 0.1.1) ffi (1.13.1) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) - google-api-client (0.38.0) + google-apis-androidpublisher_v3 (0.10.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-core (0.4.1) addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.9) - httpclient (>= 2.8.1, < 3.0) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) mini_mime (~> 1.0) representable (~> 3.0) - retriable (>= 2.0, < 4.0) - signet (~> 0.12) - google-cloud-core (1.5.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-iamcredentials_v1 (0.6.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-playcustomapp_v1 (0.5.0) + google-apis-core (>= 0.4, < 2.a) + google-apis-storage_v1 (0.6.0) + google-apis-core (>= 0.4, < 2.a) + google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.4.0) + google-cloud-env (1.5.0) faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.0.1) - google-cloud-storage (1.29.1) + google-cloud-errors (1.1.0) + google-cloud-storage (1.34.1) addressable (~> 2.5) digest-crc (~> 0.4) - google-api-client (~> 0.33) - google-cloud-core (~> 1.2) - googleauth (~> 0.9) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.1) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (0.14.0) + googleauth (0.17.0) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (~> 0.14) - highline (1.7.10) - http-cookie (1.0.3) + highline (2.0.3) + http-accept (1.7.0) + http-cookie (1.0.4) domain_name (~> 0.5) httpclient (2.8.3) i18n (1.8.9) concurrent-ruby (~> 1.0) jmespath (1.4.0) - json (2.3.1) - jwt (2.2.2) + json (2.5.1) + jwt (2.2.3) memoist (0.16.2) + mime-types (3.3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2021.0704) mini_magick (4.11.0) - mini_mime (1.0.2) + mini_mime (1.1.0) minitest (5.14.4) molinillo (0.6.6) multi_json (1.15.0) multipart-post (2.0.0) nanaimo (0.3.0) nap (1.1.0) - naturally (2.2.0) + naturally (2.2.1) netrc (0.11.0) os (1.1.1) - plist (3.5.0) + plist (3.6.0) public_suffix (4.0.6) - rake (13.0.1) - representable (3.0.4) + rake (13.0.6) + representable (3.1.1) declarative (< 0.1.0) - declarative-option (< 0.2.0) + trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) + rest-client (2.1.0) + http-accept (>= 1.7.0, < 2.0) + http-cookie (>= 1.0.2, < 2.0) + mime-types (>= 1.16, < 4.0) + netrc (~> 0.8) retriable (3.1.2) + rexml (3.2.5) rouge (2.0.7) ruby-macho (1.4.0) - ruby2_keywords (0.0.2) - rubyzip (2.3.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) security (0.1.3) - signet (0.14.0) + signet (0.15.0) addressable (~> 2.3) faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) @@ -208,11 +248,11 @@ GEM simctl (1.6.8) CFPropertyList naturally - slack-notifier (2.3.2) terminal-notifier (2.0.0) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) + trailblazer-option (0.1.1) tty-cursor (0.7.1) tty-screen (0.8.1) tty-spinner (0.9.3) @@ -226,19 +266,21 @@ GEM unf_ext unf_ext (0.0.7.7) unicode-display_width (1.7.0) + webrick (1.7.0) word_wrap (1.0.0) xcode-install (2.6.7) claide (>= 0.9.1, < 1.1.0) fastlane (>= 2.1.0, < 3.0.0) - xcodeproj (1.19.0) + xcodeproj (1.21.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) - xcpretty-travis-formatter (1.0.0) + xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) PLATFORMS @@ -247,9 +289,10 @@ PLATFORMS DEPENDENCIES cocoapods (~> 1.10.1) fastlane + fastlane-plugin-diawi fastlane-plugin-versioning fastlane-plugin-xcodegen xcode-install BUNDLED WITH - 2.2.21 + 2.2.24 diff --git a/Riot/Common.xcconfig b/Riot/Common.xcconfig index 173727042..312fc83fe 100644 --- a/Riot/Common.xcconfig +++ b/Riot/Common.xcconfig @@ -18,6 +18,7 @@ // https://help.apple.com/xcode/#/dev745c5c974 #include "Config/AppIdentifiers.xcconfig" +#include "Config/AppVersion.xcconfig" PRODUCT_NAME = Riot PRODUCT_BUNDLE_IDENTIFIER = $(BASE_BUNDLE_IDENTIFIER) diff --git a/Riot/Managers/UserSessions/UserSessionsService.swift b/Riot/Managers/UserSessions/UserSessionsService.swift index 19d9b05fa..bf513d305 100644 --- a/Riot/Managers/UserSessions/UserSessionsService.swift +++ b/Riot/Managers/UserSessions/UserSessionsService.swift @@ -151,7 +151,7 @@ class UserSessionsService: NSObject { let isSessionStateValid: Bool switch mxSession.state { - case MXSessionStateClosed, MXSessionStateUnknownToken: + case .closed, .unknownToken: isSessionStateValid = false default: isSessionStateValid = true diff --git a/Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewModel.swift b/Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewModel.swift index 8db3b8c04..822436f6b 100644 --- a/Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewModel.swift +++ b/Riot/Modules/KeyVerification/Device/SelfVerifyWait/KeyVerificationSelfVerifyWaitViewModel.swift @@ -90,7 +90,7 @@ final class KeyVerificationSelfVerifyWaitViewModel: KeyVerificationSelfVerifyWai continueLoadData() } else { // be sure that session has completed its first sync - if session.state >= MXSessionStateRunning { + if session.state >= .running { // Always send request instead of waiting for an incoming one as per recent EW changes MXLog.debug("[KeyVerificationSelfVerifyWaitViewModel] loadData: Send a verification request to all devices instead of waiting") @@ -117,7 +117,7 @@ final class KeyVerificationSelfVerifyWaitViewModel: KeyVerificationSelfVerifyWai @objc private func sessionStateChanged() { - if session.state >= MXSessionStateRunning { + if session.state >= .running { NotificationCenter.default.removeObserver(self, name: .mxSessionStateDidChange, object: session) continueLoadData() } diff --git a/Riot/Modules/People/Views/InviteRecentTableViewCell.xib b/Riot/Modules/People/Views/InviteRecentTableViewCell.xib index f1ecf7116..45a40d9e0 100644 --- a/Riot/Modules/People/Views/InviteRecentTableViewCell.xib +++ b/Riot/Modules/People/Views/InviteRecentTableViewCell.xib @@ -1,9 +1,9 @@ - + - + @@ -25,10 +25,6 @@ -