Skip to content

Commit

Permalink
[release/11.5] Release 11.5 (#79)
Browse files Browse the repository at this point in the history
* - NSString+OCPath: properties for
	- recognizing normalized paths
	- recognizing unnormalized / malformed paths
- OCCore
	- absence of parent items is now used as indication that a sub item of the absent parent item does not exist
	- [OCCore trackItemAtPath:trackingHandler:] now returns OCErrorUnnormalizedPath when passing unnormalized paths (containing f.ex. "//", "." or "..")
- new tests covering the new & improved functionality

* - add additional unit testing for NSString+OCPath isUnnormalizedPath

* OAuth2/OIDC improvements:
- adds additional parameters to token request to ensure the retrieval of a refresh_token in case the OIDC provider isn't configured to this by default
- improve URL construction for absolute URLs (avoid leading double-slash)
- add new -[OCAuthenticationMethodOAuth2 retrieveEndpointInformationForConnection:] method to dynamically retrieve endpoints if needed (like for OIDC)

* - Remove work in progress from README.md

* - reduce amount logged for OCSQLiteDB background tasks
- add additional details to OCHTTPPipeline logging
- remove unused source code (OCWaitConditionPendingRequest)

* OCConnection:
- disabling background NSURLSession usage for apps running under iOS 13.1+ and having a FileProvider
- add auto-resume flag when downloading files

OCHTTPPipeline:
- add support for auto-resume of downloads

* OCCore: add sync record versioning + caching to avoid unnecessary deserialization overhead

* Fix typo

* Support for customizing the User-Agent via MDM, new default User-Agent:
- updated `CONFIGURATION.md` to document the change
- OCAppIdentity: added appVersion and appBuildNumber properties
- UIDevice+ModelID: category allowing to retrieve the device's model identifier
- OCHTTPPipeline:
	- OCHTTPPipeline.userAgent builds, caches and returns the User-Agent
	- injects User-Agent into requests before sending them out
	- new OCClassSettingsIdentifierHTTP and OCHTTPPipelineSettingUserAgent
- OCDatabase: removed leftover debug message

* - OCKeyValueStore: add NSSet class to OCKeyValueStore.fallbackClasses

* OCKeyValueStorage:
- add ability to register classes for keys globally (use this sparingly)
- avoid unneeded deserializations when notifying observers of new values: if there's no observer for a key, there's no need to deserialize it

OCProcessManager:
- make property-like method sharedProcessManager an actual property

* - Introducing new OCFeatureAvailability.h file to manage feature availability across supported platforms
	- Adapt code to compile File Provider support code only on iOS and Mac Catalyst

* - added pluggable OCAuthenticationMethodOAuth2.browserSessionClass that's used in startAuthenticationSession
	- added new OCAuthenticationBrowserSession class to allow plugging in alternative OAuth2 session providers
		- added OCAuthenticationBrowserSessionUIWebView as an implementation based on UIWebView, available right in the SDK as an option to work around issues in certain MDM software
	- added new OCClassSettings parameter "oa2-browser-session-class" to specify a class to use as alternative OAuth2 session providers
		- use "oc:authentication-oauth2.oa2-browser-session-class=string:UIWebView" as environment variable to use the OCAuthenticationBrowserSessionUIWebView class for OAuth2
	- added OC_FEATURE_AVAILABLE_AUTHENTICATION_SESSION availability macro

- add tvOS target and devices to ownCloudSDK target
	- fix dependencies and availability issues

* - Change openssl.framework build option to require that only extension-compatible APIs may be used (which silences a warning about this not being the case in a version of ownCloudApp with OCLicense*)

* OCCore improvements:
- SyncEngine: add preflight completion handler support
- LocalImport: make sure the placeholder completion handler is only called *after* the placeholder item is also in the database (fixes https://github.com/owncloud/enterprise/issues/3642)
- CreateFolder: make sure the placeholder completion handler is only called *after* the placeholder item is also in the database (for future-proofing / consistency)

* - OCCore+Sharing: fixing infinite loop for share query polling
- OCItem: add -syncActivityDescription to provide a description of the OCItem sync activity contents

* OCSyncAction:
- adding .latestVersionOfLocalItem convenience attribute that retrieves (and caches) the latest version of an item

OCSyncActionUpload:
- use .latestVersionOfLocalItem instead of .localItem to fix an issue where a file was added offline, then updated offline, so that the activeSyncRecords of the OCItem got inconsistent:
	- upload file -> item has activeSyncRecord A
	- update file -> item has activeSyncRecords A, B
	- A: actually upload file -> item has no activeSyncRecords
	- B: actually update file -> item has activeSyncRecords A, spinning forever
- fix related issue that preflight could add a placeholder item to the database more than once, by only adding the placeholder as a new item if it has no databaseID yet

* Add Private Link resolution support:
- OCConnection
	- new method to retrieve the path for a private link
- OCError
	- two new error codes indicating private link formatting or resolution errors
- OCCore
	- new method to retrieve the OCItem for a private link
	- make trackItem method more robust when targeting directories with non-OCPath-conforming paths (missing a trailing "/")
- OCItem+OCXMLObjectCreation
	- add support for extracting resolved private link paths
- Unit Tests
	- 4 new unit tests for the new OCConnection and OCCore methods

* - make OCActivityIdentifier an enum
- expose background change scan activity via OCActivityIdentifierPendingServerScanJobsSummary activity identifier

* OCBookmark/OCBookmarkManager:
- new OCBookmarkUserInfoKey type for OCBookmark.userInfo keys
- new OCBookmarkUserInfoKeyStatusInfo key holding the status.php contents of the last valid & non-maintenance connection to a server
- replace left-over usage of NSUUID* with OCBookmarkUUID in OCBookmarkManager

OCConnection:
- update OCBookmark.userInfo[OCBookmarkUserInfoKeyStatusInfo] on every successful connect

* OCAuthenticationMethodOpenIDConnect: allow redirect-uri to be configured via ClassSettings/MDM

* OCAuthenticationMethodOpenIDConnect:
- add "email" to scope
- make scope configurable via ClassSettings
- document `oidc-scope` in CONFIGURATION.md

* - NSError+OCNetworkFailure:
	- NSError category to simplify detecting NSErrors representing a network error/network failure
- OCConnection:
	- new OCConnection.authSignals that authentication methods can use to schedule their requests - allows the core to define conditions for these
- OCAuthenticationMethodOAuth2:
	- change token refresh to wait for network availability before sending token requests
	- taking advantage of new OCConnection.authSignals
	- fixing an unnecessary scheduling loop when no network connection is available and the token needs to be refreshed
- OCCore:
	- add new ready state (OCCoreStateReady) that is reached after setting up the infrastructure but before contacting the server
	- work around compiler bug in -[OCCore stopQuery:] that could crash the app
- OCCore+ConnectionStatus:
	- add new network available signal (OCConnectionSignalIDNetworkAvailable)
	- (re)starts background update checks and item task list scheduling when the connection is coming online
- OCCoreServerStatusSignalProvider:
	- allow providing the exact error when reporting that the connection was refused
	- uses the localizedDescription of the error as .shortDescription, if available
- OCCore+ItemList:
	- faster duplicate scheduled task detection
	- ensure OCQuerys are updated promptly even if there's already an item list task for the same path, resulting in queueing
	- fix bug that could permanently halt the item list task scheduling queue when offline
	- re-attempt update of item list tasks that failed and were put back in "new" state
	- ensure thread-safe use of _itemListTasksByPath
	- fix bug that led to deletion of scheduled background scans when offline
	- ensure scheduled background scans only take place when network is available (utilizing new OCConnectionSignalIDNetworkAvailable)
	- detect and avoid duplicate scheduling of jobs
- OCCoreItemListTask:
	- add new updateIfNew method to update only those sets whose state is "new"
	- add support for injecting required signal options depending on whether a PROPFIND is scheduled for a query or background scan

* - OCCore+ItemList: instead of reusing an existing item list task's cache results, fetch new results in the event of a duplicate request, to ensure result consistency

* - OCWaitConditionMetaDataRefresh: a new wait condition that pauses a sync action until the metadata of an item changes or the item becomes unavailable
- OCEvent: new wakeup event (OCEventTypeWakeupSyncRecord) for use in wait conditions to wake up the Sync Engine
- OCCore+SyncEngine: new convenience method to create and send a wakeup event
- OCSyncActionDownload: improved handling of error 412
	- triggers a rescan of the enclosing directory to get up-to-date metadata to base future download retries on
	- adds a metadata refresh wait condition to pause the download until the metadata is up-to-date again
	- checks for versions of the item to download newer than the archived version the download was scheduled with - and updates itself if necessary
	- uses timeouts and a retry counter to avoid infinite retries in environments with frequent updates
	- provide an improved error message to the user if the error can't be resolved internally

* - Fix issues found by static analyzer

* - Fix shutdown-blocking retain loop for -[OCCore reloadShareQuery:] and -[OCCore _pollForSharesWithScope:item:completionHandler:]

* - OCConnection+Sharing: replace raw HTTP status codes with respective enums
- OCConnection: provide better error message for HTTP status code 403 (DAV error message + fallback message)

* - ensure OCConnectionSignalIDNetworkAvailable is initially set after starting the core, ensuring that OAuth2 token refresh is carried out if the OCCore is started with an expired OAuth2 token

* - OCSyncActionDownload:
	- descheduling now uses the latest version of the local item to remove its ID and download status (fixing a possible status corruption issue)
	- descheduling now replaces the latest version of the local item with a newer remote version if one exists
	- correct handling of items removed, changed, moved and renamed between initiating the download and starting it (better error 412 handling)
- OCSyncActionUpload:
	- now uses LocalID-based -latestVersionOfLocalItem instead of path-based -retrieveLatestVersionOfItem:withError:
- OCWaitConditionMetaDataRefresh
	- add support for detecting path and name changes
	- fix OCCore retain cycle in tracking block
- OCCore: fix possible retain cycle in -trackItem: (occurred when timed extremely badly)

* - ensure sync records are updated in the database if wait conditions return a "Wait" state (ensuring important context info in OCWaitConditionSyncIssue is stored/preserved), fixing finding (3) in ownloud/ios-app#632

* - add nullability annotations to OCCore+SyncEngine and remove unused method

* - OCClaim
	- introduce concept of OCClaimLockTypes to express intent and more fine-grained control of *how* to hold onto a file
- OCCore
	- -registerUsageOfItem:completionHandler: changes:
		- attempt to retrieve the latest version of an item from the cache before updating .lastUsed
		- do not update item.lastUsed date unless the lastUsed date is older than 5 seconds to reduce load on the Sync Engine
- OCCore+ItemUpdates
	- implement support for different OCClaimLockTypes
	- take advantage of now available in-place updates via download
	- more readable/clearer log messages when local copies get removed due to newer copies on the server
- OCSyncActionDownload
	- add support for in-place updates of a file by downloading a newer version
	- preserve, not overwrite claims stored in item.fileClaim
- OCCore+SyncEngine
	- add new method -[OCCore retrieveLatestVersionForLocalIDOfItem:error:] to synchronously retrieve an item by local ID
- OCSyncActionUpdate
	- switch to using -[OCCore retrieveLatestVersionForLocalIDOfItem:error:]

* - fixing typo

* - OCCore: fix missing -endActivity in -registerUsageOfItem: while also simplifying code
- OCSyncActionUpload: remove redundant code (same operation performed by prepareToReplace: a few lines down)
- OCSyncActionDownload: add additional debug output and fetch latest version of item by localID rather than path

* - move code to delete or refresh outdated local copies from OCCore+ItemUpdates to a proper policy: OCItemPolicyProcessorVersionUpdates
- update unit tests for new OCClaimLockType API
- update demo-cert-new.cer and CertificateTests.m to make the certificate unit tests pass again
- note: unit tests couldn't all be run at this time as demo.owncloud.org seems to only return internal server errors at the time of testing

* - Initial commit of message queue feature

* - Fixes and first time working integration with OCCore

* - rewrote and moved concept from OCMessageQueue.h to doc/concepts/MessageQueue.md
- make OCMessageQueue.enqueue synchronous

* - OCMessageQueue
	- add support for OCMessageAutoResolver to allow automatic message resolution
		- OCCore+MessageAutoresolver provides support for auto-resolving past auth errors
		- update MessageQueue.md with updated thoughts
	- fix lockingProcess validation bug
- OCProcessManager
	- add log tags and debug output for process-ping-pong
	- bugfix: the directory where process state tracking files were placed was not created
	- bugfix: OCProcessPing wasn't sending out a ping notification
- OCKeyValueStore: add missing IPC updateNotification handling
- Add "timestamp" support
	- OCHTTPResponse.date now contains the date a response was received
	- OCHTTPPipelineTaskMetrics.responseStartDate stores the date a response started to be received
	- OCHTTPPipelineTask: use OCHTTPPipelineTaskMetrics.responseStartDate if available to accurately determine OCHTTPResponse.date
	- OCHTTPPipeline: add response.date to debug output for responses
	- NSError+OCError: add support for an "NSError.errorDate"; provide macros and methods to easily add errorDate information to NSErrors; formally clean up OCError*Key types
	- OCConnection: use OCHTTPResponse.date where possible to provide errorDates for NSErrors
	- OCAuthenticationMethod: provide NSError.errorDate wherever possible

* - OCAuthenticationMethodOpenIDConnect: add "profile" to list of default scopes

* - OCKeyValueStore: fix cross-process change notification (previously defunct)
- OCProcessManager
	- fix ping/pong mechanism to detect if another process is still running
	- fix creation of directory for process tracking files

* OCAuthenticationMethodOpenIDConnect: add `profile` to list of scopes requested by the auth method, for ocis-oidc compatibility

* - OCProcessPing: fix retain-cycle (due to logging) and add early unsubscribe from pongs

* - OCCore: explicitely copy queued block in queueBlock: to make sure its properly retained
- OCCore+SyncEngine: add detection of missing and defunct remote cores (in other processes) that could previously lead to sync records not getting processed as one process expected another process to process the record, while it wasn't really clear the other process was even listening for the event at this point
- OCProcessManager: remove redundant code

* - SyncEngine: add -renewActiveProcessCoreRegistration and make sure active process core registrations are re-added if one was erroneously removed previously

* - OCSyncIssueTemplate
	- new template mechanism for sync issues
	- provides metadata to allow f.ex. issue grouping and user notification actions
	- global registration and lookup
- OCSyncIssue
	- add methods to add autoChoiceErrors to choices generated from templates
- OCSyncAction
	- make .identifier a class-level property
	- add APIs to support OCSyncIssueTemplate
		- actionIssueTemplates: action-specific issue templates
		- issueTemplates: combines auto-generated issue templates and action-specific issue templates
	- migrated -_addIssueForCancellationAndDeschedulingToContext:title:description:impact: from OCCore to OCSyncAction, utilizing auto-generated issue templates
	- OCSYNCACTION_REGISTER_ISSUETEMPLATES macro to register issue templates at SDK load time
- OCSyncActionCopyMove
	- split up into OCSyncActionCopy and OCSyncActionMove to have unique classes for both action identifiers
- all OCSyncActions: switch creation of OCSyncIssues to using templates
- OCMessage
	- new properties for categories and threads
- OCMessageQueue
	- new method to retrieve message by UUID

* - MessageQueue.md: updated with latest additions
- OCSyncActionUpload: add missing identifier values
- OCMessage
	- added .removed property to allow keeping messages around until they can be removed from storage
	- added presentation* properties to support the delivery of end notifications
- OCMessageQueue
	- added support for end notifications
	- added new method to manually present a message through a presenter
	- added OCMessageRemovedNotification notification that's broadcasted on all running processes whenever a message is removed from the queue
	- added tracking of active presentations
- OCMessagePresenter
	- new OCMessagePresentationResult result for the completion of a presentation to indicate requirements for calls to -endPresentationOfMessage:
	- refactor and add -endPresentationOfMessage: method
- OCWaitConditionIssue: removed old issue handling code (which was already commented out)
- code cleanup

* - OCRunLoopThread
	- better handling of situations where there's more than one NSThread object for a thread
	- new method to determine if a runloop thread is the current thread
- OCDatabase
	- added additional logging
	- fixed crash in event queuing if an insert fails
- OCSQLiteDB
	- use OCRunLoopThread.isCurrentThread to determine if the current thread is the SQLite thread

* OCAuthenticationMethod: fix potential undefined behaviour in updating _cachedAuthenticationSecret if updates happen in quick succession

* - OCAuthenticationMethod: add additional logging around local and remote auth secret change notifications and clarify method names
- OCAuthenticationMethodOAuth2: add additional logging around authentication data updates following token refreshes
- OCBookmarkManager:
	- add support for IPC list change notifications
	- add new -updateBookmark: method to allow clients to signal updates of bookmarks to the bookmark manager (triggers notifications and saving)

* - added debug logging to OCKeychain

* - OCBookmark: flush locally cached copy of .authenticationData if it is changed on another process (via IPC notification)

* - OCBookmark: extend authentication data flushing to app / extension resigning active status for improved security (free local copy in memory) and consistency (IPC notifications might not be delivered while app is in background)

* - remove OCBookmarkManager.updatedBookmark; please use OCBookmarkManager.updateBookmark with additional safeguarding instead

* - OCTypes
	- OCFileIDUniquePrefix is a new type representing the unique fileID prefix of an item on the server. Background is that OC 10 FileIDs are composed of an 8-digit (%08ld) number and the server's ID (apparently identical across files). That number is unique for every file and also used as the number component in OC10 private links. By using a prefix here, it's possible to support both OC10-style fileID prefixes as well as future full-length fileIDs for searching for items.
and FileIDUnique.
- NSURL+OCPrivateLink
	- extracts private link FileIDs from private link URLs
	- extracts and converts private link FileIDs to a OCFileIDUniquePrefix, which can be used to retrieve an item from the cache
- OCCore+Sharing
	- support for local retrieval/lookup of the item for a private link using the OCFileIDUniquePrefix returned for the private link
	- additional debug logging
- OCConnection+Sharing: added PROPFIND to determine type (file / folder) of resolved resource
- OCCoreItemListTask: added additional debug logging
- OCDatabase: new -retrieveCacheItemForFileIDUniquePrefix:includingRemoved:completionHandler: method to retrieve an item from the cache using an OCFileIDUniquePrefix

* - update bundled version of openssl from 1.0.2q to 1.0.2t

* - update bundled version of openssl from 1.0.2t to 1.0.2u

* - fixed error reporting if token refresh responses are empty or not valid JSON

* - OCBookmark: add bookmark-specific IPC notification when authentication data is changed
- OCCore: listen for bookmark-authdata-chnaged notifications (both local & IPC) and reattempt authentication or connection if a change occurs

* - add support for OCCoreOptionLastModifiedDate option for [OCCore importFileNamed:…] and [OCCore reportLocalModificationOfItem:…], allowing to specify a custom NSDate as last modified date to use during upload

* - OCRunLoopThread: add .uuid property and new property .isCurrentThread based on UUIDs rather than the NSThread pointer
- OCSQLiteDB: use OCRunLoopThread.isCurrentThread for OCSQLiteDB.isOnSQLiteThread
- OCDatabase: add additional error logging

* - OCAuthenticationMethod: add new .authenticationDataKnownInvalidDate property to indicate when authentication has last failed using the current .authenticationData
	- OCAuthenticationMethodBasicAuth: add support for .authenticationDataKnownInvalidDate
	- OCAuthenticationMethodOAuth2: adopt .authenticationDataKnownInvalidDate property to avoid unnecessary token refreshes
	- OCCore: throttle connection attempts to at most once every three seconds if invalid authentication data is to be expected
- OCCore+ConnectionStatus: add new OCCoreConnectionStatusSignalConnecting and OCCoreConnectionStatusConnecting
	- OCCoreConnectionStatusConnecting indicates the OCCore is in the process of connecting
	- improved status change debug log messages
- NSError+OCDAVError: avoid "(null)" in error descriptions

* - OCCoreItemListTask: fix issue where new OCItems that were not previously in the cache but are targeted directly by an OCQuery regardless could be returned with a nil .parentLocalID
- OCCore+Sharing: move "else" into its own line

* - add support for translation of "Sabre\DAV\Exception\NotFound" errors into OCDAVErrorNotFound error code

* Logging improvements:
- OCLogger:
	- support for "force" logging, that is, to log a message even if its logLevel would normally exclude it from logging
	- new logging methods, keeping "old" methods for compatibility with existing app sources
	- major macro consolidation / cleanup of existing macros
	- addition of new parametrized forced logging macros
	- addition of new OCLoggingEnabled() macro
- OCHTTPPipeline
	- HTTP requests and responses are now force-logged if HTTP request/response logging is enabled

* - fix kCFRunLoopCommonModes warning

* Adding cellular access options:
- OCHTTPRequest: new .avoidCellular property controlling whether a request should not be sent over cellular (utilizing NSURLRequest.allowsCellularAccess)
- OCConnection: new OCConnectionOptionAllowCellularKey option for up- and downloads to control cellular usage for these
- OCCore: new OCCoreOptionAllowCellular option for up- and downloads to control cellular usage for these, to be passed to the import/localModification/download methods via the dictionary passed to the options parameter

* - Adding support for cellular configuration
	- OCCellularSwitch
		- represents features, areas and/or categories of transfer types
		- provides localizedName for rich representation
		- transparently stores/retrieves settings in/from user defaults
		- supports providing a maximum transfer size for each switch
	- OCCellularManager
		- provides convenient access to switches and helps determine if a transfer of a certain size is allowed for a switch
		- adds master switch to turns off all switches and/or set a maximum transfer size for all switches
	- OCItemPolicyProcessorAvailableOffline
		- adds support for new OCCellularSwitchIdentifierAvailableOffline cellular switch

* - OCCore: add OCCoreOptionDependsOnCellularSwitch option to make an up-/download's usage of cellular data conditional on the status of a particular cellular switch at the time of scheduling
- OCItemPolicyProcessorAvailableOffline: adopt OCCoreOptionDependsOnCellularSwitch
- OCSyncActionDownload + OCSyncActionUpload: add support for OCCoreOptionDependsOnCellularSwitch and default to OCCellularSwitchIdentifierMaster if none is provided, fall back on OCCoreOptionAllowCellular instead if it is provided and no OCCoreOptionDependsOnCellularSwitch is provided
- OCHTTPRequest: add additional logging to indicate when a request has been set to avoid cellular transfer

* - OCCellularManager: add support for nil identifier in -cellularAccessAllowedFor:transferSize: (falls back to master switch in that case)
- OCCore:
	- new sync action categories for wifi-only and wifi-and-cellular uploads and downloads respectively
	- adapted concurrency budgets based on new wifi-only and wifi-and-cellular categories to ensure at least one cellular up- and download can run respectively

* - OCLogger: add new option `log.log-single-lined` that breaks up multi-lined log messages into single lines (on by default)
- OCHTTP: add new option `http.prefixed-http-logging` that prefixes each line of the different parts of a HTTP request with `[info]`, `[head]` or `[body]` (on by default)
- adjust tests to use extended request/response composition methods

* - OCHTTP
	- remove `http.prefixed-http-logging` option and control that behaviour via `log.log-single-lined` instead
	- log `[header]` instead of `[head]` to allow for easier human "parsing"
- OCLogger
	- add new `log.log-maximum-message-size` option to limit the size of a log message to a maximum size (off by default)
	- OCLogWriter
		- new OCLogLineFlags: provide additional contextual information so writers can better present multi-line log messages saved as single line log messages
		- replace the separator with box drawing characters to visually group split multi line log messages

* - Add new variant of -[OCCore createFolder:…] with added placeholderCompletionHandler parameter
- fix typo in code comment

* - fix typos, cleanup and minor additions

* - disable OC_FEATURE_AVAILABLE_UIWEBVIEW_BROWSER_SESSION by default to remove UIWebView from standard versions
- add documentation to doc/CONFIGURATION.md on how to re-enable UIWebView support via preprocessor flags

* - add initial parsing support for Tus HTTP Headers and compact storage in OCItem as UInt64 bitfield

* - Add initial TUS support
	- NSString+TUSMetadata: conversion from dictionary to Upload-Metadata - and back
	- OCTUSHeader: new class to simplify parsing, building and conversion of TUS-related headers
	- OCTUSJob: new class to manage the current status of a TUS upload
	- OCTUSJobSegment: new class to abstract away file segmentation details for TUS uploads
- OCConnection:
	- add new OCConnectionDelegate method to inject/modify TUS capabilities / settings
	- add new OCConnectionOptionTemporarySegmentFolderURLKey option key to provide a temporary folder to store file segments in when performing uploads via TUS
	- add code to upload files via TUS where available
- OCSyncActionUpload: add OCConnectionOptionTemporarySegmentFolderURLKey option to ensure persistence of temporary segment files
- OCEvent:
	- add OCTUSHeader, OCTUSJob and OCTUSJobSegment to .safeClasses
	- modernize initWithCoder
- OCHTTP:
	- add OCHTTPStaticHeaderFields type and switch OCHTTPResponse over
	- add OCHTTPMethodPATCH method

* - OCCapabilities
	- add support for TUS capabilities information provided via the capabilities endpoint
- OCConnection
	- apply OCCapabilities.tusMaxChunkSize to TUS uploads if available
- OCTUSHeader
	- clarify .maximumSize is the maximum file size and add new .maximumChunkSize to supply a maximum chunk size
	- add new OCTUSCapabilityKey and OCTUSCapability types as needed by OCCapabilities

* - Cleanups and minor improvements

* OCLogger:
- add new logging format option
- implement new json and json-composed formats
- update documentation and available Xcode env vars

* OCHTTP:
- stricter MIMEType checks for content to print as text (previously also matched some xml document formats)

* - add OIDC auth method identifier to CONFIGURATION.md

* OCConnection:
- move upload code to OCConnection+Upload (Upload category)
- extend TUS support with:
	- support for creation-with-upload
	- (currently disabled) differentiation between "small" and "large" files (OCConnection.tusSmallFileThreshold) where small files (below the threshold) are uploaded with creation-with-upload, while files above the threshold are uploaded with creation + PATCH
	- improved log messages showing upload progress by including file size in addition to upload offset

* - add "TUS implementation score card" overview to OCConnection+Upload

* - fix error dating via OCErrorAddDateFromResponse for PUT uploads

* - OCCore: fix issue of infinite connection retries when hitting a certificate or redirection error
	- add new -sendError:issue: method to centralize dispatch of errors and issues to the core delegate
	- keep track of OCIssues sent out to delegates and filter out repeat issues if the identical issue before it has yet to be acted upon
	- integration with "connecting" and "reachable" connection status providers to keep the status in "connecting" until issues have been acted upon, or switch to "offline" if issues are rejected by the user
- OCIssue: add new .signature property that's guaranteed to be identical for two identical issues

* MessageQueue improvements:
- OCIssue+SyncIssue: remove unused code
- OCMessageChoice: new class (and new superclass for OCSyncIssueChoice)
- OCSyncIssueTemplate: refactor as OCMessageTemplate for general purpose usage; move from sync issues to messages
- extended OCEvent.safeClasses with OCMessage and OCMessageChoice
- OCMessage advanceds:
	- new originIdentifier property: allow handlers to easier determine if a message belongs to them
	- new representedObject property: allow custom senders of messages to attach an object or tracking info to a message that they need for handling later
	- rename .handled to .resolved for increased clarity
	- new autoRemove property: allow indication of auto-removal once .resolved, so dummy response handlers just to remove one-off messages are not needed.
	- new .localizedTitle, .localizedDescription and .choices methods that either use internally stored values or bridge to .syncIssue
	- additional initializers for non-sync-issue OCMessage creation
- OCMessageQueue: override auto-created Swift choices for add/remove methods to avoid name conflicts going forward

* - OCConnection: add new connection.force-background-url-sessions setting to force-enable background sessions in the app
- in code, change all instances of the usage of the term "master" to "main"

* - better error message construction for errors that contain their creation date

* - make OCSyncRecordActivity public

* - Remove unused code

* - clarify type of key of OCBookmark.userInfo

* - removal of iOS 11 support (including SFAuthenticationSession) and updating to iOS 12+ APIs, adaption of docs where needed
- migration from MobileCoreServices to CoreServices
- new OCNetworkMonitor class to provide centralized monitoring of the network status, incl. cellular and general availability
	- refactor OCCoreNetworkPathMonitorSignalProvider into OCCoreNetworkMonitorSignalProvider to use OCNetworkMonitor instead
- Cellular Switches improvements
	- broadcasting / cross-process propagation of cellular switch changes
	- assessment of current "live" connectivity situation to allow determining when connectivity is allowed, and if it should be flagged as WiFi-only or not
	- integration with MDM setting for cellular usage
- HTTP Pipeline advances
	- support for cellular switches at HTTP Request level via new OCHTTPRequest.requiredCellularSwitch property
		- uses OCCellularManager to determine when and how to schedule requests with the NSURLSession
	- integration with OCNetworkMonitor and OCCellularManager to run scheduling whenever the connection or a switch changes status
- OCConnection
	- add new OCConnectionOptionRequiredCellularSwitchKey option for up- and downloads
	- consolidation of cellular options - and OCConnection.allowCellular in particular
- OCCore
	- up- and download actions use OCConnectionOptionRequiredCellularSwitchKey to pass OCCoreOptionDependsOnCellularSwitch on to the connection layer
	- consolidation of available cellular options
	- status signal provider now provides more nuanced error descriptions, incl. for Network Unavailability
- various small code improvements

* - construct .well-known endpoint URLs relative to the root directory of the OC instance (as per owncloud/appliance#81) rather than the absolute root (/) URL

* - Add option to cancel uploads in addition to retrying them

* - improve error message for OCErrorAuthorizationFailed errors

* added tvOS deployment target

* - remove commented out, dead code
- add OCCoreSyncInstructionStopAndSideline to OCCore to allow making waiting for user interaction budget-neutral
- consider localID in addition to fileID when trying to identify a removed file in an existing list

* - OCConnection+Upload: return correct error code if there's no sufficient storage (previously returned "item already exists")

* - make number of background folder scan PROPFIND requests configurable (and increase from 1 to 2)

* - Fix static analyzer warnings

* - Fix static analyzer warnings

* - Fix static analyzer warnings

* OCQuery/OCCore:
- fix incorrect OCQueryStateTargetRemoved query state assignment
- fix item-based queries state initialization (+ continuous updates)
- OCQuery.description now provides a summary of item- and path-based OCQueries

* - Fix possible crash in OCAuthenticationMethodBasicAuth._decodedAuthenticationData: (owncloud/ios-app#702)

* OCCore/OCQuery: additional checks and improved handling of queries targeting folders that don't exist any longer

* - add missing nil check to OCCore+ItemList

* added a new property appDisplayName to retrieve the display name of the target

* - OCBookmark: add .certificateUserApprovalUpdateNotificationName and -postCertificateUserApprovalUpdateNotification to signal and observe changes to certificate approvals by the user that are relevant to the bookmark
- OCConnection
	- replace delegate calls originating from certificate check issues with observing .certificateUserApprovalUpdateNotificationName notifications calling the respective OCConnectionDelegate method
	- move certificate check code to OCHTTPPolicyBookmark
- OCSyncActionDownload: explicitly enable file protection / encryption for temporary and vault item directories
- OCEvent: add OCHTTPPolicy to safeClasses
- OCHTTPPipeline:
	- factoring out certificate validation delegate method into a separate OCHTTPPipelinePolicyHandler protocol
	- extend OCHTTPPipelinePartitionHandler protocol with additional instruction parameter for post processing
	- explicitly enable file protection / encryption for partition and temporary response directories
- OCVault: new .httpPipelineRootURL property for better abstraction
- OCHTTPPipelineManager
	- .backendURL now uses OCVault.httpPipelineRootURL
- OCHTTPPolicy
	- encapsulate HTTP security policies, starting with certificate validation
	- identifier makes policies identifiable (important for storage / management)
	- can be used independently from OCConnection and OCCore, allowing more HTTP handling without either and addresses an issue where badly timed OCCore shutdowns could cause a false negative certificate check result
	- implements the OCHTTPPipelinePolicyHandler protocol
- OCHTTPPolicyBookmark
	- implements an OCBookmarks HTTP policies (can also be derived from and track an OCConnection's bookmark)
- OCHTTPPolicyManager
	- keeps track of global pre- and post-processing HTTP policies that can be used to establish HTTP security policies for all requests
	- allows persisting and managing policies
	- ensures policies stay in sync across processes (via OCKeyValueStore)
	- can compile applicable policies based on OCHTTPPipelinePartitionID

* - OCHTTPPipeline
	- detect if an HTTP response likely doesn't need to be delivered on the same process and waiting for that just delays dependant other parts
	- special OCHTTPPipelineTaskAnyBundleID bundle ID to allow scheduling a HTTP request/deliver a response on any process
- OCBackgroundManager
	- fix "leak" of OCBackgroundTask objects on processes without UIApplication instances / foreground/background concept
	- perform submitted blocks immediately on processes without UIApplication instances / foreground/background concept

* - OCCore: add safeguards against IPC change notifications between core stop and deallocation

* - Reduce OCore.parallelItemListTaskCount to 1 if running in minimum memory configuration

* Reduce memory usage:
- avoid unintended capture of surrounding objects in OCHTTPPipeline, OCKeyvalueStore and OCSQLiteDB OCBackgroundTask.expirationHandlers
- nilify OCBackgroundTask.expirationHandlers in app extensions to avoid unnecessary memory waste
- use weak self reference in OCBackgroundTask.endWhenDeallocating() to allow disposal of OCBackgroundTask as soon as possible

* Further reduction of peak memory usage
- NSArray+OCSegmentedProcessing:
	- allows transformations and processing of an array of objects in chunks
- OCUser:
	- improved hash and isEqual implementations, now also taking emailAddress and forceIsRemote into account
- OCDatabase:
	- take advantage of NSArray+OCSegmentedProcessing to process item additions, changes or deletions in segments and reduce peak memory consumption
	- retrieval of items from the database maintains a cache of OCUser instances assigned to OCItem.owner and reuses identical instances, reducing peak memory consumption

* - Project: use compiler default as language standard (not gnu++14 and gnu11)
- OCHTTPPipeline: clarify optionality of instructionForFinishedTask in OCHTTPPipelinePartitionHandler
- OCUser: refine hash value
- OCCache: add clearCache method and switch memory warning handling over to it
- OCSQLite:
	- add statement caching to memory and CPU consumption, using a claim/dropClaim method duo in OCSQLiteStatement and caching in OCSQLiteDB
	- add memory statistics logging method for debugging purposes
	- add missing copyright notice
	- add debug description to OCSQLiteStatement
	- add method to flush transaction cache to disk
	- add OCSQLiteQueryString type for better source readability
- OCDatabase: add cache flushing and memory statistics logging to [add|update|remove]CacheItems methods to limit SQLite memory usage in the File Provider
- Unit tests:
	- fix HTTPPipelineTests outdated delegate definition usage

* - fix super-rare OCProcessManager.sharedProcessManager dispatch_once concurrency bug
- OCCore+CommandLocalImport: properly handle OCCoreDuplicateNameStyleNone name style
- OCSQLite: reset cached OCSQLiteStatements at the earliest possible time, to avoid file locks being held for an unnecessarily long time and avoid other processes running into busy timeouts

* [feature/diagnostic] Diagnostic support (#68)

* - OCDatabase: fix for OCEvent retrieval: no longer ignore OCProcessSession
- OCDiagnostic subsystem
	- OCDiagnosticContext provides necessary objects / context for diagnostic collection
	- OCDiagnosticSource defines a protocol that objects capable of providing diagnostic information should follow
		- implement support for OCSyncAction and OCSyncRecord
	- OCDiagnosticNode encapsulates diagnostic info as
		- info: label + content
		- action: label + a block
		- group: label + child nodes
	- built-in support to turn group nodes into Markdown/HTML
- NSArray+OCNullable: remove NSNull entries from an array

* - OCSyncIssue + OCSyncIssueChoice: now return meaningful .descriptions
- OCSyncRecord+Diagnostic: add actions to
	- trigger a Sync Engine run
	- reschedule a sync record
	- deschedule (remove) a sync record
- OCWaitCondition: add support for OCDiagnosticSource
- OCHTTPPipeline: add support for OCDiagnosticSource
- OCHTTPPipelineTask: add support for OCDiagnosticSource
- OCDiagnosticNode: add context option to OCDiagnosticNodeAction block type
- OCCore: remove commented out, obsolete code

* - OCDiagnosticNode: optimize markdown/HTML layout for better legibility, as a true hierarchy
- OCSyncRecord+Diagnostic: change labels to better accomodate the new hierarchical markdown/HTML layout

* - add OCDiagnosticNode.identifier to "tag" nodes for later retrieval
- add OCDiagnosticSource support for OCDatabase

* - add new OCScanJobActivity class to make scan status details accessible as properties
- OCCore+ItemList:
	- issue and update OCScanJobActivity instead of plain OCActivity
	- change label from "Scanning server for updates…" to "Fetching updates…" and remove scan progress counts
- OCDatabase+Diagnostic: add scheduled folder scan count to diagnostic output

* - do not count root folder in folder diagnostic counter
- added localization for diagnostic strings

* added missing localization for diagnostics

* fixed localized string

* - Add OCBookmark diagnostics support
- fix bug where OCCoreItemLists would remain in "New" state indefinitely if scheduled while the connection is unavailable

* - start implementation of cookie persistence support
- remove default cookie filtering

* localized string for wrong refresh token error message

* added missing localized string

* fixed localization string

* - Temporarily disable processSession check

* - add support for URL-relative Location header values

* OCConnection:
- add option "connection.transparent-temporary-redirect", on by default,
- add support for transparently resending requests with the new destination in response to 307 status responses pointing to the same host
- fix rescheduling bug in OCHTTPPipeline
- implement redirection test bed / unit tests in CoreRedirectTests

* - make OCHTTPRequest.effectiveURL reset part of the scrubbing for rescheduling, so that this internal handling of the value doesn't leak to other components

* ownCloudMocking:
- factor out cookie redirect simulator from CoreRedirectTests into OCHostSimulator+CookieRedirect category, so it can be used in the app, too
- add nullability annotations for OCHostSimulator

ownCloudSDK:
- OCHTTPRequest: add support for OCHTTPRequestRedirectPolicy to allow per-request control over how redirects should be handled
- OCConnection+Authentication and OCAuthenticationMethodOpenIDConnect: adopt new OCHTTPRequestRedirectPolicy
- extend transparent redirection handling to requests returning 302 (previously only 307)

ownCloudSDKTests:
- fix CertificateTests by updating demo-cert-new.cer
- replace customized OCHostSimulator in CoreRedirectTests with OCHostSimulator+CookieRedirect and slim down implementation
- add new testConnectionSetupCookieRedirect test covering setup of a new bookmark with active "cookie redirect"

* - add additional "verbose" log level and move the most notorious debug log statements that fit the category to the verbose level

* - OCDatabase: add new .thumbnailDatabaseURL property to retrieve the URL of the thumbnail database after a successful open
- OCDatabase+Diagnostic:
	- add information on database sizes
	- add option on a manual VACUUM of both the main and thumbnail database

* - OCConnection: ensure HTTP requests that are rescheduled due to redirections use different X-Request-IDs
- OCCore: additional debug message if cookie support is enabled, identifying the type of cookie storage
- OCClassSettings
	- OCClassSettingsSupport: new optional method +publicClassSettingsIdentifiers to identify which settings should be considered public information
	- OCClassSettingsSource:
		- new settingsSourceIdentifier to identify sources other than by class name
		- implementation in subclasses of OCClassSettingsFlatSource
	- new -settingsSnapshotForClasses and -settingsSummaryForClasses methods to retrieve a snapshot of settings as structured data, or as printable summary, including all values provided by sources as well as the computed value
- project: assign test to SDK framework

* - OCConnection+Upload: add force replace option
- OCSyncActionUpload:
	- add "Replace existing" option
	- implement "Replace existing" option by cancelling the existing action and scheduling a new action
	- remove previous, commented-out implementation
	- add check for pre-existing item in scheduling
	- improve error handling when internal item copying fails
	- add missing localizations

* - fix uninitialized partitionHandler pointer and resulting possible lack of policyHandlers when setting up a new connection

* - OCClassSettings
	- new method to insert additional class settings sources relative to other sources based on their OCClassSettingsSourceIdentifier
	- provider proper OCClassSettingsSourceIdentifier for OCClassSettingsFlatSourceEnvironment, OCClassSettingsFlatSourceManagedConfiguration and OCClassSettingsUserPreferences

* - added class settings support for root OCAuthenticationMethod class
- moved browser session related setting from OCAuthenticationMethodOAuth2/oa2-browser-session-class to OCAuthenticationMethod/browser-session-class
- added new browser-session-prefers-ephermal setting
- updated MDM documentation and fixed a confusing typo
- include OCAuthenticationMethod class settings in class settings overview at the start of the log

* - Fix typo

* - fix issue where the first HTTP request sent by the app did not include the desired User-Agent header

* - extend account diagnostic action "Invalidate Login Data" with the capability to invalidate OAuth2/OIDC tokens

* - OCLogger:
	- add forceSyncWrite option to force immediate writing of a log file entry
	- add new macro variants for forceSyncWrite
	- OCLogFileWriter: make LogIntro forced and use forceSyncWrite to exclude chances of rerouting

* - OCLogFileWriter: add comment to explain usage of OCPFSLog

* - address issue of (empty) log files being created even if logging is turned off, leading to empty log files and a missing LogIntro header when subsequently turning on logging
	- OCLogger: only open all log writers if logging is actually enabled
	- OCLogFileWriter: only reopen log file after rotation if logging is actually enabled
	- log files are now only written once logging is turned on and the first log message hits the file

* - OCClassSettingsUserPreferences
	- new versioned, atomic migration mechanism to perform migration tasks, aimed primarily to support atomic, safe migration from user defaults to OCClassSettingsUserPreferences, but can also be used for other purposes
- OCLogger:
	- adopt OCClassSettingsUserPreferencesSupport and handle log level setting from shared user defaults to class settings
	- use new OCClassSettingsUserPreferences versioned migration mechanism to safely migrate the setting storage

* - OCHTTPPipeline: add line "Req signals" with required signals to HTTP request and response log output

* - Host Simulator improvements
	- move OCHostSimulator from ownCloudMocking to ownCloudSDK
	- add OCHostSimulatorManager to manage host simulators added via OCExtensions
	- implement Host Simulator extensions for general 404 and download 500 responses
	- allow configuration of host simulators via class settings
- Bookmark improvements
	- store metadata on when and with which app version a bookmark was created
- Connection improvements
	- NSError+OCDAVError: add support for sabre/DAV messages of "s:header" type; add new OCDAVErrorItemDoesNotExist error code
	- download: improve handling of 404 and 412 errors (including 412-specific differentiation between different versions and lack of file)
	- add new test for 412+ special error message handling
- Message Queue improvements
	- add support for muted messages, which are queued but not individually presented
- Core / Sync Engine improvements
	- built-in support for OCHostSimulatorManager
	- improved handling of action cancellation (closing gaps)
	- add sync record processing trigger as wait condition hit timeouts provided through a new nextRetryDate accessor
	- provide "Retry" and "Cancel" options as default for failed downloads
	- improved behaviour for automatically triggered downloads
		- silently remove if file no longer exists
		- retry 3 times for most HTTP errors before emitting a message
		- emitted messages are queued muted, so they don't interfere with the user's work, but are visible and actionable
	- sync actions: add internalsDescription accessor to allow addition of internal information to the description without having to entirely rewrite it
	- add mute support to sync issues
- OCExtensions
	- add extensionMetadata dictionary with standardized keys for name, description, version, copyright
- Diagnostic improvements
	- replace <> with {} for markdown output so repeated copy & paste won't lead to unwanted tags

* - download: improve behaviour around deleted files targeted for download by marking them as deleted in the local database as well

* - fix issue where updates to different OCBookmark instances would not trigger a connection retry - even if they shared the same UUID

* - add metadata support to OCClassSettings
	- add class settings metadata to
		- OCAuthenticationMethod (including dynamic compilation of authentication methods and auto completion)
		- OCAuthenticationMethodOAuth2
		- OCAuthenticationMethodOpenIDConnect
		- OCConnection
		- OCCore
		- OCHTTPPipeline
		- OCItemPolicyProcessorDownloadExpiration
		- OCItemPolicyProcessorVacuum
		- OCLogger (including dynamic compilation of valid log options and auto completion)
	- fill documentation gaps in the process
	- externalize long documentation to new doc/class-settings-sdk folder
	- switch OCAuthenticationMethodOpenIDConnect to  -registerOCClassSettingsDefaults:metadata: and extend OAuthenticationMethod auto registration macros as needed
	- add support for registering additional metadata alongside additional defaults
	- preparation for supporting dynamic metadata changes and metadata caching in a next step
	- new test case SettingsTests.testMetadataAvailability that fails if metadata is missing and outputs a list of OCClassSettingsFlatIdentifiers for which the metadata is missing
- add validation support to OCClassSettings
	- using new OCClassSettingsErrorDomain error domain and OCClassSettingsErrorCode codes
	- checks type and value checks against checks, logging errors where they are encountered
	- converts types where possible (f.ex. "1" to 1)
	- supports custom validation mechanisms
	- caches results to keep overhead as low as possible
- add convenience NSString category to compose/split new OCClassSettingsFlatIdentifier strings (like f.ex. "connection.allow-plain-http" <-> "connection" + "allow-plain-http")
- fix format string in OCSyncActionUpdate issue description
- switch OCCore+Thumbnails OCClassSettings key access to more modern API
- OCAuthenticationMethod+UIAppExtension: replace with NSClassFromString() to allow compilation as module and fix other Xcode 12 warnings
- fix (most) Xcode 12 warnings

* - OCHostSimulator: add "five-seconds-of-404" simulator extension that returns 404 to all requests for five seconds
- OCCore: handle HTTP status >= 400 as "connection refused"-type errors, including retries and automated handling rather than bringing up issues

* - OCWaitCondition: add support for localized description for what is being waited for
- OCSyncRecordActivity: add support for new localized description of wait conditions, use where available
- OCSyncActionDownload: provide localized description for wait conditions on retries of available offline downloads and metadata refresh waits

* - OCSyncAction+Diagnostic: include information on target item with diagnostic information

* - add auto-generated CONFIGURATION.json to doc directory
- NSArray+ObjCRuntime: convenience method retrieving all classes implementing an ObjC protocol from the ObjC runtime
- OCClassSettings+Documentation: utility methods to retrieve, compose and prepare metadata for use in documentation, including conversion from JSON-unsafe types to JSON-safe types
- OCClassSettings+Metadata:
	- introducing additional keys for flat identifier, class identifier, class name
	- -keysForClass: now checks for an actual implementation (to avoid exceptions in case of NSProxy subclasses)
- SettingsTest: new "testUpdateConfigurationJSONFromMetadata" unit test updating the CONFIGURATION.json file automatically

* - rename OCClassSettingsKeyStatusAvailable to OCClassSettingsKeyStatusSupported

* - project: Xcode update, increase deployment target to iOS and tvOS 12.0
- OCHTTPPipeline:
	- perform signal check delegation even if no signals are provided for a request (to perform other checks)
- OCConnection:
	- add enforcement of OCConnectionAllowedAuthenticationMethodIDs / "connection-allowed-authentication-methods"
	- return OCErrorAuthorizationMethodNotAllowed in case an OCBookmark is based on an authentication method that is not allowed
- OCCore:
	- add handling for OCErrorAuthorizationMethodNotAllowed that effectively puts the core offline, preventing any communication with the server

* - OCAuthenticationMethodOpenIDConnect: use defaults registration to add auth method settings
- OCAuthenticationMethodOAuth2:
	- add request to token endpoint to detect availability
	- if response is a redirection or 404, consider OAuth2 to be unavailable

* - remove obsolete include line

* - add class settings metadata support to OCHostSimulatorManager
- add missing OCExtensionMetadataKey symbols/values

* - OCSyncActionCreateFolder: add standard set of permissions to placeholder folder items

* - OCSyncActionCreateFolder: add standard set of permissions to placeholder folder items

* - OCClassSettings metadata and documentation improvements
	- add option to sort possible values
	- add option to expand possible values (so they're uniform and easier to process by other tools)
	- sort doc dictionary arrays by flat identifier for a deterministic order
	- remove duplicate entries produced by class inheritance
- update CONFIGURATION.json from unit test, using improvements

* - OCClassSettings:
	- implement OCClassSettingsFlag support including caching
		- implement OCClassSettingsFlagIsPrivate support as fallback if publicClassSettingsIdentifiers is not implemented by a class
		- implement OCClassSettingsFlagAllowUserPreferences and OCClassSettingsFlagDenyUserPreferences support if allowUserPreferenceForClassSettingsKey is not implemented by a class
	- improved logging with tags
	- properly fall back to previous value instead of default value when validation fails for a value provided by one amongst several sources
	- fix deadlock bug related to logging settings
	- allow validation without caching result
	- OCClassSettingsFlatSource and subclasses: use OCClassSettingsFlatIdentifier instead of NSString in the respective method definitions
	- implement unit tests
- OCConnection:
	- replace "connection" string with OCClassSettingsIdentifierConnection
	- replace allowUserPreferenceForClassSettingsKey method with class settings metadata flags
- OCLogger:
	- replace allowUserPreferenceForClassSettingsKey method with class settings metadata flags
	- fix potential dead-lock when retrieving toggles to compile metadata dynamically

* Added wipe function allowing deleting all keychain items (#73)

Co-authored-by: Michael Neuwert <mn@neuwert-media.com>

* - OCClassSetting:
	- new API for observing updates to a class setting or select attributes
	- long-term goal: unified, simplified interface to OCClassSettings
- OCClassSettings:
	- OCClassSettingsChangedNotification: posted with object=nil if any value could have changed, posted with the flat identifier if a specific setting has changed
	- provides a standard way to notify interested parties about changes
	- posts OCClassSettingsChangedNotification whenever sources are added or removed
- OCClassSettingsUserPreferences
	- adds new APIs to check if users are allowed to change a setting via OCClassSettingsUserPreferences methods
	- adds new MDM options to allow or disallow users to change specific settings
	- posts OCClassSettingsChangedNotification whenever a value is changed by the user
- OCClassSettingsFlatSourceManagedConfiguration:
	- posts OCClassSettingsChangedNotification whenever new values are pushed via MDM
- OCKeychain:
	- return an NSError for -wipe instead of a BOOL

* - OCConnection, OCLogger: add missing 	OCClassSettingsFlagDenyUserPreferences flags
- OCClassSetting:
	- fix enumeration error
	- add unit tests
	- make include public

* - update CONFIGURATION.json with latest changes and additions

* - OCClassSettings+Metadata: fix sorting of possible values

* - OCHTTP:
	- clarify and extend redirection policies:
		- "forbidden" becomes "handle locally"
		- "validate connection" - triggering the connection validator - becomes the new default
	- extended redirection support in OCHTTPRequest:
		- new maximumRedirectionDepth property to indicate maximum number of redirections to follow
		- new redirectionHistory property keeping track of NSURLs queried as part of redirection handling
- OCConnection:
	- new status validation method +validateStatus:; replace all instances of checks for maintenance mode with it
	- add Connection Validator that kicks in if a HTTP Request with "ValidateConnection" redirection policy receives a redirection response
	- demote OCConnectionTransparentTemporaryRedirect option from "advanced" to "debug", turn off by default
- OCHostSimulator
	- move OCHostSimulator+CookieRedirect from ownCloudMocking to ownCloudSDK/OCHostSimulator+BuiltIn
	- add new "simple-apm" cookie redirection simulating APM Host Simulator Extension and rebuild documentation
- OCCore:
	- enable cookie support by default

* - OCAuthenticationMethod:
	- switch from detection URLs to detection requests
	- use Detection ID to consolidate requests prior to performing them
	- authentication methods now perform a PROPFIND rather than a GET request on the WebDAV endpoint
	- when contacting the bare WebDAV endpoint, the URL is now slash-terminated
- Connection Validator
	- new error code for failed validation
	- preparations for second stage of validation if first stage fails (but commented out for now as it's not clear that's needed and would complicate the implementation by multiplying the possible outcomes)
	- code comment describing how the Connection Validator works
	- handle failed validation like maintenance mode, but with custom error in status line
- add "recovering-apm" Host Simulator that makes bogus redirects for the first 30 seconds, then becomes a "simple-apm" that wants to set cookies

* - OCConnection: make Connection Validator more thread-safe, add rate limiter to avoid excessive retries

* - OCBookmark:
	- allow setting the internally tracked _lastUsername with new method

- OCAuthenticationMethodOAuth2 + OCAuthenticationMethodOpenIDConnect:
	- add headers to prefill user name where available and supported by the server
	- comment out support for OAuth2 due to crashes in the web view in Simulator and on device

* - OCConnection:
	- implement Connection Validator II - following the latest flow diagram
	- update code comments explaining the structure
	- factor out the Connection Validator to its own method

* - OCConnection: Connection Validator cleanup

* - OCConnection: Connection Validator comment clarifications

* - OCConnection + OCHTTPPipeline: add debug output for cancellation of non-critical requests
- OCProcessManager: add additional observation and debug output for tracking app/extension state

* - OCClassSettings: add "categoryTag" generation support

* - OCHTTP improvements
	- centralize management of X-Request-ID header in OCHTTPRequest
	- replace all header field strings with OCHTTPHeaderFieldNames
	- extended and more uniform log messages to make following a request through the OCHTTPPipeline much easier
	- move the majority of debug messages to the verbose level
	- log old and new X-Request-ID when recreating it, to allow connecting the dots
	- avoid requesting the full header dictionary when just interested in a single one
	- log type (Bearer, Basic, …) from Authorization header and only replace the actually confidential part with "[redacted]"
	- add debugging description to OCHTTPRequest
- OCHTTP bugfixes
	- ensure that only one representation (object or data) is kept in an OCHTTPPipelineTask at a time, to avoid inconsistencies
	- drop request data if requestID is changed
- OCLogger
	- migrate privacy mask and log level to OCClassSetting + observation
	- fix bug where log level changes didn't propagate across processes
- OCClassSettings
	- fix bugs related to change notifications timing
	- implement cross-process notifications for user settings
- General
	- move frequently logged debug messages that are very specific and aren't needed 98% of the time to the verbose logging level

* - Turn off HTTP request and response logging toggle by default

* - OCConnection:
	- limit connection validation to same host (fixes conflict with redirects / multi-tenancy)
	- increase security of "allow same host" redirect policy by also requiring same HTTP scheme
- OCCore: -trackItemAtPath:trackingHandler: no longer makes multiple nil calls if an item is not found
- OCLogger: avoid log.log-enabled-components validation error during logger startup
- OCUser: also archive/unarchive _forceIsRemote
- project: update env vars to take lack of http request/response logging into account
- unit tests:
	- fix failing tests
	- tag remaining tests that still fail

* - OCLogger: fix recursive possible values assignment for OCClassSettingsMetadataKeyPossibleValues
- OCHTTPPipeline: check signal requirements for final requests only if there are any signals actually required by the request - or the handler for the partition the request belongs to is around
- OCHostSimulator+BuiltIn: fix incorrect block passing resulting in requestWithCookiesHandler never being called
- unit tests:
	- fix remaining failing tests
	- comment out deactivated tests

* - additional unit test fixes / adaptions to Bitrise performance

* OAuth2:
- add new method -postProcessAuthenticationDataDict: to condense the stored token response to the needed essentials, saving space and steering clear of issues if the token response contains null values that make secret serialization to property list format fail
- factor out access to clientID and clientSecret into methods
- make -sendTokenRequestToConnection:… subclass able
- improved error handling if property list serialization fails

OIDC:
- add support for OpenID Connect Dynamic Client Registration
- on by default for servers offering the endpoint
- including support for expiration, preservation and caching
- add additional error code for client registration failure

HTTP Pipeline:
- factor out User-Agent template composition method to make it available
- extend OCHTTPRequest with JSON-specific method to easily instantiate POST requests with JSON payload

* Update CONFIGURATION.json with latest OIDC additions

* - Authentication: add new OCAuthenticationMethodRequiredUsernameKey option
- OAuth2 / OIDC: add support for new OCAuthenticationMethodRequiredUsernameKey option

* - OCClassSettings: fix crash that could occur if overrideSettings was mutated while being used

* Class Settings cleanup:
- remove "connection-" and "log-" in front of class setting names for OCConnection and OCLogger to avoid duplication like "connection.connection-.."
- update schemes to use the new names
- update CONFIGURATION.json with the changes
- replace configuration documentation in CONFIGURATION.md with a reference to the full documentation in the ios-app repository, as reference in CONFIGURATION.md is no longer updated

* - OCConnection: add dedicated handling for "403 Forbidden" responses to file download requests (enterprise#4338)
- NSError+OCError: add a new OCErrorWithDescriptionFromError macro that allows creating an OCError based on another error with custom description

* Add support for certificate comparisons:
- OCCertificate+OpenSSL:
	- add nullability …
  • Loading branch information
4 people committed Feb 10, 2021
1 parent 95bbb2e commit e774c75
Show file tree
Hide file tree
Showing 132 changed files with 7,952 additions and 1,004 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 11.5 version

- Class Settings
- metadata support
- validation support
- documentation support
- new OCClassSetting class makes class settings observable and more approachable
- Host Simulator now part of the SDK
- Connection Validator
- refined, more powerful detection of available authentication methods
- OpenID Connect Dynamic Client Registration support
- Certificate Diffing support
- Improved HTTP logging
- Extended redirection handling and new policies
- Improved error handling
- Fixed unit tests and added nullability information to many classes

## 1.1.2 version

- Fix for long delays before starting a request on iOS 13.1
Expand Down
6 changes: 3 additions & 3 deletions Example/Ocean/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ - (IBAction)showCertificate:(id)sender
request.ephermalRequestCertificateProceedHandler = ^(OCHTTPRequest *request, OCCertificate *certificate, OCCertificateValidationResult validationResult, NSError *certificateValidationError, OCConnectionCertificateProceedHandler proceedHandler) {

[[NSOperationQueue mainQueue] addOperationWithBlock:^{
[self presentViewController:[[UINavigationController alloc] initWithRootViewController:[[OCCertificateViewController alloc] initWithCertificate:certificate]] animated:YES completion:nil];
[self presentViewController:[[UINavigationController alloc] initWithRootViewController:[[OCCertificateViewController alloc] initWithCertificate:certificate compareCertificate:nil]] animated:YES completion:nil];

[OCCertificateDetailsViewNode certificateDetailsViewNodesForCertificate:certificate withValidationCompletionHandler:^(NSArray<OCCertificateDetailsViewNode *> *detailsViewNodes) {
[OCCertificateDetailsViewNode certificateDetailsViewNodesForCertificate:certificate differencesFrom:nil withValidationCompletionHandler:^(NSArray<OCCertificateDetailsViewNode *> *detailsViewNodes) {

[[NSOperationQueue mainQueue] addOperationWithBlock:^{
NSError *parseError;
NSMutableAttributedString *attributedString;

attributedString = [[NSMutableAttributedString alloc] initWithAttributedString:[OCCertificateDetailsViewNode attributedStringWithCertificateDetails:detailsViewNodes]];
attributedString = [[NSMutableAttributedString alloc] initWithAttributedString:[OCCertificateDetailsViewNode attributedStringWithCertificateDetails:detailsViewNodes colors:nil]];

[attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"\n\n------\nCertificate metadata:\n%@\nError: %@", [certificate metaDataWithError:&parseError], parseError]]];

Expand Down
Loading

0 comments on commit e774c75

Please sign in to comment.