diff --git a/CHANGES.rst b/CHANGES.rst index cadc8d154..f67b47833 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,10 @@ +Changes in 0.7.11 (2019-01-08) +=============================================== + +Improvements: +* Upgrade MatrixKit version (v0.9.3). +* Fix almost all the warnings caused by -Wstrict-prototypes, thanks to @fridtjof (PR #2155). + Changes in 0.7.10 (2019-01-04) =============================================== diff --git a/Podfile b/Podfile index f3dc7e7c4..4dc3be87d 100644 --- a/Podfile +++ b/Podfile @@ -9,7 +9,7 @@ source 'https://github.com/CocoaPods/Specs.git' # Different flavours of pods to MatrixKit # The current MatrixKit pod version -$matrixKitVersion = '0.9.2' +$matrixKitVersion = '0.9.3' # The develop branch version #$matrixKitVersion = 'develop' diff --git a/Podfile.lock b/Podfile.lock index b4d91276f..f885f7c7c 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -44,21 +44,21 @@ PODS: - HPGrowingTextView (1.1) - libbase58 (0.1.4) - libPhoneNumber-iOS (0.9.13) - - MatrixKit (0.9.2): + - MatrixKit (0.9.3): - cmark (~> 0.24.1) - DTCoreText (~> 1.6.21) - HPGrowingTextView (~> 1.1) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixKit/Core (= 0.9.2) + - MatrixKit/Core (= 0.9.3) - MatrixSDK (= 0.12.1) - - MatrixKit/AppExtension (0.9.2): + - MatrixKit/AppExtension (0.9.3): - cmark (~> 0.24.1) - DTCoreText (~> 1.6.21) - DTCoreText/Extension - HPGrowingTextView (~> 1.1) - libPhoneNumber-iOS (~> 0.9.13) - MatrixSDK (= 0.12.1) - - MatrixKit/Core (0.9.2): + - MatrixKit/Core (0.9.3): - cmark (~> 0.24.1) - DTCoreText (~> 1.6.21) - HPGrowingTextView (~> 1.1) @@ -99,8 +99,8 @@ DEPENDENCIES: - cmark - DTCoreText - GBDeviceInfo (~> 5.2.0) - - MatrixKit (= 0.9.2) - - MatrixKit/AppExtension (= 0.9.2) + - MatrixKit (= 0.9.3) + - MatrixKit/AppExtension (= 0.9.3) - MatrixSDK/JingleCallStack - MatrixSDK/SwiftSupport - OLMKit @@ -145,7 +145,7 @@ SPEC CHECKSUMS: HPGrowingTextView: 88a716d97fb853bcb08a4a08e4727da17efc9b19 libbase58: 7c040313537b8c44b6e2d15586af8e21f7354efd libPhoneNumber-iOS: e444379ac18bbfbdefad571da735b2cd7e096caa - MatrixKit: 211e18fe45b1809fc773a00ec4749aaa7c85842b + MatrixKit: af9f94f36644bc21b63b114413f7bb510506b7d1 MatrixSDK: f1f510d467d127a5f7afafaafa1554ac5d602132 OLMKit: 88eda69110489f817d59bcb4353b7c247570aa4f PiwikTracker: 42862c7b13028065c3dfd36b4dc38db8a5765acf @@ -153,6 +153,6 @@ SPEC CHECKSUMS: Reusable: 188be1a54ac0691bc66e5bb24ec6eb91971b315b WebRTC: f2a6203584745fe53532633397557876b5d71640 -PODFILE CHECKSUM: c43860700c490d04f7c96ecaa573cd991c27a3c4 +PODFILE CHECKSUM: fc0574145026734bcc9f3266b7b92f815ebf97e4 COCOAPODS: 1.6.0.beta.2 diff --git a/README.rst b/README.rst index f0dac3c12..d3d338b91 100644 --- a/README.rst +++ b/README.rst @@ -1,6 +1,10 @@ -Riot-ios +Riot-iOS ========== +.. image:: https://img.shields.io/matrix/riot-ios:matrix.org.svg?label=%23riot-ios:matrix.org + :alt: #riot-ios:matrix.org + :target: https://matrix.to/#/#riot-ios:matrix.org + Riot/iOS is an iOS Matrix client. .. image:: https://linkmaker.itunes.apple.com/images/badges/en-us/badge_appstore-lrg.svg diff --git a/Riot/AppDelegate.h b/Riot/AppDelegate.h index 305650eab..8ab291656 100644 --- a/Riot/AppDelegate.h +++ b/Riot/AppDelegate.h @@ -82,7 +82,7 @@ extern NSString *const kAppDelegateNetworkStatusDidChangeNotification; #pragma mark - Application layout handling -- (void)restoreInitialDisplay:(void (^)())completion; +- (void)restoreInitialDisplay:(void (^)(void))completion; /** Replace the secondary view controller of the split view controller (if any) with the default empty details view controller. diff --git a/Riot/AppDelegate.m b/Riot/AppDelegate.m index 5ffa69a5a..e49b0ed7b 100644 --- a/Riot/AppDelegate.m +++ b/Riot/AppDelegate.m @@ -162,7 +162,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN Completion block called when [self popToHomeViewControllerAnimated:] has been completed. */ - void (^popToHomeViewControllerCompletion)(); + void (^popToHomeViewControllerCompletion)(void); /** The listeners to call events. @@ -755,7 +755,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN #pragma mark - Application layout handling -- (void)restoreInitialDisplay:(void (^)())completion +- (void)restoreInitialDisplay:(void (^)(void))completion { // Suspend error notifications during navigation stack change. isErrorNotificationSuspended = YES; @@ -976,7 +976,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN #pragma mark -- (void)popToHomeViewControllerAnimated:(BOOL)animated completion:(void (^)())completion +- (void)popToHomeViewControllerAnimated:(BOOL)animated completion:(void (^)(void))completion { UINavigationController *secondNavController = self.secondaryNavigationController; if (secondNavController) @@ -1024,7 +1024,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN if (popToHomeViewControllerCompletion) { - void (^popToHomeViewControllerCompletion2)() = popToHomeViewControllerCompletion; + void (^popToHomeViewControllerCompletion2)(void) = popToHomeViewControllerCompletion; popToHomeViewControllerCompletion = nil; // Dispatch the completion in order to let navigation stack refresh itself. @@ -1114,6 +1114,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN } } +// "This block is not a prototype" - don't fix this, or it won't match Apple's definition - (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler { if ([identifier isEqualToString: @"inline-reply"]) @@ -3373,7 +3374,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN #pragma mark - MXKCallViewControllerDelegate -- (void)dismissCallViewController:(MXKCallViewController *)callViewController completion:(void (^)())completion +- (void)dismissCallViewController:(MXKCallViewController *)callViewController completion:(void (^)(void))completion { if (currentCallViewController && callViewController == currentCallViewController) { @@ -3467,7 +3468,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN } } -- (void)presentJitsiViewController:(void (^)())completion +- (void)presentJitsiViewController:(void (^)(void))completion { [self removeCallStatusBar]; @@ -3484,7 +3485,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN } } -- (void)jitsiViewController:(JitsiViewController *)jitsiViewController dismissViewJitsiController:(void (^)())completion +- (void)jitsiViewController:(JitsiViewController *)jitsiViewController dismissViewJitsiController:(void (^)(void))completion { if (jitsiViewController == _jitsiViewController) { @@ -3495,7 +3496,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN } } -- (void)jitsiViewController:(JitsiViewController *)jitsiViewController goBackToApp:(void (^)())completion +- (void)jitsiViewController:(JitsiViewController *)jitsiViewController goBackToApp:(void (^)(void))completion { if (jitsiViewController == _jitsiViewController) { @@ -3607,7 +3608,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN } } -- (void)presentCallViewController:(BOOL)animated completion:(void (^)())completion +- (void)presentCallViewController:(BOOL)animated completion:(void (^)(void))completion { [self removeCallStatusBar]; @@ -3936,7 +3937,7 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN { BOOL wasNewDevice = (deviceInfo.verified == MXDeviceUnknown); - void (^openDialog)() = ^void() + void (^openDialog)(void) = ^void() { NSLog(@"[AppDelegate] checkPendingRoomKeyRequestsInSession: Open dialog for %@", deviceInfo); diff --git a/Riot/Categories/MXRoom+Riot.h b/Riot/Categories/MXRoom+Riot.h index e6e4be5a0..4da7fa074 100644 --- a/Riot/Categories/MXRoom+Riot.h +++ b/Riot/Categories/MXRoom+Riot.h @@ -49,7 +49,7 @@ @param completion the block to execute at the end of the operation (independently if it succeeded or not). You may specify nil for this parameter. */ -- (void)setRoomTag:(NSString*)tag completion:(void (^)())completion; +- (void)setRoomTag:(NSString*)tag completion:(void (^)(void))completion; /** Disable all the room notifications. @@ -57,7 +57,7 @@ @param completion the block to execute at the end of the operation (independently if it succeeded or not). You may specify nil for this parameter. */ -- (void)mute:(void (^)())completion; +- (void)mute:(void (^)(void))completion; /** Set the room notifications in mention only mode. @@ -65,7 +65,7 @@ @param completion the block to execute at the end of the operation (independently if it succeeded or not). You may specify nil for this parameter. */ -- (void)mentionsOnly:(void (^)())completion; +- (void)mentionsOnly:(void (^)(void))completion; /** Enable the room notifications. @@ -73,6 +73,6 @@ @param completion the block to execute at the end of the operation (independently if it succeeded or not). You may specify nil for this parameter. */ -- (void)allMessages:(void (^)())completion; +- (void)allMessages:(void (^)(void))completion; @end diff --git a/Riot/Categories/MXRoom+Riot.m b/Riot/Categories/MXRoom+Riot.m index d507fd165..fc2533508 100644 --- a/Riot/Categories/MXRoom+Riot.m +++ b/Riot/Categories/MXRoom+Riot.m @@ -26,7 +26,7 @@ #pragma mark - Room tags -- (void)setRoomTag:(NSString*)tag completion:(void (^)())completion +- (void)setRoomTag:(NSString*)tag completion:(void (^)(void))completion { NSString* oldTag = nil; @@ -126,7 +126,7 @@ return NO; } -- (void)mute:(void (^)())completion +- (void)mute:(void (^)(void))completion { // Check the current notification mode if (self.isMute) @@ -204,7 +204,7 @@ } } -- (void)mentionsOnly:(void (^)())completion +- (void)mentionsOnly:(void (^)(void))completion { // Check the current notification mode if (self.isMentionsOnly) @@ -282,7 +282,7 @@ } } -- (void)allMessages:(void (^)())completion +- (void)allMessages:(void (^)(void))completion { // Check the current notification mode if (!self.isMentionsOnly && !self.isMute) @@ -368,7 +368,7 @@ return nil; } -- (void)addPushRuleToMentionsOnly:(void (^)())completion +- (void)addPushRuleToMentionsOnly:(void (^)(void))completion { MXNotificationCenter* notificationCenter = self.mxSession.notificationCenter; @@ -427,7 +427,7 @@ highlight:NO]; } -- (void)addPushRuleToMute:(void (^)())completion +- (void)addPushRuleToMute:(void (^)(void))completion { MXNotificationCenter* notificationCenter = self.mxSession.notificationCenter; @@ -487,7 +487,7 @@ highlight:NO]; } -- (void)removePushRule:(MXPushRule *)rule completion:(void (^)())completion +- (void)removePushRule:(MXPushRule *)rule completion:(void (^)(void))completion { MXNotificationCenter* notificationCenter = self.mxSession.notificationCenter; @@ -543,7 +543,7 @@ [notificationCenter removeRule:rule]; } -- (void)enablePushRule:(MXPushRule *)rule completion:(void (^)())completion +- (void)enablePushRule:(MXPushRule *)rule completion:(void (^)(void))completion { MXNotificationCenter* notificationCenter = self.mxSession.notificationCenter; diff --git a/Riot/Modules/Call/Views/IncomingCallView.h b/Riot/Modules/Call/Views/IncomingCallView.h index 12164d8d8..3035aebb2 100644 --- a/Riot/Modules/Call/Views/IncomingCallView.h +++ b/Riot/Modules/Call/Views/IncomingCallView.h @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN -typedef void (^IncomingCallViewAction)(); +typedef void (^IncomingCallViewAction)(void); @class MXMediaManager; @interface IncomingCallView : UIView diff --git a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.h b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.h index bfb3833b4..6d710889c 100644 --- a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.h +++ b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.h @@ -135,7 +135,7 @@ extern NSString *const kRecentsDataSourceTapOnDirectoryServerChange; Move a cell from a path to another one. It is based on room Tag. */ -- (void)moveRoomCell:(MXRoom*)room from:(NSIndexPath*)oldPath to:(NSIndexPath*)newPath success:(void (^)())moveSuccess failure:(void (^)(NSError *error))moveFailure; +- (void)moveRoomCell:(MXRoom*)room from:(NSIndexPath*)oldPath to:(NSIndexPath*)newPath success:(void (^)(void))moveSuccess failure:(void (^)(NSError *error))moveFailure; /** The current number of the favourite rooms with missed notifications. diff --git a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m index 03d6c7e0b..e228e2039 100644 --- a/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m +++ b/Riot/Modules/Common/Recents/DataSources/RecentsDataSource.m @@ -1513,7 +1513,7 @@ NSString *const kRecentsDataSourceTapOnDirectoryServerChange = @"kRecentsDataSou return nil; } -- (void)moveRoomCell:(MXRoom*)room from:(NSIndexPath*)oldPath to:(NSIndexPath*)newPath success:(void (^)())moveSuccess failure:(void (^)(NSError *error))moveFailure; +- (void)moveRoomCell:(MXRoom*)room from:(NSIndexPath*)oldPath to:(NSIndexPath*)newPath success:(void (^)(void))moveSuccess failure:(void (^)(NSError *error))moveFailure; { NSLog(@"[RecentsDataSource] moveCellFrom (%tu, %tu) to (%tu, %tu)", oldPath.section, oldPath.row, newPath.section, newPath.row); diff --git a/Riot/Modules/Integrations/Widgets/Jitsi/JitsiViewController.h b/Riot/Modules/Integrations/Widgets/Jitsi/JitsiViewController.h index e55660c77..c376f3e14 100644 --- a/Riot/Modules/Integrations/Widgets/Jitsi/JitsiViewController.h +++ b/Riot/Modules/Integrations/Widgets/Jitsi/JitsiViewController.h @@ -57,7 +57,7 @@ @param failure A block object called when the operation fails. */ - (void)openWidget:(Widget*)widget withVideo:(BOOL)video - success:(void (^)())success + success:(void (^)(void))success failure:(void (^)(NSError *error))failure; /** @@ -95,7 +95,7 @@ @param jitsiViewController the jitsi view controller. @param completion the block to execute at the end of the operation. */ -- (void)jitsiViewController:(JitsiViewController *)jitsiViewController dismissViewJitsiController:(void (^)())completion; +- (void)jitsiViewController:(JitsiViewController *)jitsiViewController dismissViewJitsiController:(void (^)(void))completion; /** Tells the delegate to put the jitsi view controller in background. @@ -103,6 +103,6 @@ @param jitsiViewController the jitsi view controller. @param completion the block to execute at the end of the operation. */ -- (void)jitsiViewController:(JitsiViewController *)jitsiViewController goBackToApp:(void (^)())completion; +- (void)jitsiViewController:(JitsiViewController *)jitsiViewController goBackToApp:(void (^)(void))completion; @end diff --git a/Riot/Modules/Integrations/Widgets/Jitsi/JitsiViewController.m b/Riot/Modules/Integrations/Widgets/Jitsi/JitsiViewController.m index ec078b8e1..aed880c8e 100644 --- a/Riot/Modules/Integrations/Widgets/Jitsi/JitsiViewController.m +++ b/Riot/Modules/Integrations/Widgets/Jitsi/JitsiViewController.m @@ -45,7 +45,7 @@ static const NSString *kJitsiServerUrl = @"https://jitsi.riot.im/"; } - (void)openWidget:(Widget*)widget withVideo:(BOOL)aVideo - success:(void (^)())success + success:(void (^)(void))success failure:(void (^)(NSError *error))failure { video = aVideo; diff --git a/Riot/Modules/Room/Settings/RoomSettingsViewController.m b/Riot/Modules/Room/Settings/RoomSettingsViewController.m index d76cd73ef..e3fcf752a 100644 --- a/Riot/Modules/Room/Settings/RoomSettingsViewController.m +++ b/Riot/Modules/Room/Settings/RoomSettingsViewController.m @@ -3226,7 +3226,7 @@ NSString *const kRoomSettingsAdvancedE2eEnabledCellViewIdentifier = @"kRoomSetti return canSetCanonicalAlias; } -- (void)shouldRemoveCanonicalAlias:(void (^)())didRemoveCanonicalAlias +- (void)shouldRemoveCanonicalAlias:(void (^)(void))didRemoveCanonicalAlias { // Prompt the user before removing the current main address [currentAlert dismissViewControllerAnimated:NO completion:nil]; diff --git a/Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.h b/Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.h index be0c082de..945507a83 100644 --- a/Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.h +++ b/Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.h @@ -43,7 +43,7 @@ @param onComplete a block called when the the dialog is closed. @return the newly created instance. */ -- (instancetype)initWithDeviceInfo:(MXDeviceInfo*)deviceInfo wasNewDevice:(BOOL)wasNewDevice andMatrixSession:(MXSession*)session onComplete:(void (^)())onComplete; +- (instancetype)initWithDeviceInfo:(MXDeviceInfo*)deviceInfo wasNewDevice:(BOOL)wasNewDevice andMatrixSession:(MXSession*)session onComplete:(void (^)(void))onComplete; /** Show the dialog in a modal way. diff --git a/Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.m b/Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.m index 2957116d9..559fb0435 100644 --- a/Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.m +++ b/Riot/Modules/RoomKeyRequest/RoomKeyRequestViewController.m @@ -21,7 +21,7 @@ @interface RoomKeyRequestViewController () { - void (^onComplete)(); + void (^onComplete)(void); EncryptionInfoView *encryptionInfoView; @@ -31,7 +31,7 @@ @implementation RoomKeyRequestViewController -- (instancetype)initWithDeviceInfo:(MXDeviceInfo *)deviceInfo wasNewDevice:(BOOL)theWasNewDevice andMatrixSession:(MXSession *)session onComplete:(void (^)())onCompleteBlock +- (instancetype)initWithDeviceInfo:(MXDeviceInfo *)deviceInfo wasNewDevice:(BOOL)theWasNewDevice andMatrixSession:(MXSession *)session onComplete:(void (^)(void))onCompleteBlock { self = [super init]; if (self) diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 04acf5dc6..cd55bd79f 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -132,7 +132,7 @@ enum { #define SECTION_TITLE_PADDING_WHEN_HIDDEN 0.01f -typedef void (^blockSettingsViewController_onReadyToDestroy)(); +typedef void (^blockSettingsViewController_onReadyToDestroy)(void); @interface SettingsViewController () diff --git a/Riot/SupportingFiles/Info.plist b/Riot/SupportingFiles/Info.plist index f4fb1ea3e..394933f9c 100644 --- a/Riot/SupportingFiles/Info.plist +++ b/Riot/SupportingFiles/Info.plist @@ -17,11 +17,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.7.10 + 0.7.11 CFBundleSignature ???? CFBundleVersion - 0.7.10 + 0.7.11 ITSAppUsesNonExemptEncryption ITSEncryptionExportComplianceCode diff --git a/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.h b/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.h index 677fcf173..b8a50f7e4 100644 --- a/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.h +++ b/RiotShareExtension/Modules/Share/Listing/RoomsListViewController.h @@ -20,6 +20,6 @@ @interface RoomsListViewController : MXKRecentListViewController -@property (copy) void (^failureBlock)(); +@property (copy) void (^failureBlock)(void); @end diff --git a/RiotShareExtension/Modules/Share/ShareViewController.m b/RiotShareExtension/Modules/Share/ShareViewController.m index 3e7f247e1..6f6b785f7 100644 --- a/RiotShareExtension/Modules/Share/ShareViewController.m +++ b/RiotShareExtension/Modules/Share/ShareViewController.m @@ -114,7 +114,7 @@ NSArray *titles = @[NSLocalizedStringFromTable(@"title_rooms", @"Vector", nil) , NSLocalizedStringFromTable(@"title_people", @"Vector", nil)]; - void (^failureBlock)() = ^void() { + void (^failureBlock)(void) = ^void() { [self dismissViewControllerAnimated:YES completion:^{ [[ShareExtensionManager sharedManager] terminateExtensionCanceled:NO]; }]; diff --git a/RiotShareExtension/SupportingFiles/Info.plist b/RiotShareExtension/SupportingFiles/Info.plist index af4f7ad4b..c96f21578 100644 --- a/RiotShareExtension/SupportingFiles/Info.plist +++ b/RiotShareExtension/SupportingFiles/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.7.10 + 0.7.11 CFBundleVersion - 0.7.10 + 0.7.11 NSExtension NSExtensionAttributes diff --git a/SiriIntents/Info.plist b/SiriIntents/Info.plist index 6d62b7e83..6446b4502 100644 --- a/SiriIntents/Info.plist +++ b/SiriIntents/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 0.7.10 + 0.7.11 CFBundleVersion - 0.7.10 + 0.7.11 NSExtension NSExtensionAttributes