Merge branch 'release/1.0.4/master'

This commit is contained in:
ismailgulek 2020-08-07 17:39:30 +03:00
commit 9162e9ff50
26 changed files with 212 additions and 110 deletions

View file

@ -1,3 +1,31 @@
Changes in 1.0.4 (2020-08-07)
=================================================
Features:
*
Improvements:
* Upgrade MatrixKit version ([v0.12.11](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.12.11)).
*
Bugfix:
*
API Change:
*
Translations:
*
Others:
*
Build:
*
Test:
*
Changes in 1.0.3 (2020-08-05)
===============================================
@ -12,10 +40,12 @@ Improvements:
* AuthenticationVC: Make custom server options and register button configurable.
* Xcconfig: Add product bundle identifiers for each target.
* BuildSettings: Namespace some settings.
* BuildSettings: Reuse base bundle identifier for various settings.
Bug fix:
* Rebranding: Remove Riot from app name (#3497).
* AuthenticationViewController: Fix custom homeserver textfield scroll issue (#3467).
* Rebranding: Update provisioning universal link domain (#3483).
Changes in 1.0.2 (2020-07-28)
===============================================

View file

@ -30,6 +30,30 @@ final class BuildSettings: NSObject {
Bundle.app.object(forInfoDictionaryKey: "applicationGroupIdentifier") as! String
}
static var baseBundleIdentifier: String {
Bundle.app.object(forInfoDictionaryKey: "baseBundleIdentifier") as! String
}
static var keychainAccessGroup: String {
Bundle.app.object(forInfoDictionaryKey: "keychainAccessGroup") as! String
}
static var pushKitAppIdProd: String {
return baseBundleIdentifier + ".ios.voip.prod"
}
static var pushKitAppIdDev: String {
return baseBundleIdentifier + ".ios.voip.dev"
}
static var pusherAppIdProd: String {
return baseBundleIdentifier + ".ios.prod"
}
static var pusherAppIdDev: String {
return baseBundleIdentifier + ".ios.dev"
}
// Element-Web instance for the app
static let applicationWebAppUrlString = "https://app.element.io"
@ -55,6 +79,7 @@ final class BuildSettings: NSObject {
"app.element.io": [],
"staging.element.io": [],
"develop.element.io": [],
"mobile.element.io": [""],
// Historical ones
"riot.im": ["/app", "/staging", "/develop"],
"www.riot.im": ["/app", "/staging", "/develop"],

View file

@ -22,3 +22,5 @@ BUNDLE_DISPLAY_NAME = Element
APPLICATION_GROUP_IDENTIFIER = group.im.vector
BASE_BUNDLE_IDENTIFIER = im.vector.app
KEYCHAIN_ACCESS_GROUP = $(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER).keychain.shared

View file

@ -14,17 +14,17 @@ GEM
json (>= 1.5.1)
atomos (0.1.3)
aws-eventstream (1.1.0)
aws-partitions (1.337.0)
aws-sdk-core (3.102.1)
aws-partitions (1.351.0)
aws-sdk-core (3.104.3)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.35.0)
aws-sdk-kms (1.36.0)
aws-sdk-core (~> 3, >= 3.99.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.72.0)
aws-sdk-core (~> 3, >= 3.102.1)
aws-sdk-s3 (1.75.0)
aws-sdk-core (~> 3, >= 3.104.1)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.1)
@ -75,15 +75,16 @@ GEM
concurrent-ruby (1.1.6)
declarative (0.0.20)
declarative-option (0.1.0)
digest-crc (0.5.1)
digest-crc (0.6.1)
rake (~> 13.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
dotenv (2.7.5)
emoji_regex (1.0.1)
dotenv (2.7.6)
emoji_regex (3.0.0)
escape (0.0.4)
ethon (0.12.0)
ffi (>= 1.3.0)
excon (0.75.0)
excon (0.76.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
@ -91,34 +92,32 @@ GEM
http-cookie (~> 1.0.0)
faraday_middleware (1.0.0)
faraday (~> 1.0)
fastimage (2.1.7)
fastlane (2.149.1)
fastimage (2.2.0)
fastlane (2.154.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.2, < 2.0.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
commander-fastlane (>= 4.4.6, < 5.0.0)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 2.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (>= 0.17, < 2.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (>= 0.13.1, < 2.0)
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)
json (< 3.0.0)
jwt (~> 2.1.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multi_xml (~> 0.5)
multipart-post (~> 2.0.0)
plist (>= 3.1.0, < 4.0.0)
public_suffix (~> 2.0.0)
rubyzip (>= 1.3.0, < 2.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)
@ -146,17 +145,17 @@ GEM
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.2)
google-cloud-env (1.3.3)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.1)
google-cloud-storage (1.26.2)
google-cloud-storage (1.27.0)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.13.0)
googleauth (0.13.1)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
@ -171,22 +170,22 @@ GEM
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
json (2.3.1)
jwt (2.1.0)
jwt (2.2.1)
memoist (0.16.2)
mini_magick (4.10.1)
mini_mime (1.0.2)
minitest (5.14.1)
molinillo (0.6.6)
multi_json (1.14.1)
multi_xml (0.6.0)
multi_json (1.15.0)
multipart-post (2.0.0)
nanaimo (0.2.6)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.0)
netrc (0.11.0)
os (1.1.0)
os (1.1.1)
plist (3.5.0)
public_suffix (2.0.5)
public_suffix (4.0.5)
rake (13.0.1)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
@ -194,7 +193,7 @@ GEM
retriable (3.1.2)
rouge (2.0.7)
ruby-macho (1.4.0)
rubyzip (1.3.0)
rubyzip (2.3.0)
security (0.1.3)
signet (0.14.0)
addressable (~> 2.3)
@ -210,7 +209,7 @@ GEM
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
tty-cursor (0.7.1)
tty-screen (0.8.0)
tty-screen (0.8.1)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (1.4.0)
@ -226,12 +225,12 @@ GEM
xcode-install (2.6.6)
claide (>= 0.9.1, < 1.1.0)
fastlane (>= 2.1.0, < 3.0.0)
xcodeproj (1.17.0)
xcodeproj (1.17.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
nanaimo (~> 0.3.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.0)

View file

@ -11,7 +11,7 @@ use_frameworks!
# - `{ {kit spec hash} => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for each repo. Used by Fastfile during CI
#
# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it
$matrixKitVersion = '0.12.10'
$matrixKitVersion = '0.12.11'
# $matrixKitVersion = :local
# $matrixKitVersion = {'develop' => 'develop'}

View file

@ -16,18 +16,18 @@ PODS:
- AFNetworking/NSURLSession
- cmark (0.24.1)
- DGCollectionViewLeftAlignFlowLayout (1.0.4)
- DTCoreText (1.6.23):
- DTCoreText/Core (= 1.6.23)
- DTCoreText (1.6.24):
- DTCoreText/Core (= 1.6.24)
- DTFoundation/Core (~> 1.7.5)
- DTFoundation/DTAnimatedGIF (~> 1.7.5)
- DTFoundation/DTHTMLParser (~> 1.7.5)
- DTFoundation/UIKit (~> 1.7.5)
- DTCoreText/Core (1.6.23):
- DTCoreText/Core (1.6.24):
- DTFoundation/Core (~> 1.7.5)
- DTFoundation/DTAnimatedGIF (~> 1.7.5)
- DTFoundation/DTHTMLParser (~> 1.7.5)
- DTFoundation/UIKit (~> 1.7.5)
- DTCoreText/Extension (1.6.23):
- DTCoreText/Extension (1.6.24):
- DTFoundation/Core (~> 1.7.5)
- DTFoundation/DTAnimatedGIF (~> 1.7.5)
- DTFoundation/DTHTMLParser (~> 1.7.5)
@ -51,38 +51,38 @@ PODS:
- MatomoTracker (7.2.1):
- MatomoTracker/Core (= 7.2.1)
- MatomoTracker/Core (7.2.1)
- MatrixKit (0.12.10):
- MatrixKit (0.12.11):
- cmark (~> 0.24.1)
- DTCoreText (~> 1.6.23)
- HPGrowingTextView (~> 1.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixKit/Core (= 0.12.10)
- MatrixSDK (= 0.16.9)
- MatrixKit/AppExtension (0.12.10):
- MatrixKit/Core (= 0.12.11)
- MatrixSDK (= 0.16.10)
- MatrixKit/AppExtension (0.12.11):
- cmark (~> 0.24.1)
- DTCoreText (~> 1.6.23)
- DTCoreText/Extension
- HPGrowingTextView (~> 1.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixSDK (= 0.16.9)
- MatrixKit/Core (0.12.10):
- MatrixSDK (= 0.16.10)
- MatrixKit/Core (0.12.11):
- cmark (~> 0.24.1)
- DTCoreText (~> 1.6.23)
- HPGrowingTextView (~> 1.1)
- libPhoneNumber-iOS (~> 0.9.13)
- MatrixSDK (= 0.16.9)
- MatrixSDK (0.16.9):
- MatrixSDK/Core (= 0.16.9)
- MatrixSDK/Core (0.16.9):
- MatrixSDK (= 0.16.10)
- MatrixSDK (0.16.10):
- MatrixSDK/Core (= 0.16.10)
- MatrixSDK/Core (0.16.10):
- AFNetworking (~> 4.0.0)
- GZIP (~> 1.2.2)
- libbase58 (~> 0.1.4)
- OLMKit (~> 3.1.0)
- Realm (~> 4.4.0)
- MatrixSDK/JingleCallStack (0.16.9):
- MatrixSDK/JingleCallStack (0.16.10):
- JitsiMeetSDK (~> 2.8.1)
- MatrixSDK/Core
- MatrixSDK/SwiftSupport (0.16.9):
- MatrixSDK/SwiftSupport (0.16.10):
- MatrixSDK/Core
- OLMKit (3.1.0):
- OLMKit/olmc (= 3.1.0)
@ -111,8 +111,8 @@ DEPENDENCIES:
- KeychainAccess (~> 4.2)
- KTCenterFlowLayout (~> 1.3.1)
- MatomoTracker (~> 7.2.0)
- MatrixKit (= 0.12.10)
- MatrixKit/AppExtension (= 0.12.10)
- MatrixKit (= 0.12.11)
- MatrixKit/AppExtension (= 0.12.11)
- MatrixSDK
- MatrixSDK/JingleCallStack
- MatrixSDK/SwiftSupport
@ -153,7 +153,7 @@ SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
cmark: 1d9ad0375e3b9fa281732e992467903606015520
DGCollectionViewLeftAlignFlowLayout: a0fa58797373ded039cafba8133e79373d048399
DTCoreText: 67023bb51b26711d5f640c851f4845aea14c24c9
DTCoreText: 0298d372ccc137e51f27b3ec1af65fd4af5d173a
DTFoundation: 25aa19bb7c6e225b1dfae195604fb8cf1da0ab4c
GBDeviceInfo: a3f39dba1a04dcb630abff65d6f7e8fbf319eadd
GZIP: af5c90ef903776a7e9afe6ebebd794a84a2929d4
@ -164,8 +164,8 @@ SPEC CHECKSUMS:
libbase58: 7c040313537b8c44b6e2d15586af8e21f7354efd
libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75
MatomoTracker: 246b6b0693cf39b356134dec7561f719d3538b96
MatrixKit: 6937446581f1c71011e47db8b302dc912433edb2
MatrixSDK: 007988f3ef43983a6b1c1f0087a18c7e2598abfa
MatrixKit: 6c5ba4a7673475eca2ad38bbfa02122a502fd03c
MatrixSDK: a9793d20448ee7cbe8acd8650fa319ea0b11d273
OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639
Realm: 4eb04d7487bd43c0581256f40b424eafb711deff
Reusable: 53a9acf5c536f229b31b5865782414b508252ddb
@ -174,6 +174,6 @@ SPEC CHECKSUMS:
zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
PODFILE CHECKSUM: 44306ac00e0905967588b3035b5494bc26836188
PODFILE CHECKSUM: 4f5106309b0939cb9dca5512fc9880a78a8b4926
COCOAPODS: 1.9.3

View file

@ -20,7 +20,7 @@ Build instructions
Before opening the Element Xcode workspace, you need to build it with the
CocoaPods command::
$ cd Riot
$ cd Element
$ bundle install
$ bundle exec pod install

View file

@ -6765,7 +6765,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1.0.3;
CURRENT_PROJECT_VERSION = 1.0.4;
DEFINES_MODULE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@ -6785,7 +6785,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -6823,7 +6823,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 1.0.3;
CURRENT_PROJECT_VERSION = 1.0.4;
DEFINES_MODULE = YES;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@ -6836,7 +6836,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MARKETING_VERSION = 1.0.3;
MARKETING_VERSION = 1.0.4;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;

View file

@ -1229,7 +1229,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
[[NSNotificationCenter defaultCenter] postNotificationName:AppDelegateUniversalLinkDidChangeNotification object:nil];
}
if ([webURL.path hasPrefix:@"/config"])
if ([webURL.path isEqualToString:@"/"])
{
return [self handleServerProvionningLink:webURL];
}
@ -1772,7 +1772,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
- (void)parseServerProvionningLink:(NSURL*)link homeserver:(NSString**)homeserver identityServer:(NSString**)identityServer
{
if ([link.path isEqualToString:@"/config/config"])
if ([link.path isEqualToString:@"/"])
{
NSURLComponents *linkURLComponents = [NSURLComponents componentsWithURL:link resolvingAgainstBaseURL:NO];
for (NSURLQueryItem *item in linkURLComponents.queryItems)
@ -4533,7 +4533,14 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
// Register "Riot-Defaults.plist" default values
NSString* userDefaults = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UserDefaults"];
NSString *defaultsPathFromApp = [[NSBundle mainBundle] pathForResource:userDefaults ofType:@"plist"];
NSDictionary *defaults = [NSDictionary dictionaryWithContentsOfFile:defaultsPathFromApp];
NSMutableDictionary *defaults = [[NSDictionary dictionaryWithContentsOfFile:defaultsPathFromApp] mutableCopy];
// add pusher ids, as they don't belong to plist anymore
defaults[@"pushKitAppIdProd"] = BuildSettings.pushKitAppIdProd;
defaults[@"pushKitAppIdDev"] = BuildSettings.pushKitAppIdDev;
defaults[@"pusherAppIdProd"] = BuildSettings.pusherAppIdProd;
defaults[@"pusherAppIdDev"] = BuildSettings.pusherAppIdDev;
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults];
if (!RiotSettings.shared.isUserDefaultsMigrated)

View file

@ -6,14 +6,6 @@
<true/>
<key>pinRoomsWithUnread</key>
<true/>
<key>pushKitAppIdProd</key>
<string>im.vector.app.ios.voip.prod</string>
<key>pushKitAppIdDev</key>
<string>im.vector.app.ios.voip.dev</string>
<key>pusherAppIdDev</key>
<string>im.vector.app.ios.dev</string>
<key>pusherAppIdProd</key>
<string>im.vector.app.ios.prod</string>
<key>matrixApps</key>
<true/>
<key>showAllEventsInRoomHistory</key>

View file

@ -33,4 +33,10 @@ import UIKit
return false
}
}
/// Returns if the device is a Phone
var isPhone: Bool {
return userInterfaceIdiom == .phone
}
}

View file

@ -44,6 +44,8 @@ internal enum InfoPlist {
internal static let uiViewControllerBasedStatusBarAppearance: Bool = _document["UIViewControllerBasedStatusBarAppearance"]
internal static let userDefaults: String = _document["UserDefaults"]
internal static let applicationGroupIdentifier: String = _document["applicationGroupIdentifier"]
internal static let baseBundleIdentifier: String = _document["baseBundleIdentifier"]
internal static let keychainAccessGroup: String = _document["keychainAccessGroup"]
}
// swiftlint:enable identifier_name line_length type_body_length

View file

@ -12,45 +12,22 @@ import Foundation
internal enum RiotDefaults {
private static let _document = PlistDocument(path: "Riot-Defaults.plist")
internal static let bugReportApp: String = _document["bugReportApp"]
internal static let bugReportEndpointUrl: String = _document["bugReportEndpointUrl"]
internal static let createConferenceCallsWithJitsi: Bool = _document["createConferenceCallsWithJitsi"]
internal static let enableBotCreation: Bool = _document["enableBotCreation"]
internal static let enableRageShake: Bool = _document["enableRageShake"]
internal static let homeserver: String = _document["homeserver"]
internal static let homeserverurl: String = _document["homeserverurl"]
internal static let identityserverurl: String = _document["identityserverurl"]
internal static let integrationsRestUrl: String = _document["integrationsRestUrl"]
internal static let integrationsUiUrl: String = _document["integrationsUiUrl"]
internal static let integrationsWidgetsUrls: [String] = _document["integrationsWidgetsUrls"]
internal static let jitsiServerURL: String = _document["jitsiServerURL"]
internal static let matrixApps: Bool = _document["matrixApps"]
internal static let maxAllowedMediaCacheSize: Int = _document["maxAllowedMediaCacheSize"]
internal static let pinRoomsWithMissedNotif: Bool = _document["pinRoomsWithMissedNotif"]
internal static let pinRoomsWithUnread: Bool = _document["pinRoomsWithUnread"]
internal static let piwik: [String: Any] = _document["piwik"]
internal static let presenceColorForOfflineUser: Int = _document["presenceColorForOfflineUser"]
internal static let presenceColorForOnlineUser: Int = _document["presenceColorForOnlineUser"]
internal static let presenceColorForUnavailableUser: Int = _document["presenceColorForUnavailableUser"]
internal static let pushGatewayURL: String = _document["pushGatewayURL"]
internal static let pushKitAppIdDev: String = _document["pushKitAppIdDev"]
internal static let pushKitAppIdProd: String = _document["pushKitAppIdProd"]
internal static let pusherAppIdDev: String = _document["pusherAppIdDev"]
internal static let pusherAppIdProd: String = _document["pusherAppIdProd"]
internal static let roomDirectoryServers: [String: Any] = _document["roomDirectoryServers"]
internal static let settingsCopyrightUrl: String = _document["settingsCopyrightUrl"]
internal static let settingsPrivacyPolicyUrl: String = _document["settingsPrivacyPolicyUrl"]
internal static let settingsTermsConditionsUrl: String = _document["settingsTermsConditionsUrl"]
internal static let showAllEventsInRoomHistory: Bool = _document["showAllEventsInRoomHistory"]
internal static let showLeftMembersInRoomMemberList: Bool = _document["showLeftMembersInRoomMemberList"]
internal static let showRedactionsInRoomHistory: Bool = _document["showRedactionsInRoomHistory"]
internal static let showUnsupportedEventsInRoomHistory: Bool = _document["showUnsupportedEventsInRoomHistory"]
internal static let sortRoomMembersUsingLastSeenTime: Bool = _document["sortRoomMembersUsingLastSeenTime"]
internal static let stunServerFallback: String = _document["stunServerFallback"]
internal static let syncLocalContacts: Bool = _document["syncLocalContacts"]
internal static let webAppUrl: String = _document["webAppUrl"]
internal static let webAppUrlDev: String = _document["webAppUrlDev"]
internal static let webAppUrlStaging: String = _document["webAppUrlStaging"]
}
// swiftlint:enable identifier_name line_length type_body_length

View file

@ -28,4 +28,31 @@
return self.topViewController;
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
if (self.topViewController)
{
return self.topViewController.supportedInterfaceOrientations;
}
return [super supportedInterfaceOrientations];
}
- (BOOL)shouldAutorotate
{
if (self.topViewController)
{
return self.topViewController.shouldAutorotate;
}
return [super shouldAutorotate];
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
if (self.topViewController)
{
return self.topViewController.preferredInterfaceOrientationForPresentation;
}
return [super preferredInterfaceOrientationForPresentation];
}
@end

View file

@ -67,19 +67,34 @@ final class EnterPinCodeViewController: UIViewController {
self.update(theme: self.theme)
self.viewModel.viewDelegate = self
if #available(iOS 13.0, *) {
modalPresentationStyle = .fullScreen
isModalInPresentation = true
}
self.viewModel.process(viewAction: .loadData)
// force orientation to portrait if phone
if UIDevice.current.isPhone {
UIDevice.current.setValue(UIInterfaceOrientation.portrait.rawValue, forKey: "orientation")
}
}
override var preferredStatusBarStyle: UIStatusBarStyle {
return self.theme.statusBarStyle
}
override var supportedInterfaceOrientations: UIInterfaceOrientationMask {
// limit orientation to portrait only for phone
if UIDevice.current.isPhone {
return .portrait
}
return super.supportedInterfaceOrientations
}
override var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation {
if UIDevice.current.isPhone {
return .portrait
}
return super.preferredInterfaceOrientationForPresentation
}
// MARK: - Private
private func update(theme: Theme) {
@ -281,4 +296,12 @@ extension EnterPinCodeViewController: EnterPinCodeViewModelViewDelegate {
self.renderPlaceholdersCount(count)
}
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didUpdateCancelButtonHidden isHidden: Bool) {
if isHidden {
hideCancelButton()
} else {
showCancelButton()
}
}
}

