Skip to content

Commit 13028a7

Browse files
authored
Merge pull request #539 from vector-im/release-v0.1.15
Release v0.1.15
2 parents 01e6b0d + fd4c338 commit 13028a7

File tree

63 files changed

+1870
-177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1870
-177
lines changed

CHANGES.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
Changes in Vector iOS in 0.1.15 (2016-08-25)
2+
===============================================
3+
4+
Improvements:
5+
* Upgrade MatrixKit version (v0.3.14).
6+
* Add conference call.
7+
* Add the Vector VoIP call screen #455.
8+
* Speed up app startup #376.
9+
* Call: Update the libjingle lib to its latest version. We now use the pod from https://github.com/Anakros/WebRTC-iOS.
10+
* Conference call: Add an enabler button in Settings > LABS.
11+
* Conference call: Add ongoing conference call banner.
12+
* Banned user list are shown in room settings #450.
13+
* Display the list of ignored users in user settings #451.
14+
* Media Picker: Allow multi selection of pictures #301.
15+
* Settings: Adjust the section header display.
16+
17+
Bug fixes:
18+
* Redacting membership events should immediately reset the displayname & avatar of room members #443.
19+
* Profile changes shouldn't reorder the room list #494.
20+
* Media album: The aspect fill ratio is not respected #495.
21+
* "Return to call" banner: Use the Vector green for the background #482.
22+
* Tapping on the room details for Matrix HQ freezes the app for about 5s #499.
23+
* Crash in [AppDelegate applicationDidBecomeActive:] #489.
24+
* Chat screen: tapping resend now does nothing #510.
25+
* Conference call: The initialisation of a conference call silently fails when the room member has not enough power level (https://github.com/vector-im/vector-im/vector-web#1948).
26+
* When the last message is redacted, [MXKRecentCellData update] makes paginations loops #520.
27+
* MXSession: Do not send kMXSessionIgnoredUsersDidChangeNotification when the session loads the data from the store #491.
28+
* MXHTTPClient: Fix crash: "Task created in a session that has been invalidated" #490.
29+
* Call: the remote and local video are not scaled to fill the video container #537.
30+
131
Changes in Vector iOS in 0.1.14 (2016-08-01)
232
===============================================
333

Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target "Vector" do
88

99
# Different flavours of pods to MatrixKit
1010
# The tagged version on which this version of Vector has been built
11-
pod 'MatrixKit', '0.3.13'
11+
pod 'MatrixKit', '0.3.14'
1212

1313
# The lastest release available on the CocoaPods repository
1414
#pod 'MatrixKit'
@@ -27,7 +27,7 @@ pod 'GBDeviceInfo', '~> 4.1.0'
2727
pod 'GoogleAnalytics'
2828

2929
# The Google WebRTC stack
30-
pod 'libjingle_peerconnection'
30+
pod 'WebRTC', '1.0.13807'
3131

3232
end
3333

Podfile.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,38 @@ PODS:
2929
- GBDeviceInfo/Core (= 4.1.0)
3030
- GBDeviceInfo/Core (4.1.0)
3131
- GHMarkdownParser (0.1.2)
32-
- GoogleAnalytics (3.14.0)
32+
- GoogleAnalytics (3.16.0)
3333
- HPGrowingTextView (1.1)
34-
- libjingle_peerconnection (11177.2.0)
35-
- libPhoneNumber-iOS (0.8.15)
36-
- MatrixKit (0.3.13):
34+
- libPhoneNumber-iOS (0.8.16)
35+
- MatrixKit (0.3.14):
3736
- DTCoreText (~> 1.6.17)
3837
- GHMarkdownParser (~> 0.1.2)
3938
- HPGrowingTextView (~> 1.1)
4039
- libPhoneNumber-iOS (~> 0.8.14)
41-
- MatrixSDK (= 0.6.12)
42-
- MatrixSDK (0.6.12):
40+
- MatrixSDK (= 0.6.13)
41+
- MatrixSDK (0.6.13):
4342
- AFNetworking (~> 3.1.0)
43+
- WebRTC (1.0.13807)
4444

4545
DEPENDENCIES:
4646
- GBDeviceInfo (~> 4.1.0)
4747
- GoogleAnalytics
48-
- libjingle_peerconnection
49-
- MatrixKit (= 0.3.13)
48+
- MatrixKit (= 0.3.14)
49+
- WebRTC (= 1.0.13807)
5050

5151
SPEC CHECKSUMS:
5252
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
5353
DTCoreText: 3ea8bba23dd2141ba18adb227a7dd33a822df1c4
5454
DTFoundation: 3b6b1b817d2a7fb02e7eaf2596c922a68145bd43
5555
GBDeviceInfo: e50df975a95e21faec93e2bf98376846fe17d307
5656
GHMarkdownParser: 14cbf59d0ab9450017d843dffd4a3ef691e5bd77
57-
GoogleAnalytics: 9be1afdb8deeac4bb5f13ca7f7d3b9db2a1f43dc
57+
GoogleAnalytics: 3de986b2fa29012c69fa415566006a9c9cf25320
5858
HPGrowingTextView: 88a716d97fb853bcb08a4a08e4727da17efc9b19
59-
libjingle_peerconnection: 3458f646ddd61f08a9f3a0c43fb01fff5c165eb8
60-
libPhoneNumber-iOS: 62a740e1ea5741060f5cec0f788b52071115cf31
61-
MatrixKit: 4ed4963069510e2be2349d3310602a03b9d3a043
62-
MatrixSDK: 15f165271e3c677060be1f131edef9e643067677
59+
libPhoneNumber-iOS: acb5805f67892db37adc3440290a367923672b51
60+
MatrixKit: c8855ccd0186e2e2c1dd359767d87a056bdcb17e
61+
MatrixSDK: d848e4050411f66061f98b77f8bcb1a1eca377a2
62+
WebRTC: 5263e2983d21b6c53e0e6859aaf8aabeee6bafdf
6363

64-
PODFILE CHECKSUM: 0f4ac1211874e84d41b66ba970dd2d15eb65242c
64+
PODFILE CHECKSUM: d21a2f5518b49b8812b1a9cfa94a094aa41e17c8
6565

6666
COCOAPODS: 1.0.1

Vector.xcodeproj/project.pbxproj

Lines changed: 134 additions & 0 deletions
Large diffs are not rendered by default.

Vector/AppDelegate.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
*/
3131
extern NSString *const kAppDelegateDidTapStatusBarNotification;
3232

33+
/**
34+
Posted when the property 'isOffline' has changed. This property is related to the network reachability status.
35+
*/
36+
extern NSString *const kAppDelegateNetworkStatusDidChangeNotification;
37+
3338
@interface AppDelegate : UIResponder <UIApplicationDelegate, MXKCallViewControllerDelegate, UISplitViewControllerDelegate, UINavigationControllerDelegate>
3439
{
3540
BOOL isAPNSRegistered;
@@ -111,5 +116,9 @@ extern NSString *const kAppDelegateDidTapStatusBarNotification;
111116
*/
112117
- (BOOL)handleUniversalLinkFragment:(NSString*)fragment;
113118

119+
#pragma mark - Call status handling
120+
121+
- (void)returnToCallView;
122+
114123
@end
115124

Vector/AppDelegate.m

Lines changed: 131 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939

4040
#import <AudioToolbox/AudioToolbox.h>
4141

42+
#import "CallViewController.h"
43+
4244
//#define MX_CALL_STACK_OPENWEBRTC
4345
#ifdef MX_CALL_STACK_OPENWEBRTC
4446
#import <MatrixOpenWebRTCWrapper/MatrixOpenWebRTCWrapper.h>
@@ -56,6 +58,7 @@
5658
#define MAKE_NS_STRING(x) @MAKE_STRING(x)
5759

5860
NSString *const kAppDelegateDidTapStatusBarNotification = @"kAppDelegateDidTapStatusBarNotification";
61+
NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateNetworkStatusDidChangeNotification";
5962

6063
@interface AppDelegate ()
6164
{
@@ -88,7 +91,7 @@ @interface AppDelegate ()
8891
/**
8992
The current call view controller (if any).
9093
*/
91-
MXKCallViewController *currentCallViewController;
94+
CallViewController *currentCallViewController;
9295

9396
/**
9497
Call status window displayed when user goes back to app during a call.
@@ -148,6 +151,7 @@ The room id of the current handled remote notification (if any)
148151
}
149152

150153
@property (strong, nonatomic) MXKAlert *mxInAppNotification;
154+
@property (strong, nonatomic) MXKAlert *incomingCallNotification;
151155

152156
@end
153157

@@ -222,7 +226,12 @@ - (void)setIsOffline:(BOOL)isOffline
222226
}];
223227
}
224228

225-
_isOffline = isOffline;
229+
if (_isOffline != isOffline)
230+
{
231+
_isOffline = isOffline;
232+
233+
[[NSNotificationCenter defaultCenter] postNotificationName:kAppDelegateNetworkStatusDidChangeNotification object:nil];
234+
}
226235
}
227236

228237
#pragma mark - UIApplicationDelegate
@@ -362,7 +371,6 @@ - (void)applicationDidEnterBackground:(UIApplication *)application
362371
}
363372
[[AFNetworkReachabilityManager sharedManager] setReachabilityStatusChangeBlock:nil];
364373
[[AFNetworkReachabilityManager sharedManager] stopMonitoring];
365-
_isOffline = NO;
366374

367375
// check if some media must be released to reduce the cache size
368376
[MXKMediaManager reduceCacheSizeToInsert:0];
@@ -482,7 +490,7 @@ - (void)applicationWillTerminate:(UIApplication *)application
482490

483491
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler
484492
{
485-
BOOL continueUserActivity;
493+
BOOL continueUserActivity = NO;
486494

487495
if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb])
488496
{
@@ -1267,6 +1275,9 @@ - (void)initMatrixSessions
12671275
[self enableNoVoIPOnMatrixSession:mxSession];
12681276
}
12691277

1278+
// Ignore the room member profile changes during the last message process in each room.
1279+
mxSession.ignoreProfileChangesDuringLastMessageProcessing = YES;
1280+
12701281
// Each room member will be considered as a potential contact.
12711282
[MXKContactManager sharedManager].contactManagerMXRoomSource = MXKContactManagerMXRoomSourceAll;
12721283
}
@@ -1356,6 +1367,15 @@ - (void)initMatrixSessions
13561367

13571368
}];
13581369

1370+
[[NSNotificationCenter defaultCenter] addObserverForName:kMXSessionDidCorruptDataNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * _Nonnull notif) {
1371+
1372+
NSLog(@"[AppDelegate] kMXSessionDidCorruptDataNotification received. Reload the app");
1373+
1374+
// Reload entirely the app when a session has corrupted its data
1375+
[[AppDelegate theDelegate] reloadMatrixSessions:YES];
1376+
1377+
}];
1378+
13591379
// Observe settings changes
13601380
[[MXKAppSettings standardAppSettings] addObserver:self forKeyPath:@"showAllEventsInRoomHistory" options:0 context:nil];
13611381

@@ -1517,17 +1537,88 @@ - (void)addMatrixCallObserver
15171537
{
15181538
MXCall *mxCall = (MXCall*)notif.object;
15191539

1520-
currentCallViewController = [MXKCallViewController callViewController:mxCall];
1540+
// Prepare the call view controller
1541+
currentCallViewController = [CallViewController callViewController:mxCall];
15211542
currentCallViewController.delegate = self;
15221543

1523-
// FIXME GFO Check whether present call from self.window.rootViewController is working
1524-
[self.window.rootViewController presentViewController:currentCallViewController animated:YES completion:^{
1525-
currentCallViewController.isPresented = YES;
1526-
}];
1527-
1528-
// Hide system status bar
1529-
[UIApplication sharedApplication].statusBarHidden = YES;
1544+
if (mxCall.isIncoming)
1545+
{
1546+
// Prompt user before presenting the call view controller
1547+
NSString *callPromptFormat = mxCall.isVideoCall ? NSLocalizedStringFromTable(@"call_incoming_video_prompt", @"Vector", nil) : NSLocalizedStringFromTable(@"call_incoming_voice_prompt", @"Vector", nil);
1548+
NSString *callerName = currentCallViewController.peer.displayname;
1549+
if (!callerName.length)
1550+
{
1551+
callerName = currentCallViewController.peer.userId;
1552+
}
1553+
NSString *callPrompt = [NSString stringWithFormat:callPromptFormat, callerName];
1554+
1555+
__weak typeof(self) weakSelf = self;
1556+
1557+
// Removing existing notification (if any)
1558+
[_incomingCallNotification dismiss:NO];
1559+
1560+
1561+
1562+
_incomingCallNotification = [[MXKAlert alloc] initWithTitle:callPrompt
1563+
message:nil
1564+
style:MXKAlertStyleAlert];
1565+
1566+
_incomingCallNotification.cancelButtonIndex = [_incomingCallNotification addActionWithTitle:NSLocalizedStringFromTable(@"decline", @"Vector", nil)
1567+
style:MXKAlertActionStyleDefault
1568+
handler:^(MXKAlert *alert) {
1569+
1570+
if (weakSelf)
1571+
{
1572+
__strong __typeof(weakSelf)strongSelf = weakSelf;
1573+
1574+
strongSelf.incomingCallNotification = nil;
1575+
1576+
[strongSelf->currentCallViewController onButtonPressed:strongSelf->currentCallViewController.rejectCallButton];
1577+
1578+
mxCall.delegate = nil;
1579+
currentCallViewController = nil;
1580+
}
1581+
1582+
}];
1583+
1584+
[_incomingCallNotification addActionWithTitle:NSLocalizedStringFromTable(@"accept", @"Vector", nil)
1585+
style:MXKAlertActionStyleDefault
1586+
handler:^(MXKAlert *alert) {
1587+
if (weakSelf)
1588+
{
1589+
__strong __typeof(weakSelf)strongSelf = weakSelf;
1590+
1591+
strongSelf.incomingCallNotification = nil;
1592+
1593+
[strongSelf->currentCallViewController onButtonPressed:strongSelf->currentCallViewController.answerCallButton];
1594+
1595+
[strongSelf.window.rootViewController presentViewController:strongSelf->currentCallViewController animated:YES completion:^{
1596+
1597+
strongSelf->currentCallViewController.isPresented = YES;
1598+
1599+
}];
1600+
1601+
// Hide system status bar
1602+
[UIApplication sharedApplication].statusBarHidden = YES;
1603+
1604+
}
1605+
}];
1606+
1607+
[_incomingCallNotification showInViewController:self.window.rootViewController];
1608+
}
1609+
else
1610+
{
1611+
[self.window.rootViewController presentViewController:currentCallViewController animated:YES completion:^{
1612+
1613+
currentCallViewController.isPresented = YES;
1614+
1615+
}];
1616+
1617+
// Hide system status bar
1618+
[UIApplication sharedApplication].statusBarHidden = YES;
1619+
}
15301620
}
1621+
15311622
}];
15321623
}
15331624

@@ -1776,12 +1867,28 @@ - (void)startPrivateOneToOneRoomWithUserId:(NSString*)userId completion:(void (^
17761867

17771868
#pragma mark - MXKCallViewControllerDelegate
17781869

1779-
- (void)dismissCallViewController:(MXKCallViewController *)callViewController
1870+
- (void)dismissCallViewController:(MXKCallViewController *)callViewController completion:(void (^)())completion
17801871
{
17811872
if (callViewController == currentCallViewController)
17821873
{
1783-
1784-
if (callViewController.isPresented)
1874+
if (_incomingCallNotification)
1875+
{
1876+
// The user was prompted for an incoming call which ended
1877+
// The call view controller was not presented yet.
1878+
[_incomingCallNotification dismiss:NO];
1879+
_incomingCallNotification = nil;
1880+
1881+
// Release properly
1882+
currentCallViewController.mxCall.delegate = nil;
1883+
currentCallViewController.delegate = nil;
1884+
currentCallViewController = nil;
1885+
1886+
if (completion)
1887+
{
1888+
completion();
1889+
}
1890+
}
1891+
else if (callViewController.isPresented)
17851892
{
17861893
BOOL callIsEnded = (callViewController.mxCall.state == MXCallStateEnded);
17871894
NSLog(@"Call view controller is dismissed (%d)", callIsEnded);
@@ -1793,6 +1900,11 @@ - (void)dismissCallViewController:(MXKCallViewController *)callViewController
17931900
{
17941901
[self addCallStatusBar];
17951902
}
1903+
1904+
if (completion)
1905+
{
1906+
completion();
1907+
}
17961908
}];
17971909

17981910
if (callIsEnded)
@@ -1807,12 +1919,13 @@ - (void)dismissCallViewController:(MXKCallViewController *)callViewController
18071919
currentCallViewController.delegate = nil;
18081920
currentCallViewController = nil;
18091921
}
1810-
} else
1922+
}
1923+
else
18111924
{
18121925
// Here the presentation of the call view controller is in progress
18131926
// Postpone the dismiss
18141927
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
1815-
[self dismissCallViewController:callViewController];
1928+
[self dismissCallViewController:callViewController completion:completion];
18161929
});
18171930
}
18181931
}
@@ -1837,7 +1950,7 @@ - (void)addCallStatusBar
18371950
[callStatusBarButton setTitle:btnTitle forState:UIControlStateHighlighted];
18381951
callStatusBarButton.titleLabel.textColor = [UIColor whiteColor];
18391952

1840-
[callStatusBarButton setBackgroundColor:[UIColor blueColor]];
1953+
[callStatusBarButton setBackgroundColor:kVectorColorGreen];
18411954
[callStatusBarButton addTarget:self action:@selector(returnToCallView) forControlEvents:UIControlEventTouchUpInside];
18421955

18431956
// Place button into the new window
@@ -1875,7 +1988,6 @@ - (void)returnToCallView
18751988
{
18761989
[self removeCallStatusBar];
18771990

1878-
// FIXME GFO check whether self.window.rootViewController may present the call
18791991
[self.window.rootViewController presentViewController:currentCallViewController animated:YES completion:^{
18801992
currentCallViewController.isPresented = YES;
18811993
}];

Vector/Assets/Images/back_icon.png

528 Bytes
Loading
1.17 KB
Loading
1.83 KB
Loading
655 Bytes
Loading

0 commit comments

Comments
 (0)