Skip to content

Commit

Permalink
[feature/fp-series-2] File Provider improvements (#167)
Browse files Browse the repository at this point in the history
* - Minor memory optimizations - Updated to latest SDK

* - Save changes prior to merge with master

* - Convert to Swift 4.2

* - Further Swift 4.2 changes

* - Update to latest SDK develop commit

* - Adapting APP to latest SDK changes
	- maintenance mode support
	- replacing uses of reachability monitor with OCCore.connectionStatus

* - Added back ownCloudUI.framework to copy phase of ownCloud target
- Updated to latest SDK

* - Add support for OCLogToggle in Settings
- App now logs current log settings at launch

* - Fix issues in ClientQueryViewController related to UITableView not reloading when its view controller is not "visible":
	- no longer uses items from table view cells to initiate actions
	- detects if UITableView.reloadData is set to do nothing and repeats the call in viewWillAppear
- The fixed issue was causing #178 and possibly others

* - Remove last traces of OCMocking.framework from ownCloud app target, make sure it's only built, linked to and copied in the ownCloudTests target

* - Fix EarlGrey/CocoaPods workspace / build errors

* - Adopt new OCLogger tags APIs in Log.swift and FileProviderExtension

* - Update SDK

* - Remove superfluous [FP] from log message

* - Make sure DisplayViewController uses the updated version of an item after downloading it instead of the (now) outdated original version

* - Update to latest SDK

* - Fixing thumbnail aspect ratio and removing duplicate code in NamingViewController (#141)

* - Update SDK

* - Exit editing mode in the server list when the user selects an existing or adds a new bookmark (as reported by @mneuwert)

* - Adapt app code base to change in OCError Swift conversion (following OCErrorAuthorizationCancelled typo correction)

* - Fix #152: if the user cancels OAuth2, an error is no longer shown (and errors are better to read with recent SDK updates)

* - Update to latest SDK

* - Make ProgressSummarizer only consider Progress objects with descriptions, resolving "ghost" progress bars without any information in them

* - Adapt to change of name of OCConnectionIssue to OCIssue

* - Update to latest SDK
- ConnectionIssueViewController
        - added option to provide a block to be called when dismissal has finished
        - normalize code formatting
- UIAlertController+OCIssue
        - added option to provide a completionHandler that's called when the user made a choice
- ClientRootViewController
        - switched issue and alert presentation to use a AsyncSequentialQueue to present them in order and not on top of each other
        - fixed a bug where a UIViewController that's in the process of being dismissed led to a failure to present alerts and issues

* - Make DisplayViewController use OCCoreOptionReturnImmediatelyIfOfflineOrUnavailable and fix a typo (#179)

* - Added priority summaries to ProgressSummarizer
- Fixed a crash bug in ImageDisplayViewController
- Removed core connection status interpretation from ClientQueryViewController
- Added core connection status tracking to ClientRootViewController and utilize priority summaries to display offline or server in maintenance mode status messages

* - Fix an issue where "Offline." was shortly shown when logging in
- Switch to utilizing short connection status descriptions coming straight from the SDK's connection signal providers
- Adapt Localizable.strings accordingly

* - Add *.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist to .gitignore

* - Updated ios-sdk

* - Made FileProviderEnumerator use an OCQuery that includes the root item (fixes #203)
- Made FileProviderExtension observe the domain property and trigger an initial query of the root directory when none has even been done before (fixes #205)

* - Adapted to latest round of nullability additions in the SDK
- Fixing potential crash bugs in DisplayHostViewController, ConnectionIssueViewController, SortMethod and others
- Update actions
	- make use of .completed() instead of calling the completionHandler directly
	- fixing multi-item support for several actions (completionHandler would previously get executed once for every item instead of once)
- ClientDirectoryPickerViewController now calls the completinHandler even on cancelation
- Cleaned up OCIssue+Extension and OCItem+Extension
- Replacing AsyncSequentialQueue with OCAsyncSequentialQueue

* - Update SDK

* - Updated ios-sdk

* - Update ios-sdk with IPC fixes

* - Adapt tests to SDK changes (all tests pass)
- Stop CocoaPods from sending statistics by adding a line to the Podfile turning this off

* - Present cache contents while waiting for a reply from the server
- Updated SDK fixing a lot of issues

* - Replacing DispatchQueue.main.async* with OnMainThread and a newly added OnMainThread(after: timeInterval)

* - Add verbose logging to FileProviderExtension to track the commands received by iOS and the results that were returned

* - Temporary workaround: make importFileFromURL: not return directly with the placeholder, but only when upload has completed - and then return the final item

* - Switching ios-sdk to updated master branch
  • Loading branch information
felix-schwarz authored and jesmrec committed Jan 23, 2019
1 parent 19ceb9f commit 0b19d6d
Show file tree
Hide file tree
Showing 45 changed files with 444 additions and 304 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ playground.xcworkspace
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcworkspace/contents.xcworkspacedata
*.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
/*.gcno
*.xcworkspacedata
*.xcuserdata
Expand Down
4 changes: 3 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

target 'ownCloudTests' do
project 'ownCloud'

use_frameworks! # Required for Swift Test Targets only
inherit! :search_paths # Required for not double-linking libraries in the app and test targets.
pod 'EarlGrey'
end
end
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ SPEC REPOS:
SPEC CHECKSUMS:
EarlGrey: 7515b05c7f448374ad7ca2c454f3ea566fcb1a2f

PODFILE CHECKSUM: 9de74386bc9cfbd23b086eff3507630b400b4518
PODFILE CHECKSUM: 290710f64940713341c1d0a5e2bd003b7ce27279

COCOAPODS: 1.5.3
2 changes: 1 addition & 1 deletion ios-sdk
Submodule ios-sdk updated 92 files
+3 −0 doc/CONFIGURATION.md
+60 −16 ownCloudSDK.xcodeproj/project.pbxproj
+8 −1 ownCloudSDK/Categories/Foundation/NSURL+OCURLNormalization.m
+1 −0 ownCloudSDK/Connection/OCConnection+Compatibility.m
+8 −0 ownCloudSDK/Connection/OCConnection+Setup.m
+9 −0 ownCloudSDK/Connection/OCConnection.h
+69 −44 ownCloudSDK/Connection/OCConnection.m
+2 −0 ownCloudSDK/Connection/OCConnectionQueue.h
+48 −5 ownCloudSDK/Connection/OCConnectionQueue.m
+2 −0 ownCloudSDK/Connection/OCConnectionRequest.h
+23 −2 ownCloudSDK/Connection/OCConnectionRequest.m
+0 −0 ownCloudSDK/Core/Connection Status/Maintenance Mode/OCCoreMaintenanceModeStatusSignalProvider.h
+0 −0 ownCloudSDK/Core/Connection Status/Maintenance Mode/OCCoreMaintenanceModeStatusSignalProvider.m
+32 −0 ownCloudSDK/Core/Connection Status/Network Path Monitor/OCCoreNetworkPathMonitorSignalProvider.h
+149 −0 ownCloudSDK/Core/Connection Status/Network Path Monitor/OCCoreNetworkPathMonitorSignalProvider.m
+37 −0 ownCloudSDK/Core/Connection Status/OCCore+ConnectionStatus.m
+1 −0 ownCloudSDK/Core/Connection Status/OCCoreConnectionStatusSignalProvider.h
+9 −0 ownCloudSDK/Core/Connection Status/OCCoreConnectionStatusSignalProvider.m
+0 −0 ownCloudSDK/Core/Connection Status/Reachability/OCCoreReachabilityConnectionStatusSignalProvider.h
+2 −2 ownCloudSDK/Core/Connection Status/Reachability/OCCoreReachabilityConnectionStatusSignalProvider.m
+0 −0 ownCloudSDK/Core/Connection Status/Reachability/OCReachabilityMonitor.h
+0 −0 ownCloudSDK/Core/Connection Status/Reachability/OCReachabilityMonitor.m
+3 −1 ownCloudSDK/Core/ItemList/OCCore+ItemList.h
+185 −101 ownCloudSDK/Core/ItemList/OCCore+ItemList.m
+87 −49 ownCloudSDK/Core/ItemList/OCCoreItemListTask.m
+1 −0 ownCloudSDK/Core/OCCore+Internal.h
+2 −1 ownCloudSDK/Core/OCCore+ItemUpdates.h
+69 −46 ownCloudSDK/Core/OCCore+ItemUpdates.m
+12 −5 ownCloudSDK/Core/OCCore.h
+305 −55 ownCloudSDK/Core/OCCore.m
+6 −0 ownCloudSDK/Core/Sync/Actions/CopyMove/OCSyncActionCopyMove.h
+185 −27 ownCloudSDK/Core/Sync/Actions/CopyMove/OCSyncActionCopyMove.m
+2 −1 ownCloudSDK/Core/Sync/Actions/CreateFolder/OCSyncActionCreateFolder.m
+3 −0 ownCloudSDK/Core/Sync/Actions/Delete/OCSyncActionDelete.m
+1 −1 ownCloudSDK/Core/Sync/Actions/OCSyncAction.m
+2 −1 ownCloudSDK/Core/Sync/Actions/Update/OCSyncActionUpdate.m
+8 −0 ownCloudSDK/Core/Sync/Actions/Upload/OCSyncActionUpload.m
+4 −0 ownCloudSDK/Core/Sync/OCCore+SyncEngine.h
+75 −36 ownCloudSDK/Core/Sync/OCCore+SyncEngine.m
+3 −0 ownCloudSDK/Core/Sync/Record/OCSyncRecord.h
+7 −0 ownCloudSDK/Core/Sync/Record/OCSyncRecord.m
+4 −4 ownCloudSDK/Core/Thumbnails/OCCore+Thumbnails.m
+7 −3 ownCloudSDK/Errors/NSError+OCError.h
+1 −1 ownCloudSDK/Errors/OCHTTPStatus.h
+25 −0 ownCloudSDK/Errors/OCHTTPStatus.m
+27 −19 ownCloudSDK/Events/OCEvent.h
+68 −4 ownCloudSDK/Events/OCEvent.m
+9 −5 ownCloudSDK/Events/OCEventTarget.h
+9 −6 ownCloudSDK/File Handling/OCFile.h
+21 −17 ownCloudSDK/Issues/OCIssue.h
+1 −1 ownCloudSDK/Item/Images/OCImage.h
+25 −0 ownCloudSDK/Item/Images/OCImage.m
+1 −1 ownCloudSDK/Item/Images/OCItemThumbnail.h
+32 −11 ownCloudSDK/Item/Images/OCItemThumbnail.m
+35 −28 ownCloudSDK/Item/OCItem.h
+63 −0 ownCloudSDK/Item/OCItem.m
+3 −0 ownCloudSDK/Logging/OCLogger.m
+3 −0 ownCloudSDK/OCMacros.h
+15 −11 ownCloudSDK/Query/OCQuery.h
+13 −2 ownCloudSDK/Resource Management/OCBookmarkManager.m
+8 −2 ownCloudSDK/Resource Management/OCCoreManager.h
+51 −1 ownCloudSDK/Resource Management/OCCoreManager.m
+6 −0 ownCloudSDK/Resources/en.lproj/Localizable.strings
+17 −13 ownCloudSDK/Security/OCCertificate.h
+6 −2 ownCloudSDK/Security/OCKeychain.h
+34 −0 ownCloudSDK/Toolkit/OCAsyncSequentialQueue.h
+112 −0 ownCloudSDK/Toolkit/OCAsyncSequentialQueue.m
+2 −0 ownCloudSDK/Toolkit/OCIPNotificationCenter.h
+61 −0 ownCloudSDK/Toolkit/OCIPNotificationCenter.m
+2 −1 ownCloudSDK/Toolkit/OCKeyValueStore.h
+23 −3 ownCloudSDK/Toolkit/OCKeyValueStore.m
+6 −1 ownCloudSDK/Toolkit/OCProcessManager.h
+36 −0 ownCloudSDK/Toolkit/OCProcessManager.m
+4 −0 ownCloudSDK/Toolkit/OCProcessSession.h
+26 −0 ownCloudSDK/Toolkit/OCProcessSession.m
+1 −1 ownCloudSDK/Vaults/Database/OCDatabase+Schemas.h
+35 −5 ownCloudSDK/Vaults/Database/OCDatabase+Schemas.m
+7 −1 ownCloudSDK/Vaults/Database/OCDatabase.h
+143 −4 ownCloudSDK/Vaults/Database/OCDatabase.m
+20 −13 ownCloudSDK/Vaults/OCVault.h
+13 −1 ownCloudSDK/Vaults/OCVault.m
+4 −2 ownCloudSDK/ownCloudSDK.h
+101 −0 ownCloudSDKTests/BookmarkManagerTests.m
+12 −0 ownCloudSDKTests/CertificateTests.m
+39 −2 ownCloudSDKTests/ConnectionTests.m
+128 −0 ownCloudSDKTests/CoreManagerTests.m
+125 −11 ownCloudSDKTests/CoreSyncTests.m
+198 −0 ownCloudSDKTests/CoreTests.m
+115 −0 ownCloudSDKTests/MiscTests.m
+5 −0 ownCloudSDKTests/OCTestTarget.h
+23 −0 ownCloudSDKTests/OCTestTarget.m
+2 −0 ownCloudUI/Certificate Metadata/OCCertificateDetailsViewNode.m
1 change: 1 addition & 0 deletions ownCloud File Provider/FileProviderEnumerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ - (void)_startQuery
{
// Start query
self->_query = [OCQuery queryForPath:queryPath];
self->_query.includeRootItem = YES;
self->_query.delegate = self;

@synchronized(self)
Expand Down
17 changes: 17 additions & 0 deletions ownCloud File Provider/FileProviderExtension.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,20 @@

@end

#define FPLogCmdBegin(command, format,...) \
NSString *actionLogCmdUUID = nil; \
NSArray *actionLogTags = nil; \
if (OCLogger.logLevel <= OCLogLevelDebug) \
{ \
actionLogCmdUUID = NSUUID.UUID.UUIDString; \
actionLogTags = @[command, @"FPAction", OCLogTagTypedID(@"CmdUUID", actionLogCmdUUID) ]; \
\
[[OCLogger sharedLogger] appendLogLevel:OCLogLevelDebug functionName:@(__PRETTY_FUNCTION__) file:@(__FILE__) line:__LINE__ tags:OCLogAddTags(self,actionLogTags) message:format, ##__VA_ARGS__]; \
} \

#define FPLogCmd(format,...) \
if (OCLogger.logLevel <= OCLogLevelDebug) \
{ \
[[OCLogger sharedLogger] appendLogLevel:OCLogLevelDebug functionName:@(__PRETTY_FUNCTION__) file:@(__FILE__) line:__LINE__ tags:OCLogAddTags(self,actionLogTags) message:format, ##__VA_ARGS__]; \
} \

Loading

0 comments on commit 0b19d6d

Please sign in to comment.