View file

@ -143,6 +143,7 @@ final class EnterPinCodeViewModel: EnterPinCodeViewModelType {
switch viewMode {
case .setPin:
update(viewState: .choosePin)
self.viewDelegate?.enterPinCodeViewModel(self, didUpdateCancelButtonHidden: pinCodePreferences.forcePinProtection)
case .unlock:
update(viewState: .unlock)
case .confirmPinToDeactivate:

View file

@ -21,6 +21,7 @@ import Foundation
protocol EnterPinCodeViewModelViewDelegate: class {
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didUpdateViewState viewSate: EnterPinCodeViewState)
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didUpdatePlaceholdersCount count: Int)
func enterPinCodeViewModel(_ viewModel: EnterPinCodeViewModelType, didUpdateCancelButtonHidden isHidden: Bool)
}
protocol EnterPinCodeViewModelCoordinatorDelegate: class {

View file

@ -25,7 +25,7 @@ final class PinCodePreferences: NSObject {
// MARK: - Constants
private struct PinConstants {
static let pinCodeKeychainService: String = "im.vector.app.pin-service"
static let pinCodeKeychainService: String = BuildSettings.baseBundleIdentifier + ".pin-service"
}
private struct StoreKeys {
@ -40,7 +40,7 @@ final class PinCodePreferences: NSObject {
override init() {
store = KeychainStore(withKeychain: Keychain(service: PinConstants.pinCodeKeychainService,
accessGroup: Constants.keychainAccessGroup))
accessGroup: BuildSettings.keychainAccessGroup))
super.init()
}

View file

@ -70,7 +70,11 @@ final class SetPinCoordinator: SetPinCoordinatorType {
}
func toPresentable() -> UIViewController {
return self.navigationRouter.toPresentable()
let controller = self.navigationRouter.toPresentable()
if #available(iOS 13.0, *) {
controller.modalPresentationStyle = .fullScreen
}
return controller
}
// MARK: - Private methods

View file

@ -91,5 +91,9 @@
<string>${PRODUCT_NAME}-Defaults</string>
<key>applicationGroupIdentifier</key>
<string>$(APPLICATION_GROUP_IDENTIFIER)</string>
<key>baseBundleIdentifier</key>
<string>$(BASE_BUNDLE_IDENTIFIER)</string>
<key>keychainAccessGroup</key>
<string>$(KEYCHAIN_ACCESS_GROUP)</string>
</dict>
</plist>

View file

@ -15,6 +15,7 @@
<string>applinks:app.element.io</string>
<string>applinks:staging.element.io</string>
<string>applinks:develop.element.io</string>
<string>applinks:mobile.element.io</string>
<string>webcredentials:*.element.io</string>
</array>
<key>com.apple.developer.icloud-container-identifiers</key>
@ -39,7 +40,7 @@
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)im.vector.app.keychain.shared</string>
<string>$(KEYCHAIN_ACCESS_GROUP)</string>
</array>
</dict>
</plist>

View file

@ -19,6 +19,5 @@ import Foundation
enum Constants {
static let toBeRemovedNotificationCategoryIdentifier = "TO_BE_REMOVED"
static let keychainAccessGroup = "7J4U792NQT.im.vector.app.keychain.shared"
}

View file

@ -8,7 +8,7 @@
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)im.vector.app.keychain.shared</string>
<string>$(KEYCHAIN_ACCESS_GROUP)</string>
</array>
</dict>
</plist>

View file

@ -8,7 +8,7 @@
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)im.vector.app.keychain.shared</string>
<string>$(KEYCHAIN_ACCESS_GROUP)</string>
</array>
</dict>
</plist>

View file

@ -8,7 +8,7 @@
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)im.vector.app.keychain.shared</string>
<string>$(KEYCHAIN_ACCESS_GROUP)</string>
</array>
</dict>
</plist>

View file

@ -37,9 +37,11 @@ bundle update
# Checkout the source to build
mkdir -p $BUILD_DIR
cd $BUILD_DIR
git clone https://github.com/vector-im/riot-ios.git
cd riot-ios
git checkout -b $TAG $TAG
REPO_URL=$(git ls-remote --get-url origin)
git clone $REPO_URL
REPO_NAME=$(basename -s .git $REPO_URL)
cd $REPO_NAME
git checkout $TAG $TAG
# Develop branch special case