Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/ios.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarinofaggiana <marino@marinofaggiana.com>2019-04-28 12:04:26 +0300
committermarinofaggiana <marino@marinofaggiana.com>2019-04-28 12:04:26 +0300
commit8e351e516112a454959acbdbbdd1c0912f6794cb (patch)
treefd419ea54ac394c578ce4819c5638ba40919468a
parentf84833e598e022a8cfad34230bc76762471f7c00 (diff)
parent9bd93fb390d845f4a75fb8f8faaab34c7076c68f (diff)
Merge branch 'develop'2.23.4
-rw-r--r--Cartfile11
-rw-r--r--Cartfile.resolved16
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/Framework/Info.plist2
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache.podspec14
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.h3
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.m34
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.h29
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.m95
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.h11
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.m83
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.h11
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.m30
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.h4
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.m14
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.h24
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.m100
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.h22
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.m74
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.h28
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.m218
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.h24
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.m168
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.h11
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.m30
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.h19
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.m52
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.h29
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.m212
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.h6
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.m24
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.h37
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.m302
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.h18
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.m56
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.h2
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.m162
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.h4
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.m55
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.h20
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.m253
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.h2
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.m38
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.h4
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.m59
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.h4
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.m208
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/KTVHTTPCache.h343
-rw-r--r--Carthage/Checkouts/KTVHTTPCache/LICENSE2
-rw-r--r--Carthage/Checkouts/PDFGenerator/PDFGenerator.podspec4
-rw-r--r--Carthage/Checkouts/SVGKit/Source/DOM classes/Core DOM/DOMGlobalSettings.h2
-rw-r--r--Carthage/Checkouts/SVGKit/Source/DOM classes/SVG-DOM/SVGNumber.h2
-rw-r--r--Carthage/Checkouts/SVGKit/Source/DOM classes/Unported or Partial DOM/SVGElement.h2
-rw-r--r--Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.h2
-rw-r--r--Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.m2
-rw-r--r--Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKFastImageView.m7
-rw-r--r--Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKLayeredImageView.m6
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/.swift-version2
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec6
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAssetsCollection.swift7
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift20
-rw-r--r--Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift82
-rw-r--r--Carthage/Checkouts/realm-cocoa/.jenkins.yml126
-rw-r--r--Carthage/Checkouts/realm-cocoa/.swiftlint.yml4
-rw-r--r--Carthage/Checkouts/realm-cocoa/CHANGELOG.md49
-rw-r--r--Carthage/Checkouts/realm-cocoa/Configuration/Base.xcconfig2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability26
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMObjectServerTests.mm47
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.mm2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift19
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMake/RealmCore.cmake4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMakeLists.txt5
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/dependencies.list4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/CMakeLists.txt18
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.cpp62
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.hpp4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/epoll/external_commit_helper.cpp62
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.cpp36
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.hpp4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/results.cpp3
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.cpp42
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.hpp26
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/CMakeLists.txt2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/realm.cpp53
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/results.cpp41
-rwxr-xr-xCarthage/Checkouts/realm-cocoa/Realm/ObjectStore/workflow/build.sh2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMCollection.h3
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMConstants.h11
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMNetworkClient.mm25
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMSyncConfiguration_Private.h4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMSyncManager.h2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMSyncPermission.h3
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSession.h2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSubscription.h2
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/Tests/AsyncTests.mm10
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/Tests/InterprocessTests.m4
-rw-r--r--Carthage/Checkouts/realm-cocoa/Realm/Tests/RealmTests.mm6
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift2
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/ObjectiveCSupport.swift5
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Optional.swift2
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift20
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift2
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift64
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ObjectCreationTests.swift4
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/ThreadSafeReference.swift2
-rw-r--r--Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift8
-rwxr-xr-xCarthage/Checkouts/realm-cocoa/build.sh116
-rw-r--r--Carthage/Checkouts/realm-cocoa/dependencies.list6
-rwxr-xr-xCarthage/Checkouts/realm-cocoa/examples/installation/build.sh11
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExample/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExampleTests/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/Podfile4
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExample/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/Podfile4
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExample/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExampleTests/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExample/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExampleTests/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/Podfile10
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExample/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExampleTests/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExample/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/Podfile4
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExample/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExampleTests/Info.plist2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/osx/swift/CocoaPodsExample/Podfile10
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/watchos/objc/CocoaPodsExample/Podfile2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CarthageExample/CarthageExample WatchKit Extension/InterfaceController.swift2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/CocoaPodsExample WatchKit Extension/InterfaceController.swift2
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/Podfile6
-rw-r--r--Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/DynamicExample/DynamicExample WatchKit Extension/InterfaceController.swift2
-rwxr-xr-xCarthage/Checkouts/realm-cocoa/scripts/package_examples.rb16
-rwxr-xr-xCarthage/Checkouts/realm-cocoa/scripts/reset-simulators.rb9
-rwxr-xr-xCarthage/Checkouts/realm-cocoa/scripts/swift-version.sh22
-rw-r--r--File Provider Extension/FileProviderData.swift2
-rw-r--r--File Provider Extension/FileProviderExtension+Thumbnail.swift58
-rw-r--r--File Provider Extension/FileProviderExtension-Bridging-Header.h2
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalyticsbin16591408 -> 0 bytes
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h62
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h119
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h13
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h407
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h507
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h17
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h6
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap10
-rw-r--r--Libraries external/Firebase/Analytics/FirebaseCore.framework/FirebaseCorebin2081968 -> 0 bytes
-rw-r--r--Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h52
-rw-r--r--Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h118
-rw-r--r--Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h50
-rw-r--r--Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h35
-rw-r--r--Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h116
-rw-r--r--Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h21
-rw-r--r--Libraries external/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap7
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnosticsbin2782488 -> 0 bytes
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseCoreDiagnostics.framework/Modules/module.modulemap6
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceIDbin4447936 -> 0 bytes
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h304
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h1
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap7
-rwxr-xr-xLibraries external/Firebase/Analytics/FirebaseNanoPB.framework/FirebaseNanoPBbin312232 -> 0 bytes
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMacbin794656 -> 0 bytes
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDebugSelectorValidation.h100
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDebugThreadValidation.h44
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDefines.h398
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMLocalizedString.h79
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMLogger.h508
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMMethodCheck.h69
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSData+zlib.h199
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSDictionary+URLArguments.h40
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSString+URLArguments.h45
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMStringEncoding.h112
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMTypeCasting.h71
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMURLBuilder.h73
-rw-r--r--Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Modules/module.modulemap6
-rw-r--r--Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb.h583
-rw-r--r--Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_common.h42
-rw-r--r--Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_decode.h153
-rw-r--r--Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_encode.h154
-rw-r--r--Libraries external/Firebase/Analytics/nanopb.framework/Modules/module.modulemap5
-rw-r--r--Libraries external/Firebase/Analytics/nanopb.framework/nanopbbin163760 -> 0 bytes
-rw-r--r--Libraries external/Firebase/Firebase.h101
-rw-r--r--Libraries external/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessagingbin5899176 -> 0 bytes
-rw-r--r--Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h527
-rwxr-xr-xLibraries external/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h17
-rw-r--r--Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap7
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Any.pbobjc.h182
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Api.pbobjc.h311
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Duration.pbobjc.h145
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Empty.pbobjc.h74
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/FieldMask.pbobjc.h281
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBArray.h1967
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBArray_PackagePrivate.h130
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBBootstrap.h123
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedInputStream.h253
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedInputStream_PackagePrivate.h112
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedOutputStream.h748
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedOutputStream_PackagePrivate.h126
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDescriptor.h288
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDescriptor_PackagePrivate.h325
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDictionary.h5770
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDictionary_PackagePrivate.h488
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBExtensionInternals.h50
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBExtensionRegistry.h87
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBMessage.h470
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBMessage_PackagePrivate.h124
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBProtocolBuffers.h76
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBProtocolBuffers_RuntimeSupport.h40
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRootObject.h52
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRootObject_PackagePrivate.h46
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRuntimeTypes.h144
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownField.h99
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownFieldSet.h82
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownFieldSet_PackagePrivate.h61
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownField_PackagePrivate.h47
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUtilities.h539
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUtilities_PackagePrivate.h351
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBWellKnownTypes.h245
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBWireFormat.h73
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/SourceContext.pbobjc.h77
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Struct.pbobjc.h204
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Timestamp.pbobjc.h163
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Type.pbobjc.h444
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Wrappers.pbobjc.h219
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Modules/module.modulemap5
-rw-r--r--Libraries external/Firebase/Messaging/Protobuf.framework/Protobufbin7898016 -> 0 bytes
-rw-r--r--Nextcloud.xcodeproj/project.pbxproj424
-rwxr-xr-xNotification Service Extension/NotificationService.swift89
-rw-r--r--Share/Share-Bridging-Header.h2
-rw-r--r--Share/ShareViewController.h1
-rw-r--r--Share/ShareViewController.m14
-rw-r--r--iOSClient/AppDelegate.m149
-rw-r--r--iOSClient/AutoUpload/NCAutoUpload.m8
-rw-r--r--iOSClient/Brand/File_Provider_Extension.plist4
-rw-r--r--iOSClient/Brand/NCBrand.swift11
-rw-r--r--iOSClient/Brand/NCBridgeSwift.h7
-rw-r--r--iOSClient/Brand/Notification_Service_Extension.entitlements14
-rw-r--r--iOSClient/Brand/Notification_Service_Extension.plist31
-rw-r--r--iOSClient/Brand/Share.plist4
-rw-r--r--iOSClient/Brand/iOSClient.plist4
-rw-r--r--iOSClient/CCGlobal.h10
-rw-r--r--iOSClient/Database/NCDatabase.swift19
-rw-r--r--iOSClient/Database/NCManageDatabase.swift226
-rw-r--r--iOSClient/Favorites/CCFavorites.m2
-rw-r--r--iOSClient/Images.xcassets/address.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/address.imageset/address.pdfbin0 -> 1871 bytes
-rw-r--r--iOSClient/Images.xcassets/businesstype.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/businesstype.imageset/businesstype.pdfbin0 -> 1021 bytes
-rw-r--r--iOSClient/Images.xcassets/checkedYes.imageset/checkedYes.pdfbin942 -> 4363 bytes
-rw-r--r--iOSClient/Images.xcassets/city.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/city.imageset/city.pdfbin0 -> 1568 bytes
-rw-r--r--iOSClient/Images.xcassets/cityzip.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/cityzip.imageset/cityzip.pdfbin0 -> 1718 bytes
-rw-r--r--iOSClient/Images.xcassets/company.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/company.imageset/company.pdfbin0 -> 947 bytes
-rw-r--r--iOSClient/Images.xcassets/country.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/country.imageset/country.pdfbin0 -> 2723 bytes
-rw-r--r--iOSClient/Images.xcassets/crashservice.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/crashservice.imageset/crashservice.pdfbin0 -> 1098 bytes
-rw-r--r--iOSClient/Images.xcassets/editUserProfile.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/editUserProfile.imageset/editUserProfile.pdfbin0 -> 1630 bytes
-rw-r--r--iOSClient/Images.xcassets/email.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/email.imageset/mail.pdfbin0 -> 1230 bytes
-rw-r--r--iOSClient/Images.xcassets/phone.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/phone.imageset/phone.pdfbin0 -> 1791 bytes
-rw-r--r--iOSClient/Images.xcassets/role.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/role.imageset/role.pdfbin0 -> 1439 bytes
-rw-r--r--iOSClient/Images.xcassets/twitter.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/twitter.imageset/twitter.pdfbin0 -> 1203 bytes
-rw-r--r--iOSClient/Images.xcassets/user.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/user.imageset/user.pdfbin0 -> 1509 bytes
-rw-r--r--iOSClient/Images.xcassets/users.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/users.imageset/users.pdfbin0 -> 1900 bytes
-rw-r--r--iOSClient/Images.xcassets/web.imageset/Contents.json15
-rw-r--r--iOSClient/Images.xcassets/web.imageset/web.pdfbin0 -> 2257 bytes
-rwxr-xr-xiOSClient/Library/DropdownMenu/DropUpMenu.swift16
-rwxr-xr-xiOSClient/Library/DropdownMenu/DropdownMenu.swift8
-rwxr-xr-xiOSClient/Library/DropdownMenu/SectionHeader.swift8
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFHTTPSessionManager.h295
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFHTTPSessionManager.m361
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworkReachabilityManager.h206
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworkReachabilityManager.m263
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworking.h41
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFSecurityPolicy.h154
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFSecurityPolicy.m353
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLRequestSerialization.h479
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLRequestSerialization.m1376
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLResponseSerialization.h311
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLResponseSerialization.m805
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.h500
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.m1247
-rw-r--r--iOSClient/Library/OCCommunicationLib/HCFeatures.h37
-rw-r--r--[-rwxr-xr-x]iOSClient/Library/OCCommunicationLib/HCFeatures.m (renamed from Notification Service Extension/NotificationServiceExtension-Bridging-Header.h)27
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/OCCommunication.h9
-rw-r--r--iOSClient/Library/OCCommunicationLib/OCCommunication.m216
-rw-r--r--iOSClient/Library/OCCommunicationLib/OCUserProfile.h7
-rw-r--r--iOSClient/Library/OCCommunicationLib/OCUserProfile.m8
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.h28
-rwxr-xr-xiOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m46
-rw-r--r--iOSClient/Login/CCLogin.m8
-rw-r--r--iOSClient/Login/CCLoginWeb.swift10
-rw-r--r--iOSClient/Main/CCMain.m7
-rw-r--r--iOSClient/Main/Cell/NCGridMediaCell.swift2
-rw-r--r--iOSClient/Main/Cell/NCGridMediaCell.xib32
-rw-r--r--iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift9
-rw-r--r--iOSClient/Main/NCMainCommon.swift29
-rw-r--r--iOSClient/Media/NCMedia.swift4
-rw-r--r--iOSClient/Move/CCMove.m14
-rw-r--r--iOSClient/Networking/CCNetworking.h3
-rw-r--r--iOSClient/Networking/CCNetworking.m40
-rw-r--r--iOSClient/Networking/NCNetworkingEndToEnd.m14
-rw-r--r--iOSClient/Networking/NCService.swift110
-rw-r--r--iOSClient/Networking/OCNetworking.h9
-rw-r--r--iOSClient/Networking/OCNetworking.m297
-rw-r--r--iOSClient/Nextcloud-Bridging-Header.h2
-rw-r--r--iOSClient/Notification/CCNotification.swift4
-rw-r--r--iOSClient/Offline/NCOffline.swift2
-rw-r--r--iOSClient/Select/NCSelect.swift2
-rwxr-xr-xiOSClient/Settings/CCAdvanced.m28
-rw-r--r--iOSClient/Settings/CCManageAccount.m419
-rw-r--r--iOSClient/Settings/CCSettings.m6
-rw-r--r--iOSClient/Settings/HCEditProfile.swift318
-rw-r--r--iOSClient/Supporting Files/ast.lproj/Localizable.stringsbin76556 -> 78386 bytes
-rw-r--r--iOSClient/Supporting Files/ca.lproj/Localizable.stringsbin76804 -> 85010 bytes
-rw-r--r--iOSClient/Supporting Files/cs-CZ.lproj/Localizable.stringsbin77626 -> 79476 bytes
-rw-r--r--iOSClient/Supporting Files/da.lproj/Localizable.stringsbin76502 -> 78324 bytes
-rw-r--r--iOSClient/Supporting Files/de.lproj/Localizable.stringsbin83216 -> 85222 bytes
-rw-r--r--iOSClient/Supporting Files/el.lproj/Localizable.stringsbin80500 -> 82312 bytes
-rw-r--r--iOSClient/Supporting Files/en-GB.lproj/Localizable.stringsbin75912 -> 77744 bytes
-rwxr-xr-xiOSClient/Supporting Files/en.lproj/Localizable.strings21
-rw-r--r--iOSClient/Supporting Files/es-419.lproj/Localizable.stringsbin80114 -> 81930 bytes
-rw-r--r--iOSClient/Supporting Files/es-AR.lproj/Localizable.stringsbin79426 -> 81250 bytes
-rw-r--r--iOSClient/Supporting Files/es-CL.lproj/Localizable.stringsbin80662 -> 82478 bytes
-rw-r--r--iOSClient/Supporting Files/es-CO.lproj/Localizable.stringsbin80662 -> 82478 bytes
-rw-r--r--iOSClient/Supporting Files/es-CR.lproj/Localizable.stringsbin80662 -> 82478 bytes
-rw-r--r--iOSClient/Supporting Files/es-DO.lproj/Localizable.stringsbin80662 -> 82478 bytes
-rw-r--r--iOSClient/Supporting Files/es-EC.lproj/Localizable.stringsbin80662 -> 82478 bytes
-rw-r--r--iOSClient/Supporting Files/es-GT.lproj/Localizable.stringsbin80662 -> 82478 bytes
-rw-r--r--iOSClient/Supporting Files/es-HN.lproj/Localizable.stringsbin80114 -> 81930 bytes
-rw-r--r--iOSClient/Supporting Files/es-MX.lproj/Localizable.stringsbin80776 -> 82592 bytes
-rw-r--r--iOSClient/Supporting Files/es-NI.lproj/Localizable.stringsbin80114 -> 81930 bytes
-rw-r--r--iOSClient/Supporting Files/es-PA.lproj/Localizable.stringsbin80114 -> 81930 bytes
-rw-r--r--iOSClient/Supporting Files/es-PE.lproj/Localizable.stringsbin80114 -> 81930 bytes
-rw-r--r--iOSClient/Supporting Files/es-PR.lproj/Localizable.stringsbin80114 -> 81930 bytes
-rw-r--r--iOSClient/Supporting Files/es-PY.lproj/Localizable.stringsbin80114 -> 81930 bytes
-rw-r--r--iOSClient/Supporting Files/es-SV.lproj/Localizable.stringsbin80662 -> 82478 bytes
-rw-r--r--iOSClient/Supporting Files/es-UY.lproj/Localizable.stringsbin80114 -> 81930 bytes
-rw-r--r--iOSClient/Supporting Files/es.lproj/Localizable.stringsbin81958 -> 83896 bytes
-rw-r--r--iOSClient/Supporting Files/eu.lproj/Localizable.stringsbin76686 -> 78518 bytes
-rw-r--r--iOSClient/Supporting Files/fa.lproj/Localizable.stringsbin75980 -> 77820 bytes
-rw-r--r--iOSClient/Supporting Files/fi-FI.lproj/Localizable.stringsbin77800 -> 79632 bytes
-rw-r--r--iOSClient/Supporting Files/fr.lproj/Localizable.stringsbin84788 -> 86710 bytes
-rw-r--r--iOSClient/Supporting Files/gl.lproj/Localizable.stringsbin82386 -> 84260 bytes
-rw-r--r--iOSClient/Supporting Files/hu.lproj/Localizable.stringsbin77646 -> 79472 bytes
-rw-r--r--iOSClient/Supporting Files/is.lproj/Localizable.stringsbin78522 -> 80350 bytes
-rw-r--r--iOSClient/Supporting Files/it.lproj/Localizable.stringsbin81482 -> 83640 bytes
-rw-r--r--iOSClient/Supporting Files/ja-JP.lproj/Localizable.stringsbin64246 -> 65898 bytes
-rw-r--r--iOSClient/Supporting Files/ka-GE.lproj/Localizable.stringsbin79022 -> 80836 bytes
-rw-r--r--iOSClient/Supporting Files/ko.lproj/Localizable.stringsbin67118 -> 68968 bytes
-rw-r--r--iOSClient/Supporting Files/lt_LT.lproj/Localizable.stringsbin76980 -> 79054 bytes
-rw-r--r--iOSClient/Supporting Files/nb-NO.lproj/Localizable.stringsbin76824 -> 78648 bytes
-rw-r--r--iOSClient/Supporting Files/nl.lproj/Localizable.stringsbin80138 -> 81848 bytes
-rw-r--r--iOSClient/Supporting Files/pl.lproj/Localizable.stringsbin77260 -> 79116 bytes
-rw-r--r--iOSClient/Supporting Files/pt-BR.lproj/Localizable.stringsbin79618 -> 81516 bytes
-rw-r--r--iOSClient/Supporting Files/pt-PT.lproj/Localizable.stringsbin80068 -> 81888 bytes
-rw-r--r--iOSClient/Supporting Files/ru.lproj/Localizable.stringsbin80154 -> 81966 bytes
-rw-r--r--iOSClient/Supporting Files/sk-SK.lproj/Localizable.stringsbin79282 -> 81110 bytes
-rw-r--r--iOSClient/Supporting Files/sq.lproj/Localizable.stringsbin77638 -> 79464 bytes
-rw-r--r--iOSClient/Supporting Files/sr.lproj/Localizable.stringsbin77542 -> 79364 bytes
-rw-r--r--iOSClient/Supporting Files/sv.lproj/Localizable.stringsbin77508 -> 79374 bytes
-rw-r--r--iOSClient/Supporting Files/tr.lproj/Localizable.stringsbin79184 -> 81180 bytes
-rw-r--r--iOSClient/Supporting Files/zh-Hans.lproj/Localizable.stringsbin57346 -> 58732 bytes
-rw-r--r--iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.stringsbin67728 -> 65250 bytes
-rw-r--r--iOSClient/Transfers/CCTransfers.m96
-rw-r--r--iOSClient/Trash/NCTrash.swift2
-rw-r--r--iOSClient/Utility/CCUtility.h12
-rw-r--r--iOSClient/Utility/CCUtility.m79
380 files changed, 4317 insertions, 29776 deletions
diff --git a/Cartfile b/Cartfile
index b11c6b0cd..6908f8b43 100644
--- a/Cartfile
+++ b/Cartfile
@@ -1,4 +1,4 @@
-github "tilltue/TLPhotoPicker" == 1.8.3
+github "tilltue/TLPhotoPicker" == 1.8.5
github "kishikawakatsumi/UICKeyChainStore" == 2.1.2
github "danielsaidi/Sheeeeeeeeet" == 1.2.2
github "sgr-ksmt/PDFGenerator" == 2.1
@@ -8,10 +8,11 @@ github "ealeksandrov/EAIntroView" == 2.12.0
github "calimarkus/JDStatusBarNotification" == 1.6.0
github "ChangbaDevs/KTVHTTPCache" == 2.0.0
github "jdg/MBProgressHUD" == 1.1.0
-github "realm/realm-cocoa" == 3.13.1
+github "realm/realm-cocoa" == 3.14.1
github "SVGKit/SVGKit" == 2.1.0
-github "WeTransfer/WeScan" == 0.9.1
-github "malcommac/SwiftRichString" == 2.0.1
+github "WeTransfer/WeScan" == 1.1.0
+github "malcommac/SwiftRichString" == 3.0.0
github "https://github.com/marinofaggiana/FastScroll" "master"
github "yannickl/QRCodeReader.swift" >= 10.0.0
-github "marmelroy/Zip"
+github "AFNetworking/AFNetworking" == 3.2.1
+github "weichsel/ZIPFoundation" == 0.9.9 \ No newline at end of file
diff --git a/Cartfile.resolved b/Cartfile.resolved
index 43ed97d57..062fb8910 100644
--- a/Cartfile.resolved
+++ b/Cartfile.resolved
@@ -1,8 +1,9 @@
-github "ChangbaDevs/KTVHTTPCache" "1.1.7"
+github "AFNetworking/AFNetworking" "3.2.1"
+github "ChangbaDevs/KTVHTTPCache" "2.0.0"
github "CocoaLumberjack/CocoaLumberjack" "3.5.2"
github "MortimerGoro/MGSwipeTableCell" "1.6.8"
-github "SVGKit/SVGKit" "4b507e48da30711e25d1bcdd19580f25887a2267"
-github "WeTransfer/WeScan" "v0.9.1"
+github "SVGKit/SVGKit" "2.1.0"
+github "WeTransfer/WeScan" "v1.1.0"
github "calimarkus/JDStatusBarNotification" "1.6.0"
github "danielsaidi/Sheeeeeeeeet" "1.2.2"
github "dzenbot/DZNEmptyDataSet" "v1.8.1"
@@ -10,10 +11,11 @@ github "ealeksandrov/EAIntroView" "2.12.0"
github "ealeksandrov/EARestrictedScrollView" "1.1.0"
github "jdg/MBProgressHUD" "1.1.0"
github "kishikawakatsumi/UICKeyChainStore" "v2.1.2"
-github "malcommac/SwiftRichString" "2.1.0"
+github "malcommac/SwiftRichString" "3.0.0"
github "marinofaggiana/FastScroll" "81967c2309d29bc2c330d422da612160a30bade8"
github "marmelroy/Zip" "1.1.0"
-github "realm/realm-cocoa" "v3.13.1"
-github "sgr-ksmt/PDFGenerator" "2.1.1"
-github "tilltue/TLPhotoPicker" "1.8.3"
+github "realm/realm-cocoa" "v3.14.1"
+github "sgr-ksmt/PDFGenerator" "2.1"
+github "tilltue/TLPhotoPicker" "1.8.5"
+github "weichsel/ZIPFoundation" "0.9.9"
github "yannickl/QRCodeReader.swift" "10.0.0"
diff --git a/Carthage/Checkouts/KTVHTTPCache/Framework/Info.plist b/Carthage/Checkouts/KTVHTTPCache/Framework/Info.plist
index 91e7b9d3d..724fe0e9a 100644
--- a/Carthage/Checkouts/KTVHTTPCache/Framework/Info.plist
+++ b/Carthage/Checkouts/KTVHTTPCache/Framework/Info.plist
@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>1.1.7</string>
+ <string>2.0.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSApplicationCategoryType</key>
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache.podspec b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache.podspec
index 3e5eaefcb..4fa471ea9 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache.podspec
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache.podspec
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "KTVHTTPCache"
- s.version = "1.1.7"
- s.summary = "A media cache framework from Changba iOS Team."
+ s.version = "2.0.0"
+ s.summary = "A powerful media cache framework."
s.homepage = "https://github.com/ChangbaDevs/KTVHTTPCache"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Single" => "libobjc@gmail.com" }
@@ -9,7 +9,15 @@ Pod::Spec.new do |s|
s.platform = :ios, "8.0"
s.source = { :git => "https://github.com/ChangbaDevs/KTVHTTPCache.git", :tag => "#{s.version}" }
s.source_files = "KTVHTTPCache", "KTVHTTPCache/**/*.{h,m}"
- s.public_header_files = "KTVHTTPCache/**/*.h"
+ s.public_header_files =
+ "KTVHTTPCache/KTVHTTPCache.h",
+ "KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.h",
+ "KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.h",
+ "KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.h",
+ "KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.h",
+ "KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.h",
+ "KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.h",
+ "KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.h"
s.frameworks = "UIKit", "Foundation"
s.requires_arc = true
s.dependency 'KTVCocoaHTTPServer'
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.h
index d6b271b43..8cc57c2c2 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.h
@@ -8,8 +8,7 @@
#import <Foundation/Foundation.h>
-typedef NS_ENUM(NSInteger, KTVHCErrorCode)
-{
+typedef NS_ENUM(NSInteger, KTVHCErrorCode) {
KTVHCErrorCodeResponseUnavailable = -192700,
KTVHCErrorCodeUnsupportContentType = -192701,
KTVHCErrorCodeNotEnoughDiskSpace = -192702,
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.m
index 3416f800b..49dc9cea4 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCError.m
@@ -18,7 +18,7 @@ NSString * const KTVHCErrorUserInfoKeyResponse = @"KTVHCErrorUserInfoKeyResponse
request:(NSURLRequest *)request
response:(NSURLResponse *)response
{
- NSMutableDictionary * userInfo = [NSMutableDictionary dictionary];
+ NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
if (URL) {
[userInfo setObject:URL forKey:KTVHCErrorUserInfoKeyURL];
}
@@ -28,9 +28,9 @@ NSString * const KTVHCErrorUserInfoKeyResponse = @"KTVHCErrorUserInfoKeyResponse
if (response) {
[userInfo setObject:response forKey:KTVHCErrorUserInfoKeyResponse];
}
- NSError * error = [NSError errorWithDomain:@"KTVHTTPCache error"
- code:KTVHCErrorCodeResponseUnavailable
- userInfo:userInfo];
+ NSError *error = [NSError errorWithDomain:@"KTVHTTPCache error"
+ code:KTVHCErrorCodeResponseUnavailable
+ userInfo:userInfo];
return error;
}
@@ -38,7 +38,7 @@ NSString * const KTVHCErrorUserInfoKeyResponse = @"KTVHCErrorUserInfoKeyResponse
request:(NSURLRequest *)request
response:(NSURLResponse *)response
{
- NSMutableDictionary * userInfo = [NSMutableDictionary dictionary];
+ NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
if (URL) {
[userInfo setObject:URL forKey:KTVHCErrorUserInfoKeyURL];
}
@@ -48,9 +48,9 @@ NSString * const KTVHCErrorUserInfoKeyResponse = @"KTVHCErrorUserInfoKeyResponse
if (response) {
[userInfo setObject:response forKey:KTVHCErrorUserInfoKeyResponse];
}
- NSError * error = [NSError errorWithDomain:@"KTVHTTPCache error"
- code:KTVHCErrorCodeUnsupportContentType
- userInfo:userInfo];
+ NSError *error = [NSError errorWithDomain:@"KTVHTTPCache error"
+ code:KTVHCErrorCodeUnsupportContentType
+ userInfo:userInfo];
return error;
}
@@ -59,20 +59,20 @@ NSString * const KTVHCErrorUserInfoKeyResponse = @"KTVHCErrorUserInfoKeyResponse
totalCacheLength:(long long)totalCacheLength
maxCacheLength:(long long)maxCacheLength
{
- NSError * error = [NSError errorWithDomain:@"KTVHTTPCache error"
- code:KTVHCErrorCodeNotEnoughDiskSpace
- userInfo:@{@"totlaContentLength" : @(totlaContentLength),
- @"currentContentLength" : @(currentContentLength),
- @"totalCacheLength" : @(totalCacheLength),
- @"maxCacheLength" : @(maxCacheLength)}];
+ NSError *error = [NSError errorWithDomain:@"KTVHTTPCache error"
+ code:KTVHCErrorCodeNotEnoughDiskSpace
+ userInfo:@{@"totlaContentLength" : @(totlaContentLength),
+ @"currentContentLength" : @(currentContentLength),
+ @"totalCacheLength" : @(totalCacheLength),
+ @"maxCacheLength" : @(maxCacheLength)}];
return error;
}
+ (NSError *)errorForException:(NSException *)exception
{
- NSError * error = [NSError errorWithDomain:@"KTVHTTPCache error"
- code:KTVHCErrorCodeException
- userInfo:exception.userInfo];
+ NSError *error = [NSError errorWithDomain:@"KTVHTTPCache error"
+ code:KTVHCErrorCodeException
+ userInfo:exception.userInfo];
return error;
}
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.h
index 97a32595a..fb3ba3c5f 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.h
@@ -28,10 +28,7 @@ KTVHCLogEnable(Common, YES, YES)
*/
KTVHCLogEnable(HTTPServer, YES, YES)
KTVHCLogEnable(HTTPConnection, YES, YES)
-KTVHCLogEnable(HTTPRequest, YES, YES)
KTVHCLogEnable(HTTPResponse, YES, YES)
-KTVHCLogEnable(HTTPResponsePing, YES, YES)
-KTVHCLogEnable(HTTPURL, YES, YES)
/**
* Data Storage
@@ -48,7 +45,6 @@ KTVHCLogEnable(DataUnitPool, YES, YES)
KTVHCLogEnable(DataUnitQueue, YES, YES)
KTVHCLogEnable(DataSourceManager, YES, YES)
-KTVHCLogEnable(DataSourceQueue, YES, YES)
KTVHCLogEnable(DataFileSource, YES, YES)
KTVHCLogEnable(DataNetworkSource, YES, YES)
@@ -69,8 +65,8 @@ KTVHCLogEnable(Dealloc, YES, YES)
#define KTVHCLogging(target, console_log_enable, record_log_enable, ...) \
if (([KTVHCLog log].consoleLogEnable && console_log_enable) || ([KTVHCLog log].recordLogEnable && record_log_enable)) \
{ \
- NSString * va_args = [NSString stringWithFormat:__VA_ARGS__]; \
- NSString * log = [NSString stringWithFormat:@"%@ : %@", target, va_args]; \
+ NSString *va_args = [NSString stringWithFormat:__VA_ARGS__]; \
+ NSString *log = [NSString stringWithFormat:@"%@ : %@", target, va_args]; \
if ([KTVHCLog log].recordLogEnable && record_log_enable) { \
[[KTVHCLog log] addRecordLog:log]; \
} \
@@ -83,17 +79,14 @@ if (([KTVHCLog log].consoleLogEnable && console_log_enable) || ([KTVHCLog log].r
/**
* Common
*/
-#define KTVHCLogCommon(...) KTVHCLogging(@"KTVHCCommon ", KTVHCLogEnableValueConsoleLog(Common), KTVHCLogEnableValueRecordLog(Common), ##__VA_ARGS__)
+#define KTVHCLogCommon(...) KTVHCLogging(@"KTVHCMacro ", KTVHCLogEnableValueConsoleLog(Common), KTVHCLogEnableValueRecordLog(Common), ##__VA_ARGS__)
/**
* HTTP Server
*/
#define KTVHCLogHTTPServer(...) KTVHCLogging(@"KTVHCHTTPServer ", KTVHCLogEnableValueConsoleLog(HTTPServer), KTVHCLogEnableValueRecordLog(HTTPServer), ##__VA_ARGS__)
#define KTVHCLogHTTPConnection(...) KTVHCLogging(@"KTVHCHTTPConnection ", KTVHCLogEnableValueConsoleLog(HTTPConnection), KTVHCLogEnableValueRecordLog(HTTPConnection), ##__VA_ARGS__)
-#define KTVHCLogHTTPRequest(...) KTVHCLogging(@"KTVHCHTTPRequest ", KTVHCLogEnableValueConsoleLog(HTTPRequest), KTVHCLogEnableValueRecordLog(HTTPRequest), ##__VA_ARGS__)
#define KTVHCLogHTTPResponse(...) KTVHCLogging(@"KTVHCHTTPResponse ", KTVHCLogEnableValueConsoleLog(HTTPResponse), KTVHCLogEnableValueRecordLog(HTTPResponse), ##__VA_ARGS__)
-#define KTVHCLogHTTPResponsePing(...) KTVHCLogging(@"KTVHCHTTPPingResponse ", KTVHCLogEnableValueConsoleLog(HTTPResponsePing), KTVHCLogEnableValueRecordLog(HTTPResponsePing), ##__VA_ARGS__)
-#define KTVHCLogHTTPURL(...) KTVHCLogging(@"KTVHCHTTPURL ", KTVHCLogEnableValueConsoleLog(HTTPURL), KTVHCLogEnableValueRecordLog(HTTPURL), ##__VA_ARGS__)
/**
* Data Storage
@@ -110,7 +103,6 @@ if (([KTVHCLog log].consoleLogEnable && console_log_enable) || ([KTVHCLog log].r
#define KTVHCLogDataUnitQueue(...) KTVHCLogging(@"KTVHCDataUnitQueue ", KTVHCLogEnableValueConsoleLog(DataUnitQueue), KTVHCLogEnableValueRecordLog(DataUnitQueue), ##__VA_ARGS__)
#define KTVHCLogDataSourceManager(...) KTVHCLogging(@"KTVHCDataSourceManager", KTVHCLogEnableValueConsoleLog(DataSourceManager), KTVHCLogEnableValueRecordLog(DataSourceManager), ##__VA_ARGS__)
-#define KTVHCLogDataSourceQueue(...) KTVHCLogging(@"KTVHCDataSourceQueue ", KTVHCLogEnableValueConsoleLog(DataSourceQueue), KTVHCLogEnableValueRecordLog(DataSourceQueue), ##__VA_ARGS__)
#define KTVHCLogDataFileSource(...) KTVHCLogging(@"KTVHCDataFileSource ", KTVHCLogEnableValueConsoleLog(DataFileSource), KTVHCLogEnableValueRecordLog(DataFileSource), ##__VA_ARGS__)
#define KTVHCLogDataNetworkSource(...) KTVHCLogging(@"KTVHCDataNetworkSource", KTVHCLogEnableValueConsoleLog(DataNetworkSource), KTVHCLogEnableValueRecordLog(DataNetworkSource), ##__VA_ARGS__)
@@ -136,24 +128,25 @@ if (([KTVHCLog log].consoleLogEnable && console_log_enable) || ([KTVHCLog log].r
* DEBUG : default is NO.
* RELEASE : default is NO.
*/
-@property (nonatomic, assign) BOOL consoleLogEnable;
+@property (nonatomic) BOOL consoleLogEnable;
/**
* DEBUG : default is NO.
* RELEASE : default is NO.
*/
-@property (nonatomic, assign) BOOL recordLogEnable;
+@property (nonatomic) BOOL recordLogEnable;
- (void)addRecordLog:(NSString *)log;
-- (NSString *)recordLogFilePath;
-- (void)deleteRecordLog;
+- (NSURL *)recordLogFileURL;
+- (void)deleteRecordLogFile;
/**
* Error
*/
-- (NSError *)lastError;
-- (NSArray <NSError *> *)allErrors;
-- (void)addError:(NSError *)error;
+- (void)addError:(NSError *)error forURL:(NSURL *)URL;
+- (NSDictionary<NSURL *, NSError *> *)errors;
+- (NSError *)errorForURL:(NSURL *)URL;
+- (void)cleanErrorForURL:(NSURL *)URL;
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.m
index ce6218b5e..8974e3606 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCLog.m
@@ -7,15 +7,15 @@
//
#import "KTVHCLog.h"
-#import "KTVHCPathTools.h"
+#import "KTVHCPathTool.h"
#import <UIKit/UIKit.h>
@interface KTVHCLog ()
-@property (nonatomic, strong) NSLock * lock;
-@property (nonatomic, strong) NSFileHandle * writingHandle;
-@property (nonatomic, strong) NSMutableArray <NSError *> * internalErrors;
+@property (nonatomic, strong) NSLock *lock;
+@property (nonatomic, strong) NSFileHandle *writingHandle;
+@property (nonatomic, strong) NSMutableDictionary<NSURL *, NSError *> *internalErrors;
@end
@@ -23,7 +23,7 @@
+ (instancetype)log
{
- static KTVHCLog * obj = nil;
+ static KTVHCLog *obj = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
obj = [[self alloc] init];
@@ -33,54 +33,49 @@
- (instancetype)init
{
- if (self = [super init])
- {
+ if (self = [super init]) {
self.consoleLogEnable = NO;
self.recordLogEnable = NO;
self.lock = [[NSLock alloc] init];
- self.internalErrors = [NSMutableArray array];
+ self.internalErrors = [NSMutableDictionary dictionary];
}
return self;
}
- (void)addRecordLog:(NSString *)log
{
- if (!self.recordLogEnable)
- {
+ if (!self.recordLogEnable) {
return;
}
- if (log.length <= 0)
- {
+ if (log.length <= 0) {
return;
}
[self.lock lock];
- NSString * string = [NSString stringWithFormat:@"%@ %@\n", [NSDate date], log];
- NSData * data = [string dataUsingEncoding:NSUTF8StringEncoding];
- if (!self.writingHandle)
- {
- [KTVHCPathTools deleteFileAtPath:[KTVHCPathTools logPath]];
- [KTVHCPathTools createFileAtPath:[KTVHCPathTools logPath]];
- self.writingHandle = [NSFileHandle fileHandleForWritingAtPath:[KTVHCPathTools logPath]];
+ NSString *string = [NSString stringWithFormat:@"%@ %@\n", [NSDate date], log];
+ NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
+ if (!self.writingHandle) {
+ [KTVHCPathTool deleteFileAtPath:[KTVHCPathTool logPath]];
+ [KTVHCPathTool createFileAtPath:[KTVHCPathTool logPath]];
+ self.writingHandle = [NSFileHandle fileHandleForWritingAtPath:[KTVHCPathTool logPath]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:UIApplicationWillTerminateNotification object:nil];
}
[self.writingHandle writeData:data];
[self.lock unlock];
}
-- (NSString *)recordLogFilePath
+- (NSURL *)recordLogFileURL
{
- NSString * path = nil;
+ NSURL *URL = nil;
[self.lock lock];
- long long size = [KTVHCPathTools sizeOfItemAtPath:[KTVHCPathTools logPath]];
- if (size > 0)
- {
- path = [KTVHCPathTools logPath];
+ long long size = [KTVHCPathTool sizeAtPath:[KTVHCPathTool logPath]];
+ if (size > 0) {
+ URL = [NSURL fileURLWithPath:[KTVHCPathTool logPath]];
}
[self.lock unlock];
- return path;
+ return URL;
}
-- (void)deleteRecordLog
+- (void)deleteRecordLogFile
{
[self.lock lock];
[self.writingHandle synchronizeFile];
@@ -90,41 +85,47 @@
[self.lock unlock];
}
-- (NSError *)lastError
+- (void)addError:(NSError *)error forURL:(NSURL *)URL
{
- if (self.internalErrors.count > 0)
- {
- return self.internalErrors.lastObject;
+ if (!URL || ![error isKindOfClass:[NSError class]]) {
+ return;
}
- return nil;
+ [self.lock lock];
+ [self.internalErrors setObject:error forKey:URL];
+ [self.lock unlock];
}
-- (NSArray<NSError *> *)allErrors
+- (NSDictionary<NSURL *,NSError *> *)errors
{
- if (self.internalErrors.count > 0)
- {
- return [self.internalErrors copy];
- }
- return nil;
+ [self.lock lock];
+ NSDictionary<NSURL *,NSError *> *ret = [self.internalErrors copy];
+ [self.lock unlock];
+ return ret;
}
-- (void)addError:(NSError *)error
+- (NSError *)errorForURL:(NSURL *)URL
{
- if (error && [error isKindOfClass:[NSError class]])
- {
- if (self.internalErrors.count >= 20)
- {
- [self.internalErrors removeObjectAtIndex:0];
- }
- [self.internalErrors addObject:error];
+ if (!URL) {
+ return nil;
}
+ [self.lock lock];
+ NSError *ret = [self.internalErrors objectForKey:URL];
+ [self.lock unlock];
+ return ret;
+}
+
+- (void)cleanErrorForURL:(NSURL *)URL
+{
+ [self.lock lock];
+ [self.internalErrors removeObjectForKey:URL];
+ [self.lock unlock];
}
#pragma mark - UIApplicationWillTerminateNotification
- (void)applicationWillTerminate:(NSNotification *)notification
{
- [self deleteRecordLog];
+ [self deleteRecordLogFile];
}
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.h
index c282d02b5..426dedc57 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.h
@@ -21,14 +21,15 @@ BOOL KTVHCRangeIsInvaild(KTVHCRange range);
BOOL KTVHCEqualRanges(KTVHCRange range1, KTVHCRange range2);
long long KTVHCRangeGetLength(KTVHCRange range);
NSString * KTVHCStringFromRange(KTVHCRange range);
-NSDictionary * KTVHCRangeFillToRequestHeaders(KTVHCRange range, NSDictionary * headers);
-NSDictionary * KTVHCRangeFillToResponseHeaders(KTVHCRange range, NSDictionary * headers, long long totalLength);
+NSDictionary * KTVHCRangeFillToRequestHeaders(KTVHCRange range, NSDictionary *eaders);
+NSDictionary * KTVHCRangeFillToRequestHeadersIfNeeded(KTVHCRange range, NSDictionary *headers);
+NSDictionary * KTVHCRangeFillToResponseHeaders(KTVHCRange range, NSDictionary *headers, long long totalLength);
KTVHCRange KTVHCMakeRange(long long start, long long end);
KTVHCRange KTVHCRangeZero(void);
KTVHCRange KTVHCRangeFull(void);
KTVHCRange KTVHCRangeInvaild(void);
-KTVHCRange KTVHCRangeWithSeparateValue(NSString * value);
-KTVHCRange KTVHCRangeWithRequestHeaderValue(NSString * value);
-KTVHCRange KTVHCRangeWithResponseHeaderValue(NSString * value, long long * totalLength);
+KTVHCRange KTVHCRangeWithSeparateValue(NSString *value);
+KTVHCRange KTVHCRangeWithRequestHeaderValue(NSString *value);
+KTVHCRange KTVHCRangeWithResponseHeaderValue(NSString *value, long long *totalLength);
KTVHCRange KTVHCRangeWithEnsureLength(KTVHCRange range, long long ensureLength);
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.m
index 7becefe8f..6cdbef848 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCCommon/KTVHCRange.m
@@ -30,43 +30,48 @@ BOOL KTVHCEqualRanges(KTVHCRange range1, KTVHCRange range2)
long long KTVHCRangeGetLength(KTVHCRange range)
{
- if (range.start == KTVHCNotFound || range.end == KTVHCNotFound)
- {
+ if (range.start == KTVHCNotFound || range.end == KTVHCNotFound) {
return KTVHCNotFound;
}
return range.end - range.start + 1;
}
-NSString * KTVHCStringFromRange(KTVHCRange range)
+NSString *KTVHCStringFromRange(KTVHCRange range)
{
return [NSString stringWithFormat:@"Range : {%lld, %lld}", range.start, range.end];
}
-NSString * KTVHCRangeGetHeaderString(KTVHCRange range)
+NSString *KTVHCRangeGetHeaderString(KTVHCRange range)
{
- NSMutableString * string = [NSMutableString stringWithFormat:@"bytes="];
- if (range.start != KTVHCNotFound)
- {
+ NSMutableString *string = [NSMutableString stringWithFormat:@"bytes="];
+ if (range.start != KTVHCNotFound) {
[string appendFormat:@"%lld", range.start];
}
[string appendFormat:@"-"];
- if (range.end != KTVHCNotFound)
- {
+ if (range.end != KTVHCNotFound) {
[string appendFormat:@"%lld", range.end];
}
return [string copy];
}
-NSDictionary * KTVHCRangeFillToRequestHeaders(KTVHCRange range, NSDictionary * headers)
+NSDictionary *KTVHCRangeFillToRequestHeaders(KTVHCRange range, NSDictionary *headers)
{
- NSMutableDictionary * ret = [NSMutableDictionary dictionaryWithDictionary:headers];
+ NSMutableDictionary *ret = [NSMutableDictionary dictionaryWithDictionary:headers];
[ret setObject:KTVHCRangeGetHeaderString(range) forKey:@"Range"];
return ret;
}
-NSDictionary * KTVHCRangeFillToResponseHeaders(KTVHCRange range, NSDictionary * headers, long long totalLength)
+NSDictionary *KTVHCRangeFillToRequestHeadersIfNeeded(KTVHCRange range, NSDictionary *headers)
{
- NSMutableDictionary * ret = [NSMutableDictionary dictionaryWithDictionary:headers];
+ if ([headers objectForKey:@"Range"]) {
+ return headers;
+ }
+ return KTVHCRangeFillToRequestHeaders(range, headers);
+}
+
+NSDictionary *KTVHCRangeFillToResponseHeaders(KTVHCRange range, NSDictionary *headers, long long totalLength)
+{
+ NSMutableDictionary *ret = [NSMutableDictionary dictionaryWithDictionary:headers];
long long currentLength = KTVHCRangeGetLength(range);
[ret setObject:[NSString stringWithFormat:@"%lld", currentLength] forKey:@"Content-Length"];
[ret setObject:[NSString stringWithFormat:@"bytes %lld-%lld/%lld", range.start, range.end, totalLength] forKey:@"Content-Range"];
@@ -94,35 +99,27 @@ KTVHCRange KTVHCRangeInvaild()
return KTVHCMakeRange(KTVHCNotFound, KTVHCNotFound);
}
-KTVHCRange KTVHCRangeWithSeparateValue(NSString * value)
+KTVHCRange KTVHCRangeWithSeparateValue(NSString *value)
{
KTVHCRange range = KTVHCRangeInvaild();
- if (value.length > 0)
- {
- NSArray * components = [value componentsSeparatedByString:@","];
- if (components.count == 1)
- {
+ if (value.length > 0) {
+ NSArray *components = [value componentsSeparatedByString:@","];
+ if (components.count == 1) {
components = [components.firstObject componentsSeparatedByString:@"-"];
- if (components.count == 2)
- {
- NSString * startString = [components objectAtIndex:0];
+ if (components.count == 2) {
+ NSString *startString = [components objectAtIndex:0];
NSInteger startValue = [startString integerValue];
- NSString * endString = [components objectAtIndex:1];
+ NSString *endString = [components objectAtIndex:1];
NSInteger endValue = [endString integerValue];
- if (startString.length && (startValue >= 0) && endString.length && (endValue >= startValue))
- {
+ if (startString.length && (startValue >= 0) && endString.length && (endValue >= startValue)) {
// The second 500 bytes: "500-999"
range.start = startValue;
range.end = endValue;
- }
- else if (startString.length && (startValue >= 0))
- {
+ } else if (startString.length && (startValue >= 0)) {
// The bytes after 9500 bytes: "9500-"
range.start = startValue;
range.end = KTVHCNotFound;
- }
- else if (endString.length && (endValue > 0))
- {
+ } else if (endString.length && (endValue > 0)) {
// The final 500 bytes: "-500"
range.start = KTVHCNotFound;
range.end = endValue;
@@ -133,27 +130,24 @@ KTVHCRange KTVHCRangeWithSeparateValue(NSString * value)
return range;
}
-KTVHCRange KTVHCRangeWithRequestHeaderValue(NSString * value)
+KTVHCRange KTVHCRangeWithRequestHeaderValue(NSString *value)
{
- if ([value hasPrefix:@"bytes="])
- {
- NSString * rangeString = [value substringFromIndex:6];
+ if ([value hasPrefix:@"bytes="]) {
+ NSString *rangeString = [value substringFromIndex:6];
return KTVHCRangeWithSeparateValue(rangeString);
}
return KTVHCRangeInvaild();
}
-KTVHCRange KTVHCRangeWithResponseHeaderValue(NSString * value, long long * totalLength)
+KTVHCRange KTVHCRangeWithResponseHeaderValue(NSString *value, long long *totalLength)
{
- if ([value hasPrefix:@"bytes "])
- {
+ if ([value hasPrefix:@"bytes "]) {
value = [value stringByReplacingOccurrencesOfString:@"bytes " withString:@""];
NSRange range = [value rangeOfString:@"/"];
- if (range.location != NSNotFound)
- {
- NSString * rangeString = [value substringToIndex:range.location];
- NSString * totalLengthString = [value substringFromIndex:range.location + range.length];
- * totalLength = totalLengthString.longLongValue;
+ if (range.location != NSNotFound) {
+ NSString *rangeString = [value substringToIndex:range.location];
+ NSString *totalLengthString = [value substringFromIndex:range.location + range.length];
+ *totalLength = totalLengthString.longLongValue;
return KTVHCRangeWithSeparateValue(rangeString);
}
}
@@ -162,8 +156,7 @@ KTVHCRange KTVHCRangeWithResponseHeaderValue(NSString * value, long long * total
KTVHCRange KTVHCRangeWithEnsureLength(KTVHCRange range, long long ensureLength)
{
- if (range.end == KTVHCNotFound && ensureLength > 0)
- {
+ if (range.end == KTVHCNotFound && ensureLength > 0) {
return KTVHCMakeRange(range.start, ensureLength - 1);
}
return range;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.h
index ca9bdfa1e..735540013 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.h
@@ -15,10 +15,11 @@
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-@property (nonatomic, copy, readonly) NSURL * URL;
-@property (nonatomic, assign, readonly) long long totalLength;
-@property (nonatomic, assign, readonly) long long cacheLength;
-@property (nonatomic, assign, readonly) long long vaildLength;
-@property (nonatomic, copy, readonly) NSArray <KTVHCDataCacheItemZone *> * zones;
+@property (nonatomic, copy, readonly) NSURL *URL;
+@property (nonatomic, copy, readonly) NSArray<KTVHCDataCacheItemZone *> *zones;
+
+@property (nonatomic, readonly) long long totalLength;
+@property (nonatomic, readonly) long long cacheLength;
+@property (nonatomic, readonly) long long vaildLength;
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.m
index 6636e0a80..9fdea415c 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItem.m
@@ -7,36 +7,22 @@
//
#import "KTVHCDataCacheItem.h"
-#import "KTVHCDataPrivate.h"
+#import "KTVHCData+Internal.h"
@implementation KTVHCDataCacheItem
-+ (instancetype)itemWithURL:(NSURL *)URL
- totalLength:(long long)totalLength
- cacheLength:(long long)cacheLength
- vaildLength:(long long)vaildLength
- zones:(NSArray <KTVHCDataCacheItemZone *> *)zones
-{
- return [[self alloc] initWithURL:URL
- totalLength:totalLength
- cacheLength:cacheLength
- vaildLength:vaildLength
- zones:zones];
-}
-
- (instancetype)initWithURL:(NSURL *)URL
+ zones:(NSArray<KTVHCDataCacheItemZone *> *)zones
totalLength:(long long)totalLength
cacheLength:(long long)cacheLength
vaildLength:(long long)vaildLength
- zones:(NSArray <KTVHCDataCacheItemZone *> *)zones
{
- if (self = [super init])
- {
- _URL = URL;
- _totalLength = totalLength;
- _cacheLength = cacheLength;
- _vaildLength = vaildLength;
- _zones = zones;
+ if (self = [super init]) {
+ self->_URL = [URL copy];
+ self->_zones = [zones copy];
+ self->_totalLength = totalLength;
+ self->_cacheLength = cacheLength;
+ self->_vaildLength = vaildLength;
}
return self;
}
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.h
index b1275c67e..def78851b 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.h
@@ -13,7 +13,7 @@
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-@property (nonatomic, assign, readonly) long long offset;
-@property (nonatomic, assign, readonly) long long length;
+@property (nonatomic, readonly) long long offset;
+@property (nonatomic, readonly) long long length;
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.m
index 35dbd2044..547e25ddb 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataCacheItemZone.m
@@ -7,21 +7,15 @@
//
#import "KTVHCDataCacheItemZone.h"
-#import "KTVHCDataPrivate.h"
+#import "KTVHCData+Internal.h"
@implementation KTVHCDataCacheItemZone
-+ (instancetype)itemZoneWithOffset:(long long)offset length:(long long)length
-{
- return [[self alloc] initWithOffset:offset length:length];
-}
-
- (instancetype)initWithOffset:(long long)offset length:(long long)length
{
- if (self = [super init])
- {
- _offset = offset;
- _length = length;
+ if (self = [super init]) {
+ self->_offset = offset;
+ self->_length = length;
}
return self;
}
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.h
index 13ddaa671..5dd60d027 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.h
@@ -7,36 +7,26 @@
//
#import <Foundation/Foundation.h>
-#import "KTVHCDataSourceProtocol.h"
+#import "KTVHCDataSource.h"
@class KTVHCDataFileSource;
@protocol KTVHCDataFileSourceDelegate <NSObject>
-- (void)fileSourceDidPrepared:(KTVHCDataFileSource *)fileSource;
-- (void)fileSource:(KTVHCDataFileSource *)fileSource didFailed:(NSError *)error;
+- (void)ktv_fileSourceDidPrepare:(KTVHCDataFileSource *)fileSource;
+- (void)ktv_fileSource:(KTVHCDataFileSource *)fileSource didFailWithError:(NSError *)error;
@end
-@interface KTVHCDataFileSource : NSObject <KTVHCDataSourceProtocol>
+@interface KTVHCDataFileSource : NSObject <KTVHCDataSource>
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithPath:(NSString *)path range:(KTVHCRange)range readRange:(KTVHCRange)readRange;
+- (instancetype)initWithPath:(NSString *)path range:(KTVHCRange)range readRange:(KTVHCRange)readRange NS_DESIGNATED_INITIALIZER;
-@property (nonatomic, copy, readonly) NSString * path;
-@property (nonatomic, assign, readonly) KTVHCRange range;
-@property (nonatomic, assign, readonly) KTVHCRange readRange;
-
-@property (nonatomic, assign, readonly) BOOL didPrepared;
-@property (nonatomic, assign, readonly) BOOL didFinished;
-@property (nonatomic, assign, readonly) BOOL didClosed;
-
-- (void)prepare;
-- (void)close;
-
-- (NSData *)readDataOfLength:(NSUInteger)length;
+@property (nonatomic, copy, readonly) NSString *path;
+@property (nonatomic, readonly) KTVHCRange readRange;
@property (nonatomic, weak, readonly) id<KTVHCDataFileSourceDelegate> delegate;
@property (nonatomic, strong, readonly) dispatch_queue_t delegateQueue;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.m
index 6ffff3f33..382bf928b 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataFileSource.m
@@ -13,23 +13,28 @@
@interface KTVHCDataFileSource () <NSLocking>
-@property (nonatomic, strong) NSError * error;
-@property (nonatomic, strong) NSLock * coreLock;
-@property (nonatomic, strong) NSFileHandle * readingHandle;
-@property (nonatomic, assign) long long readedLength;
+@property (nonatomic, strong) NSLock *coreLock;
+@property (nonatomic, strong) NSFileHandle *readingHandle;
@end
@implementation KTVHCDataFileSource
+@synthesize error = _error;
+@synthesize range = _range;
+@synthesize closed = _closed;
+@synthesize prepared = _prepared;
+@synthesize finished = _finished;
+@synthesize readedLength = _readedLength;
+
- (instancetype)initWithPath:(NSString *)path range:(KTVHCRange)range readRange:(KTVHCRange)readRange
{
if (self = [super init])
{
KTVHCLogAlloc(self);
- _path = path;
- _range = range;
- _readRange = readRange;
+ self->_path = path;
+ self->_range = range;
+ self->_readRange = readRange;
KTVHCLogDataFileSource(@"%p, Create file source\npath : %@\nrange : %@\nreadRange : %@", self, path, KTVHCStringFromRange(range), KTVHCStringFromRange(readRange));
}
return self;
@@ -43,30 +48,25 @@
- (void)prepare
{
[self lock];
- if (self.didPrepared)
- {
+ if (self.isPrepared) {
[self unlock];
return;
}
KTVHCLogDataFileSource(@"%p, Call prepare", self);
self.readingHandle = [NSFileHandle fileHandleForReadingAtPath:self.path];
- @try
- {
+ @try {
[self.readingHandle seekToFileOffset:self.readRange.start];
- _didPrepared = YES;
- if ([self.delegate respondsToSelector:@selector(fileSourceDidPrepared:)])
- {
+ self->_prepared = YES;
+ if ([self.delegate respondsToSelector:@selector(ktv_fileSourceDidPrepare:)]) {
KTVHCLogDataFileSource(@"%p, Callback for prepared - Begin", self);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataFileSource(@"%p, Callback for prepared - End", self);
- [self.delegate fileSourceDidPrepared:self];
+ [self.delegate ktv_fileSourceDidPrepare:self];
}];
}
- }
- @catch (NSException * exception)
- {
+ } @catch (NSException *exception) {
KTVHCLogDataFileSource(@"%p, Seek file exception\nname : %@\nreason : %@\nuserInfo : %@", self, exception.name, exception.reason, exception.userInfo);
- NSError * error = [KTVHCError errorForException:exception];
+ NSError *error = [KTVHCError errorForException:exception];
[self callbackForFailed:error];
}
[self unlock];
@@ -75,12 +75,11 @@
- (void)close
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- _didClosed = YES;
+ self->_closed = YES;
KTVHCLogDataFileSource(@"%p, Call close", self);
[self destoryReadingHandle];
[self unlock];
@@ -89,38 +88,31 @@
- (NSData *)readDataOfLength:(NSUInteger)length
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return nil;
}
- if (self.didFinished)
- {
+ if (self.isFinished) {
[self unlock];
return nil;
}
- NSData * data = nil;
- @try
- {
+ NSData *data = nil;
+ @try {
long long readLength = KTVHCRangeGetLength(self.readRange);
length = (NSUInteger)MIN(readLength - self.readedLength, length);
data = [self.readingHandle readDataOfLength:length];
- if (data.length > 0)
- {
- self.readedLength += data.length;
+ self->_readedLength += data.length;
+ if (data.length > 0) {
KTVHCLogDataFileSource(@"%p, Read data : %lld, %lld, %lld", self, (long long)data.length, self.readedLength, readLength);
}
- if (self.readedLength >= readLength)
- {
+ if (self.readedLength >= readLength) {
KTVHCLogDataFileSource(@"%p, Read data did finished", self);
[self destoryReadingHandle];
- _didFinished = YES;
+ self->_finished = YES;
}
- }
- @catch (NSException * exception)
- {
+ } @catch (NSException *exception) {
KTVHCLogDataFileSource(@"%p, Read exception\nname : %@\nreason : %@\nuserInfo : %@", self, exception.name, exception.reason, exception.userInfo);
- NSError * error = [KTVHCError errorForException:exception];
+ NSError *error = [KTVHCError errorForException:exception];
[self callbackForFailed:error];
}
[self unlock];
@@ -129,14 +121,10 @@
- (void)destoryReadingHandle
{
- if (self.readingHandle)
- {
- @try
- {
+ if (self.readingHandle) {
+ @try {
[self.readingHandle closeFile];
- }
- @catch (NSException * exception)
- {
+ } @catch (NSException *exception) {
KTVHCLogDataFileSource(@"%p, Close exception\nname : %@\nreason : %@\nuserInfo : %@", self, exception.name, exception.reason, exception.userInfo);
}
self.readingHandle = nil;
@@ -145,35 +133,31 @@
- (void)callbackForFailed:(NSError *)error
{
- if (!error)
- {
+ if (!error) {
return;
}
- if (self.error)
- {
+ if (self.error) {
return;
}
- self.error = error;
- if ([self.delegate respondsToSelector:@selector(fileSource:didFailed:)])
- {
+ self->_error = error;
+ if ([self.delegate respondsToSelector:@selector(ktv_fileSource:didFailWithError:)]) {
KTVHCLogDataFileSource(@"%p, Callback for prepared - Begin", self);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataFileSource(@"%p, Callback for prepared - End", self);
- [self.delegate fileSource:self didFailed:self.error];
+ [self.delegate ktv_fileSource:self didFailWithError:self.error];
}];
}
}
- (void)setDelegate:(id <KTVHCDataFileSourceDelegate>)delegate delegateQueue:(dispatch_queue_t)delegateQueue
{
- _delegate = delegate;
- _delegateQueue = delegateQueue;
+ self->_delegate = delegate;
+ self->_delegateQueue = delegateQueue;
}
- (void)lock
{
- if (!self.coreLock)
- {
+ if (!self.coreLock) {
self.coreLock = [[NSLock alloc] init];
}
[self.coreLock lock];
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.h
index f234acd9c..b76b7439d 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.h
@@ -14,9 +14,9 @@
@protocol KTVHCDataLoaderDelegate <NSObject>
-- (void)loaderDidFinished:(KTVHCDataLoader *)loader;
-- (void)loader:(KTVHCDataLoader *)loader didFailed:(NSError *)error;
-- (void)loader:(KTVHCDataLoader *)loader didChangeProgress:(double)progress;
+- (void)ktv_loaderDidFinish:(KTVHCDataLoader *)loader;
+- (void)ktv_loader:(KTVHCDataLoader *)loader didFailWithError:(NSError *)error;
+- (void)ktv_loader:(KTVHCDataLoader *)loader didChangeProgress:(double)progress;
@end
@@ -25,21 +25,19 @@
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)loaderWithRequest:(KTVHCDataRequest *)request;
-
@property (nonatomic, weak) id <KTVHCDataLoaderDelegate> delegate;
-
@property (nonatomic, strong) id object;
-@property (nonatomic, strong, readonly) KTVHCDataRequest * request;
-@property (nonatomic, strong, readonly) KTVHCDataResponse * response;
+@property (nonatomic, strong, readonly) KTVHCDataRequest *request;
+@property (nonatomic, strong, readonly) KTVHCDataResponse *response;
-@property (nonatomic, strong, readonly) NSError * error;
+@property (nonatomic, copy, readonly) NSError *error;
-@property (nonatomic, assign, readonly) BOOL didClosed;
-@property (nonatomic, assign, readonly) BOOL didFinished;
+@property (nonatomic, readonly, getter=isFinished) BOOL finished;
+@property (nonatomic, readonly, getter=isClosed) BOOL closed;
-@property (nonatomic, assign, readonly) double progress;
+@property (nonatomic, readonly) long long loadedLength;
+@property (nonatomic, readonly) double progress;
- (void)prepare;
- (void)close;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.m
index 61ae034fa..fd6076147 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataLoader.m
@@ -7,29 +7,22 @@
//
#import "KTVHCDataLoader.h"
-#import "KTVHCDataReader.h"
-#import "KTVHCDataResponse.h"
+#import "KTVHCData+Internal.h"
#import "KTVHCLog.h"
@interface KTVHCDataLoader () <KTVHCDataReaderDelegate>
-@property (nonatomic, strong) KTVHCDataReader * reader;
+@property (nonatomic, strong) KTVHCDataReader *reader;
@end
@implementation KTVHCDataLoader
-+ (instancetype)loaderWithRequest:(KTVHCDataRequest *)request
-{
- return [[self alloc] initWithRequest:request];
-}
-
- (instancetype)initWithRequest:(KTVHCDataRequest *)request
{
- if (self = [super init])
- {
+ if (self = [super init]) {
KTVHCLogAlloc(self);
- self.reader = [KTVHCDataReader readerWithRequest:request];
+ self.reader = [[KTVHCDataReader alloc] initWithRequest:request];
self.reader.delegate = self;
KTVHCLogDataLoader(@"%p, Create loader\norignalRequest : %@\nreader : %@", self, request, self.reader);
}
@@ -70,65 +63,60 @@
return self.reader.error;
}
-- (BOOL)didClosed
+- (BOOL)isFinished
{
- return self.reader.didClosed;
+ return self.reader.isFinished;
}
-- (BOOL)didFinished
+- (BOOL)isClosed
{
- return self.reader.didFinished;
+ return self.reader.isClosed;
}
#pragma mark - KTVHCDataReaderDelegate
-- (void)readerDidPrepared:(KTVHCDataReader *)reader
+- (void)ktv_readerDidPrepare:(KTVHCDataReader *)reader
{
[self readData];
}
-- (void)readerHasAvailableData:(KTVHCDataReader *)reader
+- (void)ktv_readerHasAvailableData:(KTVHCDataReader *)reader
{
[self readData];
}
-- (void)reader:(KTVHCDataReader *)reader didFailed:(NSError *)error
+- (void)ktv_reader:(KTVHCDataReader *)reader didFailWithError:(NSError *)error
{
KTVHCLogDataLoader(@"%p, Callback for failed", self);
- if ([self.delegate respondsToSelector:@selector(loader:didFailed:)])
- {
- [self.delegate loader:self didFailed:error];
+ if ([self.delegate respondsToSelector:@selector(ktv_loader:didFailWithError:)]) {
+ [self.delegate ktv_loader:self didFailWithError:error];
}
}
- (void)readData
{
- while (YES)
- {
- @autoreleasepool
- {
- NSData * data = [self.reader readDataOfLength:1024 * 1024 * 1];
- if (self.reader.didFinished)
- {
- _progress = 1.0f;
- if ([self.delegate respondsToSelector:@selector(loader:didChangeProgress:)])
- {
- [self.delegate loader:self didChangeProgress:_progress];
+ while (YES) {
+ @autoreleasepool {
+ NSData *data = [self.reader readDataOfLength:1024 * 1024 * 1];
+ if (self.reader.isFinished) {
+ self->_loadedLength = self.reader.readedLength;
+ self->_progress = 1.0f;
+ if ([self.delegate respondsToSelector:@selector(ktv_loader:didChangeProgress:)]) {
+ [self.delegate ktv_loader:self didChangeProgress:self.progress];
}
KTVHCLogDataLoader(@"%p, Callback finished", self);
- if ([self.delegate respondsToSelector:@selector(loaderDidFinished:)])
- {
- [self.delegate loaderDidFinished:self];
+ if ([self.delegate respondsToSelector:@selector(ktv_loaderDidFinish:)]) {
+ [self.delegate ktv_loaderDidFinish:self];
}
- }
- else if (data)
- {
- _progress = (double)self.reader.readOffset / (double)self.response.currentLength;
- if ([self.delegate respondsToSelector:@selector(loader:didChangeProgress:)])
- {
- [self.delegate loader:self didChangeProgress:_progress];
+ } else if (data) {
+ self->_loadedLength = self.reader.readedLength;
+ if (self.response.contentLength > 0) {
+ self->_progress = (double)self.reader.readedLength / (double)self.response.contentLength;
+ }
+ if ([self.delegate respondsToSelector:@selector(ktv_loader:didChangeProgress:)]) {
+ [self.delegate ktv_loader:self didChangeProgress:self.progress];
}
- KTVHCLogDataLoader(@"%p, read data progress %f", self, _progress);
+ KTVHCLogDataLoader(@"%p, read data progress %f", self, self.progress);
continue;
}
KTVHCLogDataLoader(@"%p, read data break", self);
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.h
index 47598dd90..f1451c695 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.h
@@ -7,7 +7,7 @@
//
#import <Foundation/Foundation.h>
-#import "KTVHCDataSourceProtocol.h"
+#import "KTVHCDataSource.h"
#import "KTVHCDataRequest.h"
#import "KTVHCDataResponse.h"
@@ -15,32 +15,22 @@
@protocol KTVHCDataNetworkSourceDelegate <NSObject>
-- (void)networkSourceDidPrepared:(KTVHCDataNetworkSource *)networkSource;
-- (void)networkSourceHasAvailableData:(KTVHCDataNetworkSource *)networkSource;
-- (void)networkSourceDidFinishedDownload:(KTVHCDataNetworkSource *)networkSource;
-- (void)networkSource:(KTVHCDataNetworkSource *)networkSource didFailed:(NSError *)error;
+- (void)ktv_networkSourceDidPrepare:(KTVHCDataNetworkSource *)networkSource;
+- (void)ktv_networkSourceHasAvailableData:(KTVHCDataNetworkSource *)networkSource;
+- (void)ktv_networkSourceDidFinisheDownload:(KTVHCDataNetworkSource *)networkSource;
+- (void)ktv_networkSource:(KTVHCDataNetworkSource *)networkSource didFailWithError:(NSError *)error;
@end
-@interface KTVHCDataNetworkSource : NSObject <KTVHCDataSourceProtocol>
+@interface KTVHCDataNetworkSource : NSObject <KTVHCDataSource>
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithRequest:(KTVHCDataRequest *)reqeust;
+- (instancetype)initWithRequest:(KTVHCDataRequest *)reqeust NS_DESIGNATED_INITIALIZER;
-@property (nonatomic, strong, readonly) KTVHCDataRequest * request;
-@property (nonatomic, strong, readonly) KTVHCDataResponse * response;
-@property (nonatomic, assign, readonly) KTVHCRange range;
-
-@property (nonatomic, assign, readonly) BOOL didPrepared;
-@property (nonatomic, assign, readonly) BOOL didFinished;
-@property (nonatomic, assign, readonly) BOOL didClosed;
-
-- (void)prepare;
-- (void)close;
-
-- (NSData *)readDataOfLength:(NSUInteger)length;
+@property (nonatomic, strong, readonly) KTVHCDataRequest *request;
+@property (nonatomic, strong, readonly) KTVHCDataResponse *response;
@property (nonatomic, weak, readonly) id<KTVHCDataNetworkSourceDelegate> delegate;
@property (nonatomic, strong, readonly) dispatch_queue_t delegateQueue;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.m
index 0ce3e19c7..7e593f00e 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataNetworkSource.m
@@ -9,37 +9,42 @@
#import "KTVHCDataNetworkSource.h"
#import "KTVHCDataUnitPool.h"
#import "KTVHCDataCallback.h"
-#import "KTVHCPathTools.h"
+#import "KTVHCPathTool.h"
#import "KTVHCDownload.h"
#import "KTVHCError.h"
#import "KTVHCLog.h"
@interface KTVHCDataNetworkSource () <NSLocking, KTVHCDownloadDelegate>
-@property (nonatomic, strong) NSError * error;
-@property (nonatomic, strong) NSLock * coreLock;
-@property (nonatomic, assign) long long downloadLength;
-@property (nonatomic, assign) long long downloadReadedLength;
-@property (nonatomic, assign) BOOL downloadDidCallComplete;
-@property (nonatomic, assign) BOOL needCallHasAvailableData;
-@property (nonatomic, assign) BOOL didCalledPrepare;
+@property (nonatomic, strong) NSLock *coreLock;
+@property (nonatomic, strong) NSFileHandle *readingHandle;
+@property (nonatomic, strong) NSFileHandle *writingHandle;
+@property (nonatomic, strong) KTVHCDataUnitItem *unitItem;
+@property (nonatomic, strong) NSURLSessionTask *downlaodTask;
-@property (nonatomic, strong) KTVHCDataUnitItem * unitItem;
-@property (nonatomic, strong) NSFileHandle * readingHandle;
-@property (nonatomic, strong) NSFileHandle * writingHandle;
-@property (nonatomic, assign) NSURLSessionTask * downlaodTask;
+@property (nonatomic) long long downloadLength;
+@property (nonatomic) BOOL downloadCalledComplete;
+@property (nonatomic) BOOL callHasAvailableData;
+@property (nonatomic) BOOL calledPrepare;
@end
@implementation KTVHCDataNetworkSource
+@synthesize error = _error;
+@synthesize range = _range;
+@synthesize closed = _closed;
+@synthesize prepared = _prepared;
+@synthesize finished = _finished;
+@synthesize readedLength = _readedLength;
+
- (instancetype)initWithRequest:(KTVHCDataRequest *)reqeust
{
if (self = [super init])
{
KTVHCLogAlloc(self);
- _request = reqeust;
- _range = reqeust.range;
+ self->_request = reqeust;
+ self->_range = reqeust.range;
KTVHCLogDataNetworkSource(@"%p, Create network source\nrequest : %@\nrange : %@", self, self.request, KTVHCStringFromRange(self.range));
}
return self;
@@ -48,23 +53,21 @@
- (void)dealloc
{
KTVHCLogDealloc(self);
- KTVHCLogDataNetworkSource(@"%p, Destory network source\nError : %@\ndownloadLength : %lld\nreadedLength : %lld", self, self.error, self.downloadLength, self.downloadReadedLength);
+ KTVHCLogDataNetworkSource(@"%p, Destory network source\nError : %@\ndownloadLength : %lld\nreadedLength : %lld", self, self.error, self.downloadLength, self.readedLength);
}
- (void)prepare
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- if (self.didCalledPrepare)
- {
+ if (self.calledPrepare) {
[self unlock];
return;
}
- _didCalledPrepare = YES;
+ self->_calledPrepare = YES;
KTVHCLogDataNetworkSource(@"%p, Call prepare", self);
self.downlaodTask = [[KTVHCDownload download] downloadWithRequest:self.request delegate:self];
[self unlock];
@@ -73,15 +76,13 @@
- (void)close
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- _didClosed = YES;
+ self->_closed = YES;
KTVHCLogDataNetworkSource(@"%p, Call close", self);
- if (!self.downloadDidCallComplete)
- {
+ if (!self.downloadCalledComplete) {
KTVHCLogDataNetworkSource(@"%p, Cancel download task", self);
[self.downlaodTask cancel];
self.downlaodTask = nil;
@@ -94,43 +95,34 @@
- (NSData *)readDataOfLength:(NSUInteger)length
{
[self lock];
- if (self.didClosed || self.didFinished || self.error)
- {
+ if (self.isClosed || self.isFinished || self.error) {
[self unlock];
return nil;
}
- if (self.downloadReadedLength >= self.downloadLength)
- {
- if (self.downloadDidCallComplete)
- {
- KTVHCLogDataNetworkSource(@"%p, Read data failed\ndownloadLength : %lld\nreadedLength : %lld", self, self.downloadReadedLength, self.downloadLength);
+ if (self.readedLength >= self.downloadLength) {
+ if (self.downloadCalledComplete) {
+ KTVHCLogDataNetworkSource(@"%p, Read data failed\ndownloadLength : %lld\nreadedLength : %lld", self, self.readedLength, self.downloadLength);
[self destoryReadingHandle];
- }
- else
- {
+ } else {
KTVHCLogDataNetworkSource(@"%p, Read data wait callback", self);
- self.needCallHasAvailableData = YES;
+ self.callHasAvailableData = YES;
}
[self unlock];
return nil;
}
- NSData * data = nil;
- @try
- {
- data = [self.readingHandle readDataOfLength:(NSUInteger)MIN(self.downloadLength - self.downloadReadedLength, length)];
- self.downloadReadedLength += data.length;
- KTVHCLogDataNetworkSource(@"%p, Read data\nLength : %lld\ndownloadLength : %lld\nreadedLength : %lld", self, (long long)data.length, self.downloadReadedLength, self.downloadLength);
- if (self.downloadReadedLength >= KTVHCRangeGetLength(self.response.range))
- {
- _didFinished = YES;
+ NSData *data = nil;
+ @try {
+ data = [self.readingHandle readDataOfLength:(NSUInteger)MIN(self.downloadLength - self.readedLength, length)];
+ self->_readedLength += data.length;
+ KTVHCLogDataNetworkSource(@"%p, Read data\nLength : %lld\ndownloadLength : %lld\nreadedLength : %lld", self, (long long)data.length, self.readedLength, self.downloadLength);
+ if (self.readedLength >= KTVHCRangeGetLength(self.response.contentRange)) {
+ self->_finished = YES;
KTVHCLogDataNetworkSource(@"%p, Read data did finished", self);
[self destoryReadingHandle];
}
- }
- @catch (NSException * exception)
- {
+ } @catch (NSException *exception) {
KTVHCLogDataFileSource(@"%p, Read exception\nname : %@\nreason : %@\nuserInfo : %@", self, exception.name, exception.reason, exception.userInfo);
- NSError * error = [KTVHCError errorForException:exception];
+ NSError *error = [KTVHCError errorForException:exception];
[self callbackForFailed:error];
}
[self unlock];
@@ -139,63 +131,49 @@
- (void)setDelegate:(id <KTVHCDataNetworkSourceDelegate>)delegate delegateQueue:(dispatch_queue_t)delegateQueue
{
- _delegate = delegate;
- _delegateQueue = delegateQueue;
+ self->_delegate = delegate;
+ self->_delegateQueue = delegateQueue;
}
-- (void)download:(KTVHCDownload *)download didCompleteWithError:(NSError *)error
+- (void)ktv_download:(KTVHCDownload *)download didCompleteWithError:(NSError *)error
{
[self lock];
- self.downloadDidCallComplete = YES;
+ self.downloadCalledComplete = YES;
[self destoryWritingHandle];
- if (self.didClosed)
- {
+ if (self.isClosed) {
KTVHCLogDataNetworkSource(@"%p, Complete but did closed\nError : %@", self, error);
- }
- else if (self.error)
- {
+ } else if (self.error) {
KTVHCLogDataNetworkSource(@"%p, Complete but did failed\nself.error : %@\nerror : %@", self, self.error, error);
- }
- else if (error)
- {
- if (error.code != NSURLErrorCancelled)
- {
+ } else if (error) {
+ if (error.code != NSURLErrorCancelled) {
[self callbackForFailed:error];
- }
- else
- {
+ } else {
KTVHCLogDataNetworkSource(@"%p, Complete with cancel\nError : %@", self, error);
}
- }
- else if (self.downloadLength >= KTVHCRangeGetLength(self.response.range))
- {
+ } else if (self.downloadLength >= KTVHCRangeGetLength(self.response.contentRange)) {
KTVHCLogDataNetworkSource(@"%p, Complete and finisehed", self);
- if ([self.delegate respondsToSelector:@selector(networkSourceDidFinishedDownload:)])
- {
+ if ([self.delegate respondsToSelector:@selector(ktv_networkSourceDidFinisheDownload:)]) {
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
- [self.delegate networkSourceDidFinishedDownload:self];
+ [self.delegate ktv_networkSourceDidFinisheDownload:self];
}];
}
- }
- else
- {
+ } else {
KTVHCLogDataNetworkSource(@"%p, Complete but not finisehed\ndownloadLength : %lld", self, self.downloadLength);
}
[self unlock];
}
-- (void)download:(KTVHCDownload *)download didReceiveResponse:(KTVHCDataResponse *)response
+- (void)ktv_download:(KTVHCDownload *)download didReceiveResponse:(KTVHCDataResponse *)response
{
[self lock];
- if (self.didClosed || self.error)
- {
+ if (self.isClosed || self.error) {
[self unlock];
return;
}
- _response = response;
- NSString * path = [KTVHCPathTools unitItemPathWithURL:self.request.URL offset:self.request.range.start];
+ self->_response = response;
+ NSString *path = [KTVHCPathTool filePathWithURL:self.request.URL offset:self.request.range.start];
self.unitItem = [[KTVHCDataUnitItem alloc] initWithPath:path offset:self.request.range.start];
- KTVHCDataUnit * unit = [[KTVHCDataUnitPool pool] unitWithURL:self.request.URL];
+ KTVHCDataUnit *unit = [[KTVHCDataUnitPool pool] unitWithURL:self.request.URL];
[unit insertUnitItem:self.unitItem];
KTVHCLogDataNetworkSource(@"%p, Receive response\nResponse : %@\nUnit : %@\nUnitItem : %@", self, response, unit, self.unitItem);
[unit workingRelease];
@@ -205,29 +183,24 @@
[self unlock];
}
-- (void)download:(KTVHCDownload *)download didReceiveData:(NSData *)data
+- (void)ktv_download:(KTVHCDownload *)download didReceiveData:(NSData *)data
{
[self lock];
- if (self.didClosed || self.error)
- {
+ if (self.isClosed || self.error) {
[self unlock];
return;
}
- @try
- {
+ @try {
[self.writingHandle writeData:data];
self.downloadLength += data.length;
- [self.unitItem setLength:self.downloadLength];
+ [self.unitItem updateLength:self.downloadLength];
KTVHCLogDataNetworkSource(@"%p, Receive data : %lld, %lld, %lld", self, (long long)data.length, self.downloadLength, self.unitItem.length);
[self callbackForHasAvailableData];
- }
- @catch (NSException * exception)
- {
- NSError * error = [KTVHCError errorForException:exception];
+ } @catch (NSException *exception) {
+ NSError *error = [KTVHCError errorForException:exception];
KTVHCLogDataNetworkSource(@"%p, write exception\nError : %@", self, error);
[self callbackForFailed:error];
- if (!self.downloadDidCallComplete)
- {
+ if (!self.downloadCalledComplete) {
KTVHCLogDataNetworkSource(@"%p, Cancel download task when write exception", self);
[self.downlaodTask cancel];
self.downlaodTask = nil;
@@ -238,14 +211,10 @@
- (void)destoryReadingHandle
{
- if (self.readingHandle)
- {
- @try
- {
+ if (self.readingHandle) {
+ @try {
[self.readingHandle closeFile];
- }
- @catch (NSException * exception)
- {
+ } @catch (NSException *exception) {
KTVHCLogDataFileSource(@"%p, Close reading handle exception\nname : %@\nreason : %@\nuserInfo : %@", self, exception.name, exception.reason, exception.userInfo);
}
self.readingHandle = nil;
@@ -254,15 +223,11 @@
- (void)destoryWritingHandle
{
- if (self.writingHandle)
- {
- @try
- {
+ if (self.writingHandle) {
+ @try {
[self.writingHandle synchronizeFile];
[self.writingHandle closeFile];
- }
- @catch (NSException * exception)
- {
+ } @catch (NSException *exception) {
KTVHCLogDataFileSource(@"%p, Close writing handle exception\nname : %@\nreason : %@\nuserInfo : %@", self, exception.name, exception.reason, exception.userInfo);
}
self.writingHandle = nil;
@@ -271,66 +236,57 @@
- (void)callbackForPrepared
{
- if (self.didClosed)
- {
+ if (self.isClosed) {
return;
}
- if (self.didPrepared)
- {
+ if (self.isPrepared) {
return;
}
- _didPrepared = YES;
- if ([self.delegate respondsToSelector:@selector(networkSourceDidPrepared:)])
- {
+ self->_prepared = YES;
+ if ([self.delegate respondsToSelector:@selector(ktv_networkSourceDidPrepare:)]) {
KTVHCLogDataNetworkSource(@"%p, Callback for prepared - Begin", self);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataNetworkSource(@"%p, Callback for prepared - End", self);
- [self.delegate networkSourceDidPrepared:self];
+ [self.delegate ktv_networkSourceDidPrepare:self];
}];
}
}
- (void)callbackForHasAvailableData
{
- if (self.didClosed)
- {
+ if (self.isClosed) {
return;
}
- if (!self.needCallHasAvailableData)
- {
+ if (!self.callHasAvailableData) {
return;
}
- self.needCallHasAvailableData = NO;
- if ([self.delegate respondsToSelector:@selector(networkSourceHasAvailableData:)])
- {
+ self.callHasAvailableData = NO;
+ if ([self.delegate respondsToSelector:@selector(ktv_networkSourceHasAvailableData:)]) {
KTVHCLogDataNetworkSource(@"%p, Callback for has available data - Begin", self);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataNetworkSource(@"%p, Callback for has available data - End", self);
- [self.delegate networkSourceHasAvailableData:self];
+ [self.delegate ktv_networkSourceHasAvailableData:self];
}];
}
}
- (void)callbackForFailed:(NSError *)error
{
- if (self.didClosed || !error || self.error)
- {
+ if (self.isClosed || !error || self.error) {
return;
}
- self.error = error;
+ self->_error = error;
KTVHCLogDataNetworkSource(@"%p, Callback for failed\nError : %@", self, self.error);
- if ([self.delegate respondsToSelector:@selector(networkSource:didFailed:)])
- {
+ if ([self.delegate respondsToSelector:@selector(ktv_networkSource:didFailWithError:)]) {
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
- [self.delegate networkSource:self didFailed:self.error];
+ [self.delegate ktv_networkSource:self didFailWithError:self.error];
}];
}
}
- (void)lock
{
- if (!self.coreLock)
- {
+ if (!self.coreLock) {
self.coreLock = [[NSLock alloc] init];
}
[self.coreLock lock];
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.h
index 6919a74ae..f91c4005a 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.h
@@ -14,9 +14,9 @@
@protocol KTVHCDataReaderDelegate <NSObject>
-- (void)readerDidPrepared:(KTVHCDataReader *)reader;
-- (void)readerHasAvailableData:(KTVHCDataReader *)reader;
-- (void)reader:(KTVHCDataReader *)reader didFailed:(NSError *)error;
+- (void)ktv_readerDidPrepare:(KTVHCDataReader *)reader;
+- (void)ktv_readerHasAvailableData:(KTVHCDataReader *)reader;
+- (void)ktv_reader:(KTVHCDataReader *)reader didFailWithError:(NSError *)error;
@end
@@ -25,22 +25,20 @@
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)readerWithRequest:(KTVHCDataRequest *)request;
-
@property (nonatomic, weak) id <KTVHCDataReaderDelegate> delegate;
-
@property (nonatomic, strong) id object;
-@property (nonatomic, strong, readonly) KTVHCDataRequest * request;
-@property (nonatomic, strong, readonly) KTVHCDataResponse * response;
+@property (nonatomic, strong, readonly) KTVHCDataRequest *request;
+@property (nonatomic, strong, readonly) KTVHCDataResponse *response;
-@property (nonatomic, strong, readonly) NSError * error;
+@property (nonatomic, copy, readonly) NSError *error;
-@property (nonatomic, assign, readonly) BOOL didClosed;
-@property (nonatomic, assign, readonly) BOOL didPrepared;
-@property (nonatomic, assign, readonly) BOOL didFinished;
+@property (nonatomic, readonly, getter=isPrepared) BOOL prepared;
+@property (nonatomic, readonly, getter=isFinished) BOOL finished;
+@property (nonatomic, readonly, getter=isClosed) BOOL closed;
-@property (nonatomic, assign, readonly) long long readOffset;
+@property (nonatomic, readonly) long long readedLength;
+@property (nonatomic, readonly) double progress;
- (void)prepare;
- (void)close;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.m
index b20c86ade..425f6c4cd 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataReader.m
@@ -7,6 +7,7 @@
//
#import "KTVHCDataReader.h"
+#import "KTVHCData+Internal.h"
#import "KTVHCDataSourceManager.h"
#import "KTVHCDataUnitPool.h"
#import "KTVHCDataCallback.h"
@@ -14,31 +15,23 @@
@interface KTVHCDataReader () <KTVHCDataSourceManagerDelegate>
-@property (nonatomic, strong) NSRecursiveLock * coreLock;
+@property (nonatomic, strong) KTVHCDataUnit *unit;
+@property (nonatomic, strong) NSRecursiveLock *coreLock;
@property (nonatomic, strong) dispatch_queue_t delegateQueue;
@property (nonatomic, strong) dispatch_queue_t internalDelegateQueue;
-@property (nonatomic, assign) BOOL didCalledPrepare;
-
-@property (nonatomic, strong) KTVHCDataUnit * unit;
-@property (nonatomic, strong) KTVHCDataSourceManager * sourceManager;
+@property (nonatomic, strong) KTVHCDataSourceManager *sourceManager;
+@property (nonatomic) BOOL calledPrepare;
@end
@implementation KTVHCDataReader
-+ (instancetype)readerWithRequest:(KTVHCDataRequest *)request
-{
- return [[self alloc] initWithRequest:request];
-}
-
- (instancetype)initWithRequest:(KTVHCDataRequest *)request
{
- if (self = [super init])
- {
+ if (self = [super init]) {
KTVHCLogAlloc(self);
self.unit = [[KTVHCDataUnitPool pool] unitWithURL:request.URL];
- _request = [request requestWithTotalLength:self.unit.totalLength];
- [self.unit updateRequestHeaders:self.request.headers];
+ self->_request = [request newRequestWithTotalLength:self.unit.totalLength];
self.delegateQueue = dispatch_queue_create("KTVHCDataReader_delegateQueue", DISPATCH_QUEUE_SERIAL);
self.internalDelegateQueue = dispatch_queue_create("KTVHCDataReader_internalDelegateQueue", DISPATCH_QUEUE_SERIAL);
KTVHCLogDataReader(@"%p, Create reader\norignalRequest : %@\nfinalRequest : %@\nUnit : %@", self, request, self.request, self.unit);
@@ -50,23 +43,21 @@
{
KTVHCLogDealloc(self);
[self close];
- KTVHCLogDataReader(@"%p, Destory reader\nError : %@\nreadOffset : %lld", self, self.error, self.readOffset);
+ KTVHCLogDataReader(@"%p, Destory reader\nError : %@\nreadOffset : %lld", self, self.error, self.readedLength);
}
- (void)prepare
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- if (self.didCalledPrepare)
- {
+ if (self.calledPrepare) {
[self unlock];
return;
}
- _didCalledPrepare = YES;
+ self->_calledPrepare = YES;
KTVHCLogDataReader(@"%p, Call prepare", self);
[self prepareSourceManager];
[self unlock];
@@ -75,12 +66,11 @@
- (void)close
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- _didClosed = YES;
+ self->_closed = YES;
KTVHCLogDataReader(@"%p, Call close", self);
[self.sourceManager close];
[self.unit workingRelease];
@@ -91,28 +81,29 @@
- (NSData *)readDataOfLength:(NSUInteger)length
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return nil;
}
- if (self.didFinished)
- {
+ if (self.isFinished) {
[self unlock];
return nil;
}
- if (self.error)
- {
+ if (self.error) {
[self unlock];
return nil;
}
- NSData * data = [self.sourceManager readDataOfLength:length];;
- _readOffset += data.length;
+ NSData *data = [self.sourceManager readDataOfLength:length];
+ if (data.length > 0) {
+ self->_readedLength += data.length;
+ if (self.response.contentLength > 0) {
+ self->_progress = (double)self.readedLength / (double)self.response.contentLength;
+ }
+ }
KTVHCLogDataReader(@"%p, Read data : %lld", self, (long long)data.length);
- if (self.sourceManager.didFinished)
- {
+ if (self.sourceManager.isFinished) {
KTVHCLogDataReader(@"%p, Read data did finished", self);
- _didFinished = YES;
+ self->_finished = YES;
[self close];
}
[self unlock];
@@ -121,35 +112,30 @@
- (void)prepareSourceManager
{
- self.sourceManager = [[KTVHCDataSourceManager alloc] initWithDelegate:self delegateQueue:self.internalDelegateQueue];
- NSMutableArray <KTVHCDataFileSource *> * fileSources = [NSMutableArray array];
- NSMutableArray <KTVHCDataNetworkSource *> * networkSources = [NSMutableArray array];
+ NSMutableArray<KTVHCDataFileSource *> *fileSources = [NSMutableArray array];
+ NSMutableArray<KTVHCDataNetworkSource *> *networkSources = [NSMutableArray array];
long long min = self.request.range.start;
long long max = self.request.range.end;
- NSArray * unitItems = self.unit.unitItems;
- for (KTVHCDataUnitItem * item in unitItems)
- {
+ NSArray *unitItems = self.unit.unitItems;
+ for (KTVHCDataUnitItem *item in unitItems) {
long long itemMin = item.offset;
long long itemMax = item.offset + item.length - 1;
- if (itemMax < min || itemMin > max)
- {
+ if (itemMax < min || itemMin > max) {
continue;
}
- if (min > itemMin)
- {
+ if (min > itemMin) {
itemMin = min;
}
- if (max < itemMax)
- {
+ if (max < itemMax) {
itemMax = max;
}
min = itemMax + 1;
KTVHCRange range = KTVHCMakeRange(item.offset, item.offset + item.length - 1);
KTVHCRange readRange = KTVHCMakeRange(itemMin - item.offset, itemMax - item.offset);
- KTVHCDataFileSource * source = [[KTVHCDataFileSource alloc] initWithPath:item.absolutePath range:range readRange:readRange];
+ KTVHCDataFileSource *source = [[KTVHCDataFileSource alloc] initWithPath:item.absolutePath range:range readRange:readRange];
[fileSources addObject:source];
}
- [fileSources sortUsingComparator:^NSComparisonResult(KTVHCDataFileSource * obj1, KTVHCDataFileSource * obj2) {
+ [fileSources sortUsingComparator:^NSComparisonResult(KTVHCDataFileSource *obj1, KTVHCDataFileSource *obj2) {
if (obj1.range.start < obj2.range.start) {
return NSOrderedAscending;
}
@@ -157,14 +143,12 @@
}];
long long offset = self.request.range.start;
long long length = KTVHCRangeIsFull(self.request.range) ? KTVHCRangeGetLength(self.request.range) : (self.request.range.end - offset + 1);
- for (KTVHCDataFileSource * obj in fileSources)
- {
+ for (KTVHCDataFileSource *obj in fileSources) {
long long delta = obj.range.start + obj.readRange.start - offset;
- if (delta > 0)
- {
+ if (delta > 0) {
KTVHCRange range = KTVHCMakeRange(offset, offset + delta - 1);
- KTVHCDataRequest * request = [self.request requestWithRange:range];
- KTVHCDataNetworkSource * source = [[KTVHCDataNetworkSource alloc] initWithRequest:request];
+ KTVHCDataRequest *request = [self.request newRequestWithRange:range];
+ KTVHCDataNetworkSource *source = [[KTVHCDataNetworkSource alloc] initWithRequest:request];
[networkSources addObject:source];
offset += delta;
length -= delta;
@@ -172,32 +156,27 @@
offset += KTVHCRangeGetLength(obj.readRange);
length -= KTVHCRangeGetLength(obj.readRange);
}
- if (length > 0)
- {
+ if (length > 0) {
KTVHCRange range = KTVHCMakeRange(offset, self.request.range.end);
- KTVHCDataRequest * request = [self.request requestWithRange:range];
- KTVHCDataNetworkSource * source = [[KTVHCDataNetworkSource alloc] initWithRequest:request];
+ KTVHCDataRequest *request = [self.request newRequestWithRange:range];
+ KTVHCDataNetworkSource *source = [[KTVHCDataNetworkSource alloc] initWithRequest:request];
[networkSources addObject:source];
}
- for (KTVHCDataFileSource * obj in fileSources)
- {
- [self.sourceManager putSource:obj];
- }
- for (KTVHCDataNetworkSource * obj in networkSources)
- {
- [self.sourceManager putSource:obj];
- }
+ NSMutableArray<id<KTVHCDataSource>> *sources = [NSMutableArray array];
+ [sources addObjectsFromArray:fileSources];
+ [sources addObjectsFromArray:networkSources];
+ self.sourceManager = [[KTVHCDataSourceManager alloc] initWithSources:sources delegate:self delegateQueue:self.internalDelegateQueue];
[self.sourceManager prepare];
}
-- (void)sourceManagerDidPrepared:(KTVHCDataSourceManager *)sourceManager
+- (void)ktv_sourceManagerDidPrepare:(KTVHCDataSourceManager *)sourceManager
{
[self lock];
[self callbackForPrepared];
[self unlock];
}
-- (void)sourceManager:(KTVHCDataSourceManager *)sourceManager didReceiveResponse:(KTVHCDataResponse *)response
+- (void)ktv_sourceManager:(KTVHCDataSourceManager *)sourceManager didReceiveResponse:(KTVHCDataResponse *)response
{
[self lock];
[self.unit updateResponseHeaders:response.headers totalLength:response.totalLength];
@@ -205,51 +184,45 @@
[self unlock];
}
-- (void)sourceManagerHasAvailableData:(KTVHCDataSourceManager *)sourceManager
+- (void)ktv_sourceManagerHasAvailableData:(KTVHCDataSourceManager *)sourceManager
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- if ([self.delegate respondsToSelector:@selector(readerHasAvailableData:)])
- {
+ if ([self.delegate respondsToSelector:@selector(ktv_readerHasAvailableData:)]) {
KTVHCLogDataReader(@"%p, Callback for has available data - Begin", self);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataReader(@"%p, Callback for has available data - End", self);
- [self.delegate readerHasAvailableData:self];
+ [self.delegate ktv_readerHasAvailableData:self];
}];
}
[self unlock];
}
-- (void)sourceManager:(KTVHCDataSourceManager *)sourceManager didFailed:(NSError *)error
+- (void)ktv_sourceManager:(KTVHCDataSourceManager *)sourceManager didFailWithError:(NSError *)error
{
- if (!error)
- {
+ if (!error) {
return;
}
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- if (self.error)
- {
+ if (self.error) {
[self unlock];
return;
}
- _error = error;
+ self->_error = error;
[self close];
- [[KTVHCLog log] addError:self.error];
- if ([self.delegate respondsToSelector:@selector(reader:didFailed:)])
- {
+ [[KTVHCLog log] addError:self.error forURL:self.request.URL];
+ if ([self.delegate respondsToSelector:@selector(ktv_reader:didFailWithError:)]) {
KTVHCLogDataReader(@"%p, Callback for failed - Begin\nError : %@", self, self.error);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataReader(@"%p, Callback for failed - End", self);
- [self.delegate reader:self didFailed:self.error];
+ [self.delegate ktv_reader:self didFailWithError:self.error];
}];
}
[self unlock];
@@ -257,28 +230,24 @@
- (void)callbackForPrepared
{
- if (self.didClosed)
- {
+ if (self.isClosed) {
return;
}
- if (self.didPrepared)
- {
+ if (self.isPrepared) {
return;
}
- if (self.sourceManager.didPrepared && self.unit.totalLength > 0)
- {
+ if (self.sourceManager.isPrepared && self.unit.totalLength > 0) {
long long totalLength = self.unit.totalLength;
KTVHCRange range = KTVHCRangeWithEnsureLength(self.request.range, totalLength);
- NSDictionary * headers = KTVHCRangeFillToResponseHeaders(range, self.unit.responseHeaders, totalLength);
- _response = [[KTVHCDataResponse alloc] initWithURL:self.request.URL headers:headers];
- _didPrepared = YES;
+ NSDictionary *headers = KTVHCRangeFillToResponseHeaders(range, self.unit.responseHeaders, totalLength);
+ self->_response = [[KTVHCDataResponse alloc] initWithURL:self.request.URL headers:headers];
+ self->_prepared = YES;
KTVHCLogDataReader(@"%p, Reader did prepared\nResponse : %@", self, self.response);
- if ([self.delegate respondsToSelector:@selector(readerDidPrepared:)])
- {
+ if ([self.delegate respondsToSelector:@selector(ktv_readerDidPrepare:)]) {
KTVHCLogDataReader(@"%p, Callback for prepared - Begin", self);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataReader(@"%p, Callback for prepared - End", self);
- [self.delegate readerDidPrepared:self];
+ [self.delegate ktv_readerDidPrepare:self];
}];
}
}
@@ -286,8 +255,7 @@
- (void)lock
{
- if (!self.coreLock)
- {
+ if (!self.coreLock) {
self.coreLock = [[NSRecursiveLock alloc] init];
}
[self.coreLock lock];
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.h
index 257bffbc3..b2fdc2b95 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.h
@@ -14,13 +14,10 @@
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithURL:(NSURL *)URL headers:(NSDictionary *)headers;
+- (instancetype)initWithURL:(NSURL *)URL headers:(NSDictionary *)headers NS_DESIGNATED_INITIALIZER;
-@property (nonatomic, copy, readonly) NSURL * URL;
-@property (nonatomic, copy, readonly) NSDictionary * headers;
-@property (nonatomic, assign, readonly) KTVHCRange range;
-
-- (KTVHCDataRequest *)requestWithRange:(KTVHCRange)range;
-- (KTVHCDataRequest *)requestWithTotalLength:(long long)totalLength;
+@property (nonatomic, copy, readonly) NSURL *URL;
+@property (nonatomic, copy, readonly) NSDictionary *headers;
+@property (nonatomic, readonly) KTVHCRange range;
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.m
index 1ad3d2241..37fbd036c 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataRequest.m
@@ -7,22 +7,18 @@
//
#import "KTVHCDataRequest.h"
+#import "KTVHCData+Internal.h"
#import "KTVHCLog.h"
@implementation KTVHCDataRequest
- (instancetype)initWithURL:(NSURL *)URL headers:(NSDictionary *)headers
{
- if (self = [super init])
- {
+ if (self = [super init]) {
KTVHCLogAlloc(self);
- _URL = URL;
- if (![headers objectForKey:@"Range"]) {
- _headers = KTVHCRangeFillToRequestHeaders(KTVHCRangeFull(), headers);
- } else {
- _headers = headers;
- }
- _range = KTVHCRangeWithRequestHeaderValue([_headers objectForKey:@"Range"]);
+ self->_URL = URL;
+ self->_headers = KTVHCRangeFillToRequestHeadersIfNeeded(KTVHCRangeFull(), headers);
+ self->_range = KTVHCRangeWithRequestHeaderValue([self.headers objectForKey:@"Range"]);
KTVHCLogDataRequest(@"%p Create data request\nURL : %@\nHeaders : %@\nRange : %@", self, self.URL, self.headers, KTVHCStringFromRange(self.range));
}
return self;
@@ -33,21 +29,17 @@
KTVHCLogDealloc(self);
}
-- (KTVHCDataRequest *)requestWithRange:(KTVHCRange)range
+- (KTVHCDataRequest *)newRequestWithRange:(KTVHCRange)range
{
- if (!KTVHCEqualRanges(self.range, range))
- {
- NSDictionary * headers = KTVHCRangeFillToRequestHeaders(range, self.headers);
- KTVHCDataRequest * obj = [[KTVHCDataRequest alloc] initWithURL:self.URL headers:headers];
- return obj;
- }
- return self;
+ NSDictionary *headers = KTVHCRangeFillToRequestHeaders(range, self.headers);
+ KTVHCDataRequest *obj = [[KTVHCDataRequest alloc] initWithURL:self.URL headers:headers];
+ return obj;
}
-- (KTVHCDataRequest *)requestWithTotalLength:(long long)totalLength
+- (KTVHCDataRequest *)newRequestWithTotalLength:(long long)totalLength
{
KTVHCRange range = KTVHCRangeWithEnsureLength(self.range, totalLength);
- return [self requestWithRange:range];
+ return [self newRequestWithRange:range];
}
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.h
index 78681f235..7031ac29d 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.h
@@ -14,17 +14,12 @@
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithURL:(NSURL *)URL headers:(NSDictionary *)headers;
-
-@property (nonatomic, copy, readonly) NSURL * URL;
-@property (nonatomic, copy, readonly) NSDictionary * headers;
-@property (nonatomic, copy, readonly) NSDictionary * headersWithoutRangeAndLength;
-
-@property (nonatomic, copy, readonly) NSString * contentType;
-@property (nonatomic, assign, readonly) KTVHCRange range;
-@property (nonatomic, assign, readonly) long long totalLength;
-@property (nonatomic, assign, readonly) long long currentLength;
-
-- (KTVHCDataResponse *)responseWithRange:(KTVHCRange)range;
+@property (nonatomic, copy, readonly) NSURL *URL;
+@property (nonatomic, copy, readonly) NSDictionary *headers;
+@property (nonatomic, copy, readonly) NSString *contentType;
+@property (nonatomic, copy, readonly) NSString *contentRangeString;
+@property (nonatomic, readonly) KTVHCRange contentRange;
+@property (nonatomic, readonly) long long contentLength;
+@property (nonatomic, readonly) long long totalLength;
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.m
index 8a16f3d77..9fe9354b9 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataResponse.m
@@ -7,27 +7,22 @@
//
#import "KTVHCDataResponse.h"
+#import "KTVHCData+Internal.h"
#import "KTVHCLog.h"
@implementation KTVHCDataResponse
- (instancetype)initWithURL:(NSURL *)URL headers:(NSDictionary *)headers
{
- if (self = [super init])
- {
+ if (self = [super init]) {
KTVHCLogAlloc(self);
- _URL = URL;
- _headers = headers;
- NSMutableDictionary * headersWithoutRangeAndLength = [headers mutableCopy];
- for (NSString * key in [self withoutHeaderKeys])
- {
- [headersWithoutRangeAndLength removeObjectForKey:key];
- }
- _headersWithoutRangeAndLength = [headersWithoutRangeAndLength copy];
- _contentType = [self headerValueWithKey:@"Content-Type"];
- _currentLength = [self headerValueWithKey:@"Content-Length"].longLongValue;
- _range = KTVHCRangeWithResponseHeaderValue([self headerValueWithKey:@"Content-Range"], &_totalLength);
- KTVHCLogDataResponse(@"%p Create data response\nURL : %@\nHeaders : %@\nheadersWithoutRangeAndLength : %@\ncontentType : %@\ntotalLength : %lld\ncurrentLength : %lld", self, self.URL, self.headers, self.headersWithoutRangeAndLength, self.contentType, self.totalLength, self.currentLength);
+ self->_URL = URL;
+ self->_headers = headers;
+ self->_contentType = [self headerValueWithKey:@"Content-Type"];
+ self->_contentRangeString = [self headerValueWithKey:@"Content-Range"];
+ self->_contentLength = [self headerValueWithKey:@"Content-Length"].longLongValue;
+ self->_contentRange = KTVHCRangeWithResponseHeaderValue(self.contentRangeString, &self->_totalLength);
+ KTVHCLogDataResponse(@"%p Create data response\nURL : %@\nHeaders : %@\ncontentType : %@\ntotalLength : %lld\ncurrentLength : %lld", self, self.URL, self.headers, self.contentType, self.totalLength, self.contentLength);
}
return self;
}
@@ -39,36 +34,11 @@
- (NSString *)headerValueWithKey:(NSString *)key
{
- NSString * value = [self.headers objectForKey:key];
- if (!value)
- {
+ NSString *value = [self.headers objectForKey:key];
+ if (!value) {
value = [self.headers objectForKey:[key lowercaseString]];
}
return value;
}
-- (NSArray <NSString *> *)withoutHeaderKeys
-{
- static NSArray * obj = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- obj = @[@"Content-Length",
- @"content-length",
- @"Content-Range",
- @"content-range"];
- });
- return obj;
-}
-
-- (KTVHCDataResponse *)responseWithRange:(KTVHCRange)range
-{
- if (!KTVHCEqualRanges(self.range, range))
- {
- NSDictionary * headers = KTVHCRangeFillToResponseHeaders(range, self.headers, self.totalLength);
- KTVHCDataResponse * obj = [[KTVHCDataResponse alloc] initWithURL:self.URL headers:headers];
- return obj;
- }
- return self;
-}
-
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.h
index f9a2088f4..59b2e870b 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.h
@@ -7,41 +7,30 @@
//
#import <Foundation/Foundation.h>
-#import "KTVHCDataFileSource.h"
#import "KTVHCDataNetworkSource.h"
+#import "KTVHCDataFileSource.h"
@class KTVHCDataSourceManager;
@protocol KTVHCDataSourceManagerDelegate <NSObject>
-- (void)sourceManagerDidPrepared:(KTVHCDataSourceManager *)sourceManager;
-- (void)sourceManagerHasAvailableData:(KTVHCDataSourceManager *)sourceManager;
-- (void)sourceManager:(KTVHCDataSourceManager *)sourceManager didFailed:(NSError *)error;
-- (void)sourceManager:(KTVHCDataSourceManager *)sourceManager didReceiveResponse:(KTVHCDataResponse *)response;
+- (void)ktv_sourceManagerDidPrepare:(KTVHCDataSourceManager *)sourceManager;
+- (void)ktv_sourceManagerHasAvailableData:(KTVHCDataSourceManager *)sourceManager;
+- (void)ktv_sourceManager:(KTVHCDataSourceManager *)sourceManager didFailWithError:(NSError *)error;
+- (void)ktv_sourceManager:(KTVHCDataSourceManager *)sourceManager didReceiveResponse:(KTVHCDataResponse *)response;
@end
-@interface KTVHCDataSourceManager : NSObject
+@interface KTVHCDataSourceManager : NSObject <KTVHCDataSource>
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithDelegate:(id <KTVHCDataSourceManagerDelegate>)delegate delegateQueue:(dispatch_queue_t)delegateQueue;
+- (instancetype)initWithSources:(NSArray<id<KTVHCDataSource>> *)sources
+ delegate:(id <KTVHCDataSourceManagerDelegate>)delegate
+ delegateQueue:(dispatch_queue_t)delegateQueue NS_DESIGNATED_INITIALIZER;
@property (nonatomic, weak, readonly) id <KTVHCDataSourceManagerDelegate> delegate;
@property (nonatomic, strong, readonly) dispatch_queue_t delegateQueue;
-@property (nonatomic, strong, readonly) NSError * error;
-
-@property (nonatomic, assign, readonly) BOOL didClosed;
-@property (nonatomic, assign, readonly) BOOL didPrepared;
-@property (nonatomic, assign, readonly) BOOL didFinished;
-
-- (void)putSource:(id<KTVHCDataSourceProtocol>)source;
-
-- (void)prepare;
-- (void)close;
-
-- (NSData *)readDataOfLength:(NSUInteger)length;
-
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.m
index 3bed4bd90..28e38c89c 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataSourceManager.m
@@ -7,32 +7,36 @@
//
#import "KTVHCDataSourceManager.h"
-#import "KTVHCDataSourceQueue.h"
#import "KTVHCDataCallback.h"
#import "KTVHCLog.h"
@interface KTVHCDataSourceManager () <NSLocking, KTVHCDataFileSourceDelegate, KTVHCDataNetworkSourceDelegate>
-@property (nonatomic, strong) NSLock * coreLock;
-@property (nonatomic, assign) BOOL didCalledPrepare;
-@property (nonatomic, assign) BOOL didCalledReceiveResponse;
-
-@property (nonatomic, strong) KTVHCDataSourceQueue * sourceQueue;
-@property (nonatomic, strong) id <KTVHCDataSourceProtocol> currentSource;
-@property (nonatomic, strong) KTVHCDataNetworkSource * currentNetworkSource;
+@property (nonatomic, strong) NSLock *coreLock;
+@property (nonatomic, strong) id <KTVHCDataSource> currentSource;
+@property (nonatomic, strong) KTVHCDataNetworkSource *currentNetworkSource;
+@property (nonatomic, strong) NSMutableArray<id<KTVHCDataSource>> *sources;
+@property (nonatomic) BOOL calledPrepare;
+@property (nonatomic) BOOL calledReceiveResponse;
@end
@implementation KTVHCDataSourceManager
-- (instancetype)initWithDelegate:(id <KTVHCDataSourceManagerDelegate>)delegate delegateQueue:(dispatch_queue_t)delegateQueue
+@synthesize error = _error;
+@synthesize range = _range;
+@synthesize closed = _closed;
+@synthesize prepared = _prepared;
+@synthesize finished = _finished;
+@synthesize readedLength = _readedLength;
+
+- (instancetype)initWithSources:(NSArray<id<KTVHCDataSource>> *)sources delegate:(id<KTVHCDataSourceManagerDelegate>)delegate delegateQueue:(dispatch_queue_t)delegateQueue
{
- if (self = [super init])
- {
+ if (self = [super init]) {
KTVHCLogAlloc(self);
- _delegate = delegate;
- _delegateQueue = delegateQueue;
- self.sourceQueue = [KTVHCDataSourceQueue sourceQueue];
+ self->_sources = [sources mutableCopy];
+ self->_delegate = delegate;
+ self->_delegateQueue = delegateQueue;
}
return self;
}
@@ -43,108 +47,141 @@
KTVHCLogDataReader(@"%p, Destory reader\nError : %@\ncurrentSource : %@\ncurrentNetworkSource : %@", self, self.error, self.currentSource, self.currentNetworkSource);
}
-- (void)putSource:(id<KTVHCDataSourceProtocol>)source
-{
- KTVHCLogDataSourceManager(@"%p, Put source : %@", self, source);
- [self.sourceQueue putSource:source];
-}
-
- (void)prepare
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- if (self.didCalledPrepare)
- {
+ if (self.calledPrepare) {
[self unlock];
return;
}
- _didCalledPrepare = YES;
+ self->_calledPrepare = YES;
KTVHCLogDataSourceManager(@"%p, Call prepare", self);
- [self.sourceQueue sortSources];
- [self.sourceQueue setAllSourceDelegate:self delegateQueue:self.delegateQueue];
- self.currentSource = [self.sourceQueue firstSource];
- self.currentNetworkSource = [self.sourceQueue firstNetworkSource];
+ KTVHCLogDataSourceManager(@"%p, Sort sources - Begin\nSources : %@", self, self.sources);
+ [self.sources sortUsingComparator:^NSComparisonResult(id <KTVHCDataSource> obj1, id <KTVHCDataSource> obj2) {
+ if (obj1.range.start < obj2.range.start) {
+ return NSOrderedAscending;
+ }
+ return NSOrderedDescending;
+ }];
+ KTVHCLogDataSourceManager(@"%p, Sort sources - End \nSources : %@", self, self.sources);
+ for (id <KTVHCDataSource> obj in self.sources) {
+ if ([obj isKindOfClass:[KTVHCDataFileSource class]]) {
+ KTVHCDataFileSource *source = (KTVHCDataFileSource *)obj;
+ [source setDelegate:self delegateQueue:self.delegateQueue];
+ }
+ else if ([obj isKindOfClass:[KTVHCDataNetworkSource class]]) {
+ KTVHCDataNetworkSource *source = (KTVHCDataNetworkSource *)obj;
+ [source setDelegate:self delegateQueue:self.delegateQueue];
+ }
+ }
+ self.currentSource = self.sources.firstObject;
+ for (id<KTVHCDataSource> obj in self.sources) {
+ if ([obj isKindOfClass:[KTVHCDataNetworkSource class]]) {
+ self.currentNetworkSource = obj;
+ break;
+ }
+ }
KTVHCLogDataSourceManager(@"%p, Sort source\ncurrentSource : %@\ncurrentNetworkSource : %@", self, self.currentSource, self.currentNetworkSource);
[self.currentSource prepare];
- if (self.currentSource != self.currentNetworkSource)
- {
- [self.currentNetworkSource prepare];
- }
+ [self.currentNetworkSource prepare];
[self unlock];
}
- (void)close
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- _didClosed = YES;
+ self->_closed = YES;
KTVHCLogDataSourceManager(@"%p, Call close", self);
- [self.sourceQueue closeAllSource];
+ for (id <KTVHCDataSource> obj in self.sources) {
+ [obj close];
+ }
[self unlock];
}
- (NSData *)readDataOfLength:(NSUInteger)length
{
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return nil;
}
- if (self.didFinished)
- {
+ if (self.isFinished) {
[self unlock];
return nil;
}
- if (self.error)
- {
+ if (self.error) {
[self unlock];
return nil;
}
- NSData * data = [self.currentSource readDataOfLength:length];
+ NSData *data = [self.currentSource readDataOfLength:length];
+ self->_readedLength += data.length;
KTVHCLogDataSourceManager(@"%p, Read data : %lld", self, (long long)data.length);
- if (self.currentSource.didFinished)
- {
- self.currentSource = [self.sourceQueue nextSource:self.currentSource];
- if (self.currentSource)
- {
+ if (self.currentSource.isFinished) {
+ self.currentSource = [self nextSource];
+ if (self.currentSource) {
KTVHCLogDataSourceManager(@"%p, Switch to next source, %@", self, self.currentSource);
- if ([self.currentSource isKindOfClass:[KTVHCDataFileSource class]])
- {
+ if ([self.currentSource isKindOfClass:[KTVHCDataFileSource class]]) {
[self.currentSource prepare];
}
- }
- else
- {
+ } else {
KTVHCLogDataSourceManager(@"%p, Read data did finished", self);
- _didFinished = YES;
+ self->_finished = YES;
}
}
[self unlock];
return data;
}
-- (void)fileSourceDidPrepared:(KTVHCDataFileSource *)fileSource
+- (id<KTVHCDataSource>)nextSource
+{
+ NSUInteger index = [self.sources indexOfObject:self.currentSource] + 1;
+ if (index < self.sources.count) {
+ KTVHCLogDataSourceManager(@"%p, Fetch next source : %@", self, [self.sources objectAtIndex:index]);
+ return [self.sources objectAtIndex:index];
+ }
+ KTVHCLogDataSourceManager(@"%p, Fetch netxt source failed", self);
+ return nil;
+}
+
+- (KTVHCDataNetworkSource *)nextNetworkSource
+{
+ NSUInteger index = [self.sources indexOfObject:self.currentNetworkSource] + 1;
+ for (; index < self.sources.count; index++) {
+ id <KTVHCDataSource> obj = [self.sources objectAtIndex:index];
+ if ([obj isKindOfClass:[KTVHCDataNetworkSource class]]) {
+ KTVHCLogDataSourceManager(@"%p, Fetch next network source : %@", self, obj);
+ return obj;
+ }
+ }
+ KTVHCLogDataSourceManager(@"%p, Fetch netxt network source failed", self);
+ return nil;
+}
+
+#pragma mark - KTVHCDataFileSourceDelegate
+
+- (void)ktv_fileSourceDidPrepare:(KTVHCDataFileSource *)fileSource
{
[self lock];
[self callbackForPrepared];
[self unlock];
}
-- (void)fileSource:(KTVHCDataFileSource *)fileSource didFailed:(NSError *)error
+- (void)ktv_fileSource:(KTVHCDataFileSource *)fileSource didFailWithError:(NSError *)error
{
[self callbackForFailed:error];
}
-- (void)networkSourceDidPrepared:(KTVHCDataNetworkSource *)networkSource
+#pragma mark - KTVHCDataNetworkSourceDelegate
+
+- (void)ktv_networkSourceDidPrepare:(KTVHCDataNetworkSource *)networkSource
{
[self lock];
[self callbackForPrepared];
@@ -152,105 +189,98 @@
[self unlock];
}
-- (void)networkSourceHasAvailableData:(KTVHCDataNetworkSource *)networkSource
+- (void)ktv_networkSourceHasAvailableData:(KTVHCDataNetworkSource *)networkSource
{
[self lock];
- if ([self.delegate respondsToSelector:@selector(sourceManagerHasAvailableData:)])
- {
+ if ([self.delegate respondsToSelector:@selector(ktv_sourceManagerHasAvailableData:)]) {
KTVHCLogDataSourceManager(@"%p, Callback for has available data - Begin\nSource : %@", self, networkSource);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataSourceManager(@"%p, Callback for has available data - End", self);
- [self.delegate sourceManagerHasAvailableData:self];
+ [self.delegate ktv_sourceManagerHasAvailableData:self];
}];
}
[self unlock];
}
-- (void)networkSourceDidFinishedDownload:(KTVHCDataNetworkSource *)networkSource
+- (void)ktv_networkSourceDidFinisheDownload:(KTVHCDataNetworkSource *)networkSource
{
[self lock];
- self.currentNetworkSource = [self.sourceQueue nextNetworkSource:self.currentNetworkSource];
+ self.currentNetworkSource = [self nextNetworkSource];
[self.currentNetworkSource prepare];
[self unlock];
}
-- (void)networkSource:(KTVHCDataNetworkSource *)networkSource didFailed:(NSError *)error
+- (void)ktv_networkSource:(KTVHCDataNetworkSource *)networkSource didFailWithError:(NSError *)error
{
[self callbackForFailed:error];
}
+#pragma mark - Callback
+
- (void)callbackForPrepared
{
- if (self.didClosed)
- {
+ if (self.isClosed) {
return;
}
- if (self.didPrepared)
- {
+ if (self.isPrepared) {
return;
}
- _didPrepared = YES;
- if ([self.delegate respondsToSelector:@selector(sourceManagerDidPrepared:)])
- {
+ self->_prepared = YES;
+ if ([self.delegate respondsToSelector:@selector(ktv_sourceManagerDidPrepare:)]) {
KTVHCLogDataSourceManager(@"%p, Callback for prepared - Begin", self);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataSourceManager(@"%p, Callback for prepared - End", self);
- [self.delegate sourceManagerDidPrepared:self];
+ [self.delegate ktv_sourceManagerDidPrepare:self];
}];
}
}
- (void)callbackForReceiveResponse:(KTVHCDataResponse *)response
{
- if (self.didClosed)
- {
+ if (self.isClosed) {
return;
}
- if (self.didCalledReceiveResponse)
- {
+ if (self.calledReceiveResponse) {
return;
}
- _didCalledReceiveResponse = YES;
- if ([self.delegate respondsToSelector:@selector(sourceManager:didReceiveResponse:)])
- {
+ self->_calledReceiveResponse = YES;
+ if ([self.delegate respondsToSelector:@selector(ktv_sourceManager:didReceiveResponse:)]) {
KTVHCLogDataSourceManager(@"%p, Callback for did receive response - End", self);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataSourceManager(@"%p, Callback for did receive response - End", self);
- [self.delegate sourceManager:self didReceiveResponse:response];
+ [self.delegate ktv_sourceManager:self didReceiveResponse:response];
}];
}
}
- (void)callbackForFailed:(NSError *)error
{
- if (!error)
- {
+ if (!error) {
return;
}
[self lock];
- if (self.didClosed)
- {
+ if (self.isClosed) {
[self unlock];
return;
}
- if (self.error)
- {
+ if (self.error) {
[self unlock];
return;
}
- _error = error;
+ self->_error = error;
KTVHCLogDataSourceManager(@"failure, %d", (int)self.error.code);
- if (self.error && [self.delegate respondsToSelector:@selector(sourceManager:didFailed:)])
- {
+ if (self.error && [self.delegate respondsToSelector:@selector(ktv_sourceManager:didFailWithError:)]) {
KTVHCLogDataSourceManager(@"%p, Callback for network source failed - Begin\nError : %@", self, self.error);
[KTVHCDataCallback callbackWithQueue:self.delegateQueue block:^{
KTVHCLogDataSourceManager(@"%p, Callback for network source failed - End", self);
- [self.delegate sourceManager:self didFailed:self.error];
+ [self.delegate ktv_sourceManager:self didFailWithError:self.error];
}];
}
[self unlock];
}
+#pragma mark - NSLocking
+
- (void)lock
{
if (!self.coreLock) {
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.h
index b2472f7bf..4194b18e8 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.h
@@ -23,7 +23,7 @@
/**
* Return file path if the content did finished cache.
*/
-- (NSURL *)completeFileURLIfExistedWithURL:(NSURL *)URL;
+- (NSURL *)completeFileURLWithURL:(NSURL *)URL;
/**
* Reader for certain request.
@@ -39,12 +39,12 @@
* Get cache item.
*/
- (KTVHCDataCacheItem *)cacheItemWithURL:(NSURL *)URL;
-- (NSArray <KTVHCDataCacheItem *> *)allCacheItems;
+- (NSArray<KTVHCDataCacheItem *> *)allCacheItems;
/**
* Get cache length.
*/
-@property (nonatomic, assign) long long maxCacheLength; // Default is 500M.
+@property (nonatomic) long long maxCacheLength; // Default is 500M.
- (long long)totalCacheLength;
/**
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.m
index f97c0542e..abb4b9e4c 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataStorage.m
@@ -7,6 +7,7 @@
//
#import "KTVHCDataStorage.h"
+#import "KTVHCData+Internal.h"
#import "KTVHCDataUnitPool.h"
#import "KTVHCLog.h"
@@ -14,7 +15,7 @@
+ (instancetype)storage
{
- static KTVHCDataStorage * obj = nil;
+ static KTVHCDataStorage *obj = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
obj = [[self alloc] init];
@@ -24,40 +25,37 @@
- (instancetype)init
{
- if (self = [super init])
- {
+ if (self = [super init]) {
self.maxCacheLength = 500 * 1024 * 1024;
}
return self;
}
-- (NSURL *)completeFileURLIfExistedWithURL:(NSURL *)URL
+- (NSURL *)completeFileURLWithURL:(NSURL *)URL
{
- KTVHCDataUnit * unit = [[KTVHCDataUnitPool pool] unitWithURL:URL];
- NSURL * fileURL = unit.fileURL;
+ KTVHCDataUnit *unit = [[KTVHCDataUnitPool pool] unitWithURL:URL];
+ NSURL *completeURL = unit.completeURL;
[unit workingRelease];
- return fileURL;
+ return completeURL;
}
- (KTVHCDataReader *)readerWithRequest:(KTVHCDataRequest *)request
{
- if (!request || request.URL.absoluteString.length <= 0)
- {
+ if (!request || request.URL.absoluteString.length <= 0) {
KTVHCLogDataStorage(@"Invaild reader request, %@", request.URL);
return nil;
}
- KTVHCDataReader * reader = [KTVHCDataReader readerWithRequest:request];
+ KTVHCDataReader *reader = [[KTVHCDataReader alloc] initWithRequest:request];
return reader;
}
- (KTVHCDataLoader *)loaderWithRequest:(KTVHCDataRequest *)request
{
- if (!request || request.URL.absoluteString.length <= 0)
- {
+ if (!request || request.URL.absoluteString.length <= 0) {
KTVHCLogDataStorage(@"Invaild loader request, %@", request.URL);
return nil;
}
- KTVHCDataLoader * loader = [KTVHCDataLoader loaderWithRequest:request];
+ KTVHCDataLoader *loader = [[KTVHCDataLoader alloc] initWithRequest:request];
return loader;
}
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.h
index 05f0cc653..f482d9357 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.h
@@ -11,9 +11,9 @@
@class KTVHCDataUnit;
-@protocol KTVHCDataUnitFileDelegate <NSObject>
+@protocol KTVHCDataUnitDelegate <NSObject>
-- (void)unitShouldRearchive:(KTVHCDataUnit *)unit;
+- (void)ktv_unitDidChangeMetadata:(KTVHCDataUnit *)unit;
@end
@@ -22,40 +22,35 @@
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)unitWithURL:(NSURL *)URL;
+- (instancetype)initWithURL:(NSURL *)URL;
-@property (nonatomic, assign, readonly) BOOL valid;
+@property (nonatomic, copy, readonly) NSError *error;
-@property (nonatomic, copy, readonly) NSURL * URL;
-@property (nonatomic, copy, readonly) NSURL * fileURL;
-@property (nonatomic, copy, readonly) NSString * key; // Unique Identifier.
-
-@property (nonatomic, assign, readonly) NSTimeInterval createTimeInterval;
-@property (nonatomic, assign, readonly) NSTimeInterval lastItemCreateInterval;
-
-@property (nonatomic, copy, readonly) NSDictionary * requestHeaders;
-@property (nonatomic, copy, readonly) NSDictionary * responseHeaders;
-
-@property (nonatomic, assign, readonly) long long totalLength;
-@property (nonatomic, assign, readonly) long long cacheLength;
-@property (nonatomic, assign, readonly) long long validLength;
+@property (nonatomic, copy, readonly) NSURL *URL;
+@property (nonatomic, copy, readonly) NSURL *completeURL;
+@property (nonatomic, copy, readonly) NSString *key; // Unique Identifier.
+@property (nonatomic, copy, readonly) NSDictionary *responseHeaders;
+@property (nonatomic, readonly) NSTimeInterval createTimeInterval;
+@property (nonatomic, readonly) NSTimeInterval lastItemCreateInterval;
+@property (nonatomic, readonly) long long totalLength;
+@property (nonatomic, readonly) long long cacheLength;
+@property (nonatomic, readonly) long long validLength;
/**
* Unit Item
*/
-- (NSArray <KTVHCDataUnitItem *> *)unitItems;
+- (NSArray<KTVHCDataUnitItem *> *)unitItems;
- (void)insertUnitItem:(KTVHCDataUnitItem *)unitItem;
/**
* Info Sync
*/
-- (void)updateRequestHeaders:(NSDictionary *)requestHeaders;
- (void)updateResponseHeaders:(NSDictionary *)responseHeaders totalLength:(long long)totalLength;
/**
* Working
*/
-@property (nonatomic, assign, readonly) NSInteger workingCount;
+@property (nonatomic, readonly) NSInteger workingCount;
- (void)workingRetain;
- (void)workingRelease;
@@ -63,7 +58,7 @@
/**
* File Control
*/
-@property (nonatomic, weak) id <KTVHCDataUnitFileDelegate> fileDelegate;
+@property (nonatomic, weak) id <KTVHCDataUnitDelegate> delegate;
- (void)deleteFiles;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.m
index b9b02ceb0..7b748a8d6 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnit.m
@@ -7,61 +7,49 @@
//
#import "KTVHCDataUnit.h"
-#import "KTVHCURLTools.h"
-#import "KTVHCPathTools.h"
+#import "KTVHCPathTool.h"
+#import "KTVHCURLTool.h"
+#import "KTVHCError.h"
#import "KTVHCLog.h"
@interface KTVHCDataUnit ()
-@property (nonatomic, strong) NSRecursiveLock * coreLock;
-@property (nonatomic, strong) NSMutableArray <KTVHCDataUnitItem *> * unitItemsInternal;
-@property (nonatomic, strong) NSMutableArray <NSArray <KTVHCDataUnitItem *> *> * lockingUnitItems;
+@property (nonatomic, strong) NSRecursiveLock *coreLock;
+@property (nonatomic, strong) NSMutableArray<KTVHCDataUnitItem *> *unitItemsInternal;
+@property (nonatomic, strong) NSMutableArray<NSArray<KTVHCDataUnitItem *> *> *lockingUnitItems;
@end
@implementation KTVHCDataUnit
-+ (instancetype)unitWithURL:(NSURL *)URL
-{
- return [[self alloc] initWithURL:URL];
-}
-
- (instancetype)initWithURL:(NSURL *)URL
{
- if (self = [super init])
- {
- KTVHCLogAlloc(self);
- _URL = URL;
- _key = [KTVHCURLTools keyWithURL:self.URL];
- _createTimeInterval = [NSDate date].timeIntervalSince1970;
- _valid = YES;
- [self prepare];
+ if (self = [super init]) {
+ self->_URL = [URL copy];
+ self->_key = [[KTVHCURLTool tool] keyWithURL:self.URL];
+ self->_createTimeInterval = [NSDate date].timeIntervalSince1970;
+ [self commonInit];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
- if (self = [super init])
- {
- KTVHCLogAlloc(self);
+ if (self = [super init]) {
@try {
- _URL = [NSURL URLWithString:[aDecoder decodeObjectForKey:@"URLString"]];
- _key = [aDecoder decodeObjectForKey:@"uniqueIdentifier"];
- _valid = YES;
- } @catch (NSException * exception) {
- _valid = NO;
+ self->_URL = [NSURL URLWithString:[aDecoder decodeObjectForKey:@"URLString"]];
+ self->_key = [aDecoder decodeObjectForKey:@"uniqueIdentifier"];
+ } @catch (NSException *exception) {
+ self->_error = [KTVHCError errorForException:exception];
}
@try {
- _createTimeInterval = [[aDecoder decodeObjectForKey:@"createTimeInterval"] doubleValue];
- _requestHeaders = [aDecoder decodeObjectForKey:@"requestHeaderFields"];
- _responseHeaders = [aDecoder decodeObjectForKey:@"responseHeaderFields"];
- _totalLength = [[aDecoder decodeObjectForKey:@"totalContentLength"] longLongValue];
- self.unitItemsInternal = [aDecoder decodeObjectForKey:@"unitItems"];
- [self prepare];
- _valid = _valid && YES;
- } @catch (NSException * exception) {
- _valid = NO;
+ self->_createTimeInterval = [[aDecoder decodeObjectForKey:@"createTimeInterval"] doubleValue];
+ self->_responseHeaders = [aDecoder decodeObjectForKey:@"responseHeaderFields"];
+ self->_totalLength = [[aDecoder decodeObjectForKey:@"totalContentLength"] longLongValue];
+ self->_unitItemsInternal = [[aDecoder decodeObjectForKey:@"unitItems"] mutableCopy];
+ [self commonInit];
+ } @catch (NSException *exception) {
+ self->_error = [KTVHCError errorForException:exception];
}
}
return self;
@@ -73,7 +61,6 @@
[aCoder encodeObject:self.URL.absoluteString forKey:@"URLString"];
[aCoder encodeObject:self.key forKey:@"uniqueIdentifier"];
[aCoder encodeObject:@(self.createTimeInterval) forKey:@"createTimeInterval"];
- [aCoder encodeObject:self.requestHeaders forKey:@"requestHeaderFields"];
[aCoder encodeObject:self.responseHeaders forKey:@"responseHeaderFields"];
[aCoder encodeObject:@(self.totalLength) forKey:@"totalContentLength"];
[aCoder encodeObject:self.unitItemsInternal forKey:@"unitItems"];
@@ -85,63 +72,53 @@
KTVHCLogDealloc(self);
}
-- (void)prepare
+- (void)commonInit
{
+ KTVHCLogAlloc(self);
[self lock];
- if (!self.unitItemsInternal)
- {
+ if (!self.unitItemsInternal) {
self.unitItemsInternal = [NSMutableArray array];
}
- if (self.unitItemsInternal.count > 0)
- {
- NSMutableArray * removeArray = [NSMutableArray array];
- for (KTVHCDataUnitItem * obj in self.unitItemsInternal)
- {
- if (obj.length <= 0)
- {
- [KTVHCPathTools deleteFileAtPath:obj.absolutePath];
- [removeArray addObject:obj];
- }
+ NSMutableArray *removal = [NSMutableArray array];
+ for (KTVHCDataUnitItem *obj in self.unitItemsInternal) {
+ if (obj.length == 0) {
+ [KTVHCPathTool deleteFileAtPath:obj.absolutePath];
+ [removal addObject:obj];
}
- [self.unitItemsInternal removeObjectsInArray:removeArray];
- [removeArray removeAllObjects];
- [self sortUnitItems];
}
- KTVHCLogDataUnit(@"%p, Create Unit\nURL : %@\nkey : %@\ntimeInterval : %@\ntotalLength : %lld\ncacheLength : %lld\nvaildLength : %lld\nrequestHeaders : %@\nresponseHeaders : %@\nunitItems : %@", self, self.URL, self.key, [NSDate dateWithTimeIntervalSince1970:self.createTimeInterval], self.totalLength, self.cacheLength, self.validLength, self.requestHeaders, self.responseHeaders, self.unitItemsInternal);
+ [self.unitItemsInternal removeObjectsInArray:removal];
+ [self sortUnitItems];
+ KTVHCLogDataUnit(@"%p, Create Unit\nURL : %@\nkey : %@\ntimeInterval : %@\ntotalLength : %lld\ncacheLength : %lld\nvaildLength : %lld\nresponseHeaders : %@\nunitItems : %@", self, self.URL, self.key, [NSDate dateWithTimeIntervalSince1970:self.createTimeInterval], self.totalLength, self.cacheLength, self.validLength, self.responseHeaders, self.unitItemsInternal);
[self unlock];
}
- (void)sortUnitItems
{
[self lock];
- KTVHCLogDataSourceQueue(@"%p, Sort unitItems - Begin\n%@", self, self.unitItemsInternal);
- [self.unitItemsInternal sortUsingComparator:^NSComparisonResult(KTVHCDataUnitItem * obj1, KTVHCDataUnitItem * obj2) {
+ KTVHCLogDataUnit(@"%p, Sort unitItems - Begin\n%@", self, self.unitItemsInternal);
+ [self.unitItemsInternal sortUsingComparator:^NSComparisonResult(KTVHCDataUnitItem *obj1, KTVHCDataUnitItem *obj2) {
NSComparisonResult result = NSOrderedDescending;
- if (obj1.offset < obj2.offset)
- {
+ if (obj1.offset < obj2.offset) {
result = NSOrderedAscending;
- }
- else if ((obj1.offset == obj2.offset) && (obj1.length > obj2.length))
- {
+ } else if ((obj1.offset == obj2.offset) && (obj1.length > obj2.length)) {
result = NSOrderedAscending;
}
return result;
}];
- KTVHCLogDataSourceQueue(@"%p, Sort unitItems - End \n%@", self, self.unitItemsInternal);
+ KTVHCLogDataUnit(@"%p, Sort unitItems - End \n%@", self, self.unitItemsInternal);
[self unlock];
}
-- (NSArray <KTVHCDataUnitItem *> *)unitItems
+- (NSArray<KTVHCDataUnitItem *> *)unitItems
{
[self lock];
- NSMutableArray * objs = [NSMutableArray array];
- for (KTVHCDataUnitItem * obj in self.unitItemsInternal)
- {
+ NSMutableArray *objs = [NSMutableArray array];
+ for (KTVHCDataUnitItem *obj in self.unitItemsInternal) {
[objs addObject:[obj copy]];
}
- KTVHCLogDataSourceQueue(@"%p, Get unitItems\n%@", self, self.unitItemsInternal);
+ KTVHCLogDataUnit(@"%p, Get unitItems\n%@", self, self.unitItemsInternal);
[self unlock];
- return [objs copy];
+ return objs;
}
- (void)insertUnitItem:(KTVHCDataUnitItem *)unitItem
@@ -151,48 +128,58 @@
[self sortUnitItems];
KTVHCLogDataUnit(@"%p, Insert unitItem, %@", self, unitItem);
[self unlock];
- [self.fileDelegate unitShouldRearchive:self];
-}
-
-- (void)updateRequestHeaders:(NSDictionary *)requestHeaders
-{
- [self lock];
- _requestHeaders = requestHeaders;
- KTVHCLogDataUnit(@"%p, Update requestHeaders\n%@", self, self.requestHeaders);
- [self unlock];
- [self.fileDelegate unitShouldRearchive:self];
+ [self.delegate ktv_unitDidChangeMetadata:self];
}
- (void)updateResponseHeaders:(NSDictionary *)responseHeaders totalLength:(long long)totalLength
{
[self lock];
- _responseHeaders = responseHeaders;
- _totalLength = totalLength;
+ BOOL needs = NO;
+ static NSArray *whiteList = nil;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ whiteList = @[@"Accept-Ranges",
+ @"Connection",
+ @"Content-Type",
+ @"Server"];
+ });
+ NSMutableDictionary *headers = [NSMutableDictionary dictionary];
+ for (NSString *key in whiteList) {
+ NSString *value = [responseHeaders objectForKey:key];
+ if (value) {
+ [headers setObject:value forKey:key];
+ }
+ }
+ if (self.totalLength != totalLength || ![self.responseHeaders isEqualToDictionary:headers]) {
+ self->_responseHeaders = headers;
+ self->_totalLength = totalLength;
+ needs = YES;
+ }
KTVHCLogDataUnit(@"%p, Update responseHeaders\ntotalLength : %lld\n%@", self, self.totalLength, self.responseHeaders);
[self unlock];
- [self.fileDelegate unitShouldRearchive:self];
+ if (needs) {
+ [self.delegate ktv_unitDidChangeMetadata:self];
+ }
}
-- (NSURL *)fileURL
+- (NSURL *)completeURL
{
[self lock];
- NSURL * fileURL = nil;
- KTVHCDataUnitItem * item = self.unitItemsInternal.firstObject;
- if (item.offset == 0 && item.length > 0 && item.length == self.totalLength)
- {
- fileURL = [NSURL fileURLWithPath:item.absolutePath];
- KTVHCLogDataUnit(@"%p, Get file path\n%@", self, fileURL);
+ NSURL *completeURL = nil;
+ KTVHCDataUnitItem *item = self.unitItemsInternal.firstObject;
+ if (item.offset == 0 && item.length > 0 && item.length == self.totalLength) {
+ completeURL = [NSURL fileURLWithPath:item.absolutePath];
+ KTVHCLogDataUnit(@"%p, Get file path\n%@", self, completeURL);
}
[self unlock];
- return fileURL;
+ return completeURL;
}
- (long long)cacheLength
{
[self lock];
long long length = 0;
- for (KTVHCDataUnitItem * obj in self.unitItemsInternal)
- {
+ for (KTVHCDataUnitItem *obj in self.unitItemsInternal) {
length += obj.length;
}
[self unlock];
@@ -204,8 +191,7 @@
[self lock];
long long offset = 0;
long long length = 0;
- for (KTVHCDataUnitItem * obj in self.unitItemsInternal)
- {
+ for (KTVHCDataUnitItem *obj in self.unitItemsInternal) {
long long invalidLength = MAX(offset - obj.offset, 0);
long long vaildLength = MAX(obj.length - invalidLength, 0);
offset = MAX(offset, obj.offset + obj.length);
@@ -219,10 +205,8 @@
{
[self lock];
NSTimeInterval timeInterval = self.createTimeInterval;
- for (KTVHCDataUnitItem * obj in self.unitItemsInternal)
- {
- if (obj.createTimeInterval > timeInterval)
- {
+ for (KTVHCDataUnitItem *obj in self.unitItemsInternal) {
+ if (obj.createTimeInterval > timeInterval) {
timeInterval = obj.createTimeInterval;
}
}
@@ -233,37 +217,31 @@
- (void)workingRetain
{
[self lock];
- _workingCount++;
+ self->_workingCount += 1;
KTVHCLogDataUnit(@"%p, Working retain : %ld", self, (long)self.workingCount);
[self unlock];
}
- (void)workingRelease
{
- BOOL mergeSuccess = NO;
[self lock];
- _workingCount--;
+ self->_workingCount -= 1;
KTVHCLogDataUnit(@"%p, Working release : %ld", self, (long)self.workingCount);
- if (self.workingCount <= 0)
- {
- mergeSuccess = [self mergeFilesIfNeeded];
- }
+ BOOL needs = [self mergeFilesIfNeeded];
[self unlock];
- if (mergeSuccess)
- {
- [self.fileDelegate unitShouldRearchive:self];
+ if (needs) {
+ [self.delegate ktv_unitDidChangeMetadata:self];
}
}
- (void)deleteFiles
{
- if (!self.URL)
- {
+ if (!self.URL) {
return;
}
[self lock];
- NSString * path = [KTVHCPathTools directoryPathWithURL:self.URL];
- [KTVHCPathTools deleteDirectoryAtPath:path];
+ NSString *path = [KTVHCPathTool directoryPathWithURL:self.URL];
+ [KTVHCPathTool deleteDirectoryAtPath:path];
KTVHCLogDataUnit(@"%p, Delete files", self);
[self unlock];
}
@@ -271,72 +249,56 @@
- (BOOL)mergeFilesIfNeeded
{
[self lock];
- if (self.workingCount > 0 || self.totalLength <= 0 || self.unitItemsInternal.count <= 0)
- {
+ if (self.workingCount > 0 || self.totalLength == 0 || self.unitItemsInternal.count == 0) {
[self unlock];
return NO;
}
- NSString * path = [KTVHCPathTools completeFilePathWithURL:self.URL];
- if ([self.unitItemsInternal.firstObject.absolutePath isEqualToString:path])
- {
+ NSString *path = [KTVHCPathTool completeFilePathWithURL:self.URL];
+ if ([self.unitItemsInternal.firstObject.absolutePath isEqualToString:path]) {
[self unlock];
return NO;
}
- if (self.totalLength != self.validLength)
- {
+ if (self.totalLength != self.validLength) {
[self unlock];
return NO;
}
- BOOL failed = NO;
+ NSError *error = nil;
long long offset = 0;
- [KTVHCPathTools deleteFileAtPath:path];
- [KTVHCPathTools createFileAtPath:path];
- NSFileHandle * writingHandle = [NSFileHandle fileHandleForWritingAtPath:path];
- for (KTVHCDataUnitItem * obj in self.unitItemsInternal)
- {
- if (failed)
- {
+ [KTVHCPathTool deleteFileAtPath:path];
+ [KTVHCPathTool createFileAtPath:path];
+ NSFileHandle *writingHandle = [NSFileHandle fileHandleForWritingAtPath:path];
+ for (KTVHCDataUnitItem *obj in self.unitItemsInternal) {
+ if (error) {
break;
}
NSAssert(offset >= obj.offset, @"invaild unit item.");
- if (offset >= (obj.offset + obj.length))
- {
+ if (offset >= (obj.offset + obj.length)) {
KTVHCLogDataUnit(@"%p, Merge files continue", self);
continue;
}
- NSFileHandle * readingHandle = [NSFileHandle fileHandleForReadingAtPath:obj.absolutePath];
- @try
- {
+ NSFileHandle *readingHandle = [NSFileHandle fileHandleForReadingAtPath:obj.absolutePath];
+ @try {
[readingHandle seekToFileOffset:offset - obj.offset];
- }
- @catch (NSException * exception)
- {
+ } @catch (NSException *exception) {
KTVHCLogDataUnit(@"%p, Merge files seek exception\n%@", self, exception);
- failed = YES;
+ error = [KTVHCError errorForException:exception];
}
- if (failed)
- {
+ if (error) {
break;
}
- while (!failed)
- {
- @autoreleasepool
- {
- NSData * data = [readingHandle readDataOfLength:1024 * 1024 * 1];
- if (data.length <= 0)
- {
+ while (!error) {
+ @autoreleasepool {
+ NSData *data = [readingHandle readDataOfLength:1024 * 1024 * 1];
+ if (data.length == 0) {
KTVHCLogDataUnit(@"%p, Merge files break", self);
break;
}
KTVHCLogDataUnit(@"%p, Merge write data : %lld", self, (long long)data.length);
- @try
- {
+ @try {
[writingHandle writeData:data];
- }
- @catch (NSException * exception)
- {
+ } @catch (NSException *exception) {
KTVHCLogDataUnit(@"%p, Merge files write exception\n%@", self, exception);
- failed = YES;
+ error = [KTVHCError errorForException:exception];
}
}
}
@@ -344,28 +306,23 @@
offset = obj.offset + obj.length;
KTVHCLogDataUnit(@"%p, Merge next : %lld", self, offset);
}
- @try
- {
+ @try {
[writingHandle synchronizeFile];
[writingHandle closeFile];
- }
- @catch (NSException * exception)
- {
- KTVHCLogDataUnit(@"%p, Merge files close exception, %d\n%@", self, failed, exception);
- failed = YES;
+ } @catch (NSException *exception) {
+ KTVHCLogDataUnit(@"%p, Merge files close exception, %@", self, exception);
+ error = [KTVHCError errorForException:exception];
}
KTVHCLogDataUnit(@"%p, Merge finished\ntotalLength : %lld\noffset : %lld", self, self.totalLength, offset);
- if (failed || [KTVHCPathTools sizeOfItemAtPath:path] != self.totalLength)
- {
- [KTVHCPathTools deleteFileAtPath:path];
+ if (error || [KTVHCPathTool sizeAtPath:path] != self.totalLength) {
+ [KTVHCPathTool deleteFileAtPath:path];
[self unlock];
return NO;
}
KTVHCLogDataUnit(@"%p, Merge replace items", self);
- KTVHCDataUnitItem * item = [[KTVHCDataUnitItem alloc] initWithPath:path offset:0];
- for (KTVHCDataUnitItem * obj in self.unitItemsInternal)
- {
- [KTVHCPathTools deleteFileAtPath:obj.absolutePath];
+ KTVHCDataUnitItem *item = [[KTVHCDataUnitItem alloc] initWithPath:path];
+ for (KTVHCDataUnitItem *obj in self.unitItemsInternal) {
+ [KTVHCPathTool deleteFileAtPath:obj.absolutePath];
}
[self.unitItemsInternal removeAllObjects];
[self.unitItemsInternal addObject:item];
@@ -375,33 +332,28 @@
- (void)lock
{
- if (!self.coreLock)
- {
+ if (!self.coreLock) {
self.coreLock = [[NSRecursiveLock alloc] init];
}
[self.coreLock lock];
- if (!self.lockingUnitItems)
- {
+ if (!self.lockingUnitItems) {
self.lockingUnitItems = [NSMutableArray array];
}
- NSArray <KTVHCDataUnitItem *> * objs = [NSArray arrayWithArray:self.unitItemsInternal];
+ NSArray<KTVHCDataUnitItem *> *objs = [NSArray arrayWithArray:self.unitItemsInternal];
[self.lockingUnitItems addObject:objs];
- for (KTVHCDataUnitItem * obj in objs)
- {
+ for (KTVHCDataUnitItem *obj in objs) {
[obj lock];
}
}
- (void)unlock
{
- NSArray <KTVHCDataUnitItem *> * objs = self.lockingUnitItems.lastObject;
+ NSArray<KTVHCDataUnitItem *> *objs = self.lockingUnitItems.lastObject;
[self.lockingUnitItems removeLastObject];
- if (self.lockingUnitItems.count <= 0)
- {
+ if (self.lockingUnitItems.count <= 0) {
self.lockingUnitItems = nil;
}
- for (KTVHCDataUnitItem * obj in objs)
- {
+ for (KTVHCDataUnitItem *obj in objs) {
[obj unlock];
}
[self.coreLock unlock];
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.h
index 42c51dbd5..96e8ef07f 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.h
@@ -11,18 +11,16 @@
@interface KTVHCDataUnitItem : NSObject <NSCopying, NSCoding, NSLocking>
+ (instancetype)new NS_UNAVAILABLE;
-- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithPath:(NSString *)path offset:(long long)offset;
+- (instancetype)initWithPath:(NSString *)path;
+- (instancetype)initWithPath:(NSString *)path offset:(uint64_t)offset;
-@property (nonatomic, assign, readonly) NSTimeInterval createTimeInterval;
+@property (nonatomic, copy, readonly) NSString *relativePath;
+@property (nonatomic, copy, readonly) NSString *absolutePath;
+@property (nonatomic, readonly) NSTimeInterval createTimeInterval;
+@property (nonatomic, readonly) long long offset;
+@property (nonatomic, readonly) long long length;
-@property (nonatomic, copy, readonly) NSString * relativePath;
-@property (nonatomic, copy, readonly) NSString * absolutePath;
-
-@property (nonatomic, assign, readonly) long long offset;
-@property (nonatomic, assign, readonly) long long length;
-
-- (void)setLength:(long long)length;
+- (void)updateLength:(long long)length;
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.m
index b78d6a1ce..271fc193a 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitItem.m
@@ -7,12 +7,12 @@
//
#import "KTVHCDataUnitItem.h"
-#import "KTVHCPathTools.h"
+#import "KTVHCPathTool.h"
#import "KTVHCLog.h"
@interface KTVHCDataUnitItem ()
-@property (nonatomic, strong) NSRecursiveLock * coreLock;
+@property (nonatomic, strong) NSRecursiveLock *coreLock;
@end
@@ -21,7 +21,7 @@
- (id)copyWithZone:(NSZone *)zone
{
[self lock];
- KTVHCDataUnitItem * obj = [[KTVHCDataUnitItem alloc] initForCopy];
+ KTVHCDataUnitItem *obj = [[KTVHCDataUnitItem alloc] init];
obj->_relativePath = self.relativePath;
obj->_absolutePath = self.absolutePath;
obj->_createTimeInterval = self.createTimeInterval;
@@ -31,37 +31,33 @@
return obj;
}
-- (instancetype)initForCopy
+- (instancetype)initWithPath:(NSString *)path
{
- if (self = [super init])
- {
-
- }
- return self;
+ return [self initWithPath:path offset:0];
}
-- (instancetype)initWithPath:(NSString *)path offset:(long long)offset
+- (instancetype)initWithPath:(NSString *)path offset:(uint64_t)offset
{
- if (self = [super init])
- {
- KTVHCLogAlloc(self);
- _createTimeInterval = [NSDate date].timeIntervalSince1970;
- _relativePath = [KTVHCPathTools relativePathWithAbsoultePath:path];
- _offset = offset;
- [self prepare];
+ if (self = [super init]) {
+ self->_createTimeInterval = [NSDate date].timeIntervalSince1970;
+ self->_relativePath = [KTVHCPathTool converToRelativePath:path];
+ self->_absolutePath = [KTVHCPathTool converToAbsoultePath:path];
+ self->_offset = offset;
+ self->_length = [KTVHCPathTool sizeAtPath:self.absolutePath];
+ [self commonInit];
}
return self;
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
- if (self = [super init])
- {
- KTVHCLogAlloc(self);
- _createTimeInterval = [[aDecoder decodeObjectForKey:@"createTimeInterval"] doubleValue];
- _relativePath = [aDecoder decodeObjectForKey:@"relativePath"];
- _offset = [[aDecoder decodeObjectForKey:@"offset"] longLongValue];
- [self prepare];
+ if (self = [super init]) {
+ self->_createTimeInterval = [[aDecoder decodeObjectForKey:@"createTimeInterval"] doubleValue];
+ self->_relativePath = [aDecoder decodeObjectForKey:@"relativePath"];
+ self->_absolutePath = [KTVHCPathTool converToAbsoultePath:self.relativePath];
+ self->_offset = [[aDecoder decodeObjectForKey:@"offset"] longLongValue];
+ self->_length = [KTVHCPathTool sizeAtPath:self.absolutePath];
+ [self commonInit];
}
return self;
}
@@ -78,25 +74,23 @@
KTVHCLogDealloc(self);
}
-- (void)prepare
+- (void)commonInit
{
- _absolutePath = [KTVHCPathTools absoultePathWithRelativePath:self.relativePath];
- self.length = [KTVHCPathTools sizeOfItemAtPath:self.absolutePath];
+ KTVHCLogAlloc(self);
KTVHCLogDataUnitItem(@"%p, Create Unit Item\nabsolutePath : %@\nrelativePath : %@\nOffset : %lld\nLength : %lld", self, self.absolutePath, self.relativePath, self.offset, self.length);
}
-- (void)setLength:(long long)length
+- (void)updateLength:(long long)length
{
[self lock];
- _length = length;
+ self->_length = length;
KTVHCLogDataUnitItem(@"%p, Set length : %lld", self, length);
[self unlock];
}
- (void)lock
{
- if (!self.coreLock)
- {
+ if (!self.coreLock) {
self.coreLock = [[NSRecursiveLock alloc] init];
}
[self.coreLock lock];
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.h
index 62942ea56..9686ecca6 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.h
@@ -21,7 +21,7 @@
- (long long)totalCacheLength;
-- (NSArray <KTVHCDataCacheItem *> *)allCacheItem;
+- (NSArray<KTVHCDataCacheItem *> *)allCacheItem;
- (KTVHCDataCacheItem *)cacheItemWithURL:(NSURL *)URL;
- (void)deleteUnitWithURL:(NSURL *)URL;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.m
index c612c78fd..8cb3f6993 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitPool.m
@@ -8,20 +8,20 @@
#import "KTVHCDataUnitPool.h"
#import "KTVHCDataUnitQueue.h"
-#import "KTVHCDataPrivate.h"
-#import "KTVHCPathTools.h"
-#import "KTVHCURLTools.h"
+#import "KTVHCData+Internal.h"
+#import "KTVHCPathTool.h"
+#import "KTVHCURLTool.h"
#import "KTVHCLog.h"
#import <UIKit/UIKit.h>
-@interface KTVHCDataUnitPool () <NSLocking, KTVHCDataUnitFileDelegate>
+@interface KTVHCDataUnitPool () <NSLocking, KTVHCDataUnitDelegate>
-@property (nonatomic, strong) NSRecursiveLock * coreLock;
-@property (nonatomic, strong) KTVHCDataUnitQueue * unitQueue;
-@property (nonatomic, assign) int64_t expectArchiveIndex;
-@property (nonatomic, assign) int64_t actualArchiveIndex;
+@property (nonatomic, strong) NSRecursiveLock *coreLock;
+@property (nonatomic, strong) KTVHCDataUnitQueue *unitQueue;
@property (nonatomic, strong) dispatch_queue_t archiveQueue;
+@property (nonatomic) int64_t expectArchiveIndex;
+@property (nonatomic) int64_t actualArchiveIndex;
@end
@@ -29,7 +29,7 @@
+ (instancetype)pool
{
- static KTVHCDataUnitPool * obj = nil;
+ static KTVHCDataUnitPool *obj = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
obj = [[self alloc] init];
@@ -39,12 +39,10 @@
- (instancetype)init
{
- if (self = [super init])
- {
- self.unitQueue = [KTVHCDataUnitQueue queueWithPath:[KTVHCPathTools archivePath]];
- for (KTVHCDataUnit * obj in self.unitQueue.allUnits)
- {
- obj.fileDelegate = self;
+ if (self = [super init]) {
+ self.unitQueue = [[KTVHCDataUnitQueue alloc] initWithPath:[KTVHCPathTool archivePath]];
+ for (KTVHCDataUnit *obj in self.unitQueue.allUnits) {
+ obj.delegate = self;
}
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:UIApplicationWillTerminateNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidEnterBackground:) name:UIApplicationDidEnterBackgroundNotification object:nil];
@@ -61,17 +59,15 @@
- (KTVHCDataUnit *)unitWithURL:(NSURL *)URL
{
- if (URL.absoluteString.length <= 0)
- {
+ if (URL.absoluteString.length <= 0) {
return nil;
}
[self lock];
- NSString * key = [KTVHCURLTools keyWithURL:URL];
- KTVHCDataUnit * unit = [self.unitQueue unitWithKey:key];
- if (!unit)
- {
- unit = [KTVHCDataUnit unitWithURL:URL];
- unit.fileDelegate = self;
+ NSString *key = [[KTVHCURLTool tool] keyWithURL:URL];
+ KTVHCDataUnit *unit = [self.unitQueue unitWithKey:key];
+ if (!unit) {
+ unit = [[KTVHCDataUnit alloc] initWithURL:URL];
+ unit.delegate = self;
KTVHCLogDataUnitPool(@"%p, Insert Unit, %@", self, unit);
[self.unitQueue putUnit:unit];
[self setNeedsArchive];
@@ -85,9 +81,8 @@
{
[self lock];
long long length = 0;
- NSArray <KTVHCDataUnit *> * units = [self.unitQueue allUnits];
- for (KTVHCDataUnit * obj in units)
- {
+ NSArray<KTVHCDataUnit *> *units = [self.unitQueue allUnits];
+ for (KTVHCDataUnit *obj in units) {
length += obj.cacheLength;
}
[self unlock];
@@ -96,48 +91,45 @@
- (KTVHCDataCacheItem *)cacheItemWithURL:(NSURL *)URL
{
- if (URL.absoluteString.length <= 0)
- {
+ if (URL.absoluteString.length <= 0) {
return nil;
}
[self lock];
- KTVHCDataCacheItem * cacheItem = nil;
- NSString * key = [KTVHCURLTools keyWithURL:URL];
- KTVHCDataUnit * obj = [self.unitQueue unitWithKey:key];
- if (obj)
- {
- NSArray * items = obj.unitItems;
- NSMutableArray * itemZones = [NSMutableArray array];
- for (KTVHCDataUnitItem * unitItem in items)
- {
- KTVHCDataCacheItemZone * itemZone = [KTVHCDataCacheItemZone itemZoneWithOffset:unitItem.offset length:unitItem.length];
- [itemZones addObject:itemZone];
+ KTVHCDataCacheItem *cacheItem = nil;
+ NSString *key = [[KTVHCURLTool tool] keyWithURL:URL];
+ KTVHCDataUnit *obj = [self.unitQueue unitWithKey:key];
+ if (obj) {
+ NSArray *items = obj.unitItems;
+ NSMutableArray *zones = [NSMutableArray array];
+ for (KTVHCDataUnitItem *item in items) {
+ KTVHCDataCacheItemZone *zone = [[KTVHCDataCacheItemZone alloc] initWithOffset:item.offset length:item.length];
+ [zones addObject:zone];
}
- if (itemZones.count <= 0)
- {
- itemZones = nil;
+ if (zones.count == 0) {
+ zones = nil;
}
- cacheItem = [KTVHCDataCacheItem itemWithURL:obj.URL totalLength:obj.totalLength cacheLength:obj.cacheLength vaildLength:obj.validLength zones:itemZones];
+ cacheItem = [[KTVHCDataCacheItem alloc] initWithURL:obj.URL
+ zones:zones
+ totalLength:obj.totalLength
+ cacheLength:obj.cacheLength
+ vaildLength:obj.validLength];
}
[self unlock];
return cacheItem;
}
-- (NSArray <KTVHCDataCacheItem *> *)allCacheItem
+- (NSArray<KTVHCDataCacheItem *> *)allCacheItem
{
[self lock];
- NSMutableArray * cacheItems = [NSMutableArray array];
- NSArray <KTVHCDataUnit *> * units = [self.unitQueue allUnits];
- for (KTVHCDataUnit * obj in units)
- {
- KTVHCDataCacheItem * cacheItem = [self cacheItemWithURL:obj.URL];
- if (cacheItem)
- {
+ NSMutableArray *cacheItems = [NSMutableArray array];
+ NSArray<KTVHCDataUnit *> *units = [self.unitQueue allUnits];
+ for (KTVHCDataUnit *obj in units) {
+ KTVHCDataCacheItem *cacheItem = [self cacheItemWithURL:obj.URL];
+ if (cacheItem) {
[cacheItems addObject:cacheItem];
}
}
- if (cacheItems.count <= 0)
- {
+ if (cacheItems.count == 0) {
cacheItems = nil;
}
[self unlock];
@@ -146,15 +138,13 @@
- (void)deleteUnitWithURL:(NSURL *)URL
{
- if (URL.absoluteString.length <= 0)
- {
+ if (URL.absoluteString.length <= 0) {
return;
}
[self lock];
- NSString * key = [KTVHCURLTools keyWithURL:URL];
- KTVHCDataUnit * obj = [self.unitQueue unitWithKey:key];
- if (obj && obj.workingCount <= 0)
- {
+ NSString *key = [[KTVHCURLTool tool] keyWithURL:URL];
+ KTVHCDataUnit *obj = [self.unitQueue unitWithKey:key];
+ if (obj && obj.workingCount <= 0) {
KTVHCLogDataUnit(@"%p, Delete Unit\nUnit : %@\nFunc : %s", self, obj, __func__);
[obj deleteFiles];
[self.unitQueue popUnit:obj];
@@ -165,15 +155,14 @@
- (void)deleteUnitsWithLength:(long long)length
{
- if (length <= 0)
- {
+ if (length <= 0) {
return;
}
[self lock];
BOOL needArchive = NO;
long long currentLength = 0;
- NSArray <KTVHCDataUnit *> * units = [self.unitQueue allUnits];
- [units sortedArrayUsingComparator:^NSComparisonResult(KTVHCDataUnit * obj1, KTVHCDataUnit * obj2) {
+ NSArray<KTVHCDataUnit *> *units = [self.unitQueue allUnits];
+ [units sortedArrayUsingComparator:^NSComparisonResult(KTVHCDataUnit *obj1, KTVHCDataUnit *obj2) {
NSComparisonResult result = NSOrderedDescending;
[obj1 lock];
[obj2 lock];
@@ -188,10 +177,8 @@
[obj2 unlock];
return result;
}];
- for (KTVHCDataUnit * obj in units)
- {
- if (obj.workingCount <= 0)
- {
+ for (KTVHCDataUnit *obj in units) {
+ if (obj.workingCount <= 0) {
[obj lock];
currentLength += obj.cacheLength;
KTVHCLogDataUnit(@"%p, Delete Unit\nUnit : %@\nFunc : %s", self, obj, __func__);
@@ -200,13 +187,11 @@
[self.unitQueue popUnit:obj];
needArchive = YES;
}
- if (currentLength >= length)
- {
+ if (currentLength >= length) {
break;
}
}
- if (needArchive)
- {
+ if (needArchive) {
[self setNeedsArchive];
}
[self unlock];
@@ -216,43 +201,33 @@
{
[self lock];
BOOL needArchive = NO;
- NSArray <KTVHCDataUnit *> * units = [self.unitQueue allUnits];
- for (KTVHCDataUnit * obj in units)
- {
- if (obj.workingCount <= 0)
- {
+ NSArray<KTVHCDataUnit *> *units = [self.unitQueue allUnits];
+ for (KTVHCDataUnit *obj in units) {
+ if (obj.workingCount <= 0) {
KTVHCLogDataUnit(@"%p, Delete Unit\nUnit : %@\nFunc : %s", self, obj, __func__);
[obj deleteFiles];
[self.unitQueue popUnit:obj];
needArchive = YES;
}
}
- if (needArchive)
- {
+ if (needArchive) {
[self setNeedsArchive];
}
[self unlock];
}
-- (void)unitShouldRearchive:(KTVHCDataUnit *)unit
-{
- [self setNeedsArchive];
-}
-
- (void)setNeedsArchive
{
[self lock];
self.expectArchiveIndex += 1;
int64_t expectArchiveIndex = self.expectArchiveIndex;
[self unlock];
- if (!self.archiveQueue)
- {
+ if (!self.archiveQueue) {
self.archiveQueue = dispatch_queue_create("KTVHTTPCache-archiveQueue", DISPATCH_QUEUE_SERIAL);
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), self.archiveQueue, ^{
[self lock];
- if (self.expectArchiveIndex == expectArchiveIndex)
- {
+ if (self.expectArchiveIndex == expectArchiveIndex) {
[self archiveIfNeeded];
}
[self unlock];
@@ -262,14 +237,20 @@
- (void)archiveIfNeeded
{
[self lock];
- if (self.actualArchiveIndex != self.expectArchiveIndex)
- {
+ if (self.actualArchiveIndex != self.expectArchiveIndex) {
self.actualArchiveIndex = self.expectArchiveIndex;
[self.unitQueue archive];
}
[self unlock];
}
+#pragma mark - KTVHCDataUnitDelegate
+
+- (void)ktv_unitDidChangeMetadata:(KTVHCDataUnit *)unit
+{
+ [self setNeedsArchive];
+}
+
#pragma mark - UIApplicationWillTerminateNotification
- (void)applicationWillTerminate:(NSNotification *)notification
@@ -291,8 +272,7 @@
- (void)lock
{
- if (!self.coreLock)
- {
+ if (!self.coreLock) {
self.coreLock = [[NSRecursiveLock alloc] init];
}
[self.coreLock lock];
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.h
index c1c1f381f..951f85d93 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.h
@@ -14,9 +14,9 @@
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)queueWithPath:(NSString *)path;
+- (instancetype)initWithPath:(NSString *)path NS_DESIGNATED_INITIALIZER;
-- (NSArray <KTVHCDataUnit *> *)allUnits;
+- (NSArray<KTVHCDataUnit *> *)allUnits;
- (KTVHCDataUnit *)unitWithKey:(NSString *)key;
- (void)putUnit:(KTVHCDataUnit *)unit;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.m
index 88bd0c654..734f16133 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDataStorage/KTVHCDataUnitQueue.m
@@ -11,62 +11,51 @@
@interface KTVHCDataUnitQueue ()
-@property (nonatomic, copy) NSString * path;
-@property (nonatomic, strong) NSMutableArray <KTVHCDataUnit *> * unitArray;
+@property (nonatomic, copy) NSString *path;
+@property (nonatomic, strong) NSMutableArray<KTVHCDataUnit *> *unitArray;
@end
@implementation KTVHCDataUnitQueue
-+ (instancetype)queueWithPath:(NSString *)path
-{
- return [[self alloc] initWithPath:path];
-}
-
- (instancetype)initWithPath:(NSString *)path
{
- if (self = [super init])
- {
+ if (self = [super init]) {
self.path = path;
- NSMutableArray * unitArray = nil;
+ NSMutableArray *unitArray = nil;
@try {
unitArray = [NSKeyedUnarchiver unarchiveObjectWithFile:self.path];
- } @catch (NSException * exception) {
+ } @catch (NSException *exception) {
KTVHCLogDataUnitQueue(@"%p, Init exception\nname : %@\breason : %@\nuserInfo : %@", self, exception.name, exception.reason, exception.userInfo);
}
self.unitArray = [NSMutableArray array];
- for (KTVHCDataUnit * obj in unitArray) {
- if (obj.valid) {
- [self.unitArray addObject:obj];
- } else {
+ for (KTVHCDataUnit *obj in unitArray) {
+ if (obj.error) {
[obj deleteFiles];
+ } else {
+ [self.unitArray addObject:obj];
}
}
}
return self;
}
-- (NSArray <KTVHCDataUnit *> *)allUnits
+- (NSArray<KTVHCDataUnit *> *)allUnits
{
- if (self.unitArray.count <= 0)
- {
+ if (self.unitArray.count <= 0) {
return nil;
}
- NSArray <KTVHCDataUnit *> * units = [self.unitArray copy];
- return units;
+ return [self.unitArray copy];
}
- (KTVHCDataUnit *)unitWithKey:(NSString *)key
{
- if (key.length <= 0)
- {
+ if (key.length <= 0) {
return nil;
}
- KTVHCDataUnit * unit = nil;
- for (KTVHCDataUnit * obj in self.unitArray)
- {
- if ([obj.key isEqualToString:key])
- {
+ KTVHCDataUnit *unit = nil;
+ for (KTVHCDataUnit *obj in self.unitArray) {
+ if ([obj.key isEqualToString:key]) {
unit = obj;
break;
}
@@ -76,24 +65,20 @@
- (void)putUnit:(KTVHCDataUnit *)unit
{
- if (!unit)
- {
+ if (!unit) {
return;
}
- if (![self.unitArray containsObject:unit])
- {
+ if (![self.unitArray containsObject:unit]) {
[self.unitArray addObject:unit];
}
}
- (void)popUnit:(KTVHCDataUnit *)unit
{
- if (!unit)
- {
+ if (!unit) {
return;
}
- if ([self.unitArray containsObject:unit])
- {
+ if ([self.unitArray containsObject:unit]) {
[self.unitArray removeObject:unit];
}
}
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.h
index 05a4bb11a..49ac662f6 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.h
@@ -7,9 +7,9 @@
//
#import <Foundation/Foundation.h>
-#import "KTVHCDataRequest.h"
#import "KTVHCDataResponse.h"
-#import "KTVHCCommon.h"
+#import "KTVHCDataRequest.h"
+#import "KTVHCMacro.h"
KTVHTTPCACHE_EXTERN NSString * const KTVHCContentTypeVideo;
KTVHTTPCACHE_EXTERN NSString * const KTVHCContentTypeAudio;
@@ -21,9 +21,9 @@ KTVHTTPCACHE_EXTERN NSString * const KTVHCContentTypeBinaryOctetStream;
@protocol KTVHCDownloadDelegate <NSObject>
-- (void)download:(KTVHCDownload *)download didCompleteWithError:(NSError *)error;
-- (void)download:(KTVHCDownload *)download didReceiveResponse:(KTVHCDataResponse *)response;
-- (void)download:(KTVHCDownload *)download didReceiveData:(NSData *)data;
+- (void)ktv_download:(KTVHCDownload *)download didCompleteWithError:(NSError *)error;
+- (void)ktv_download:(KTVHCDownload *)download didReceiveResponse:(KTVHCDataResponse *)response;
+- (void)ktv_download:(KTVHCDownload *)download didReceiveData:(NSData *)data;
@end
@@ -34,19 +34,19 @@ KTVHTTPCACHE_EXTERN NSString * const KTVHCContentTypeBinaryOctetStream;
+ (instancetype)download;
-@property (nonatomic, assign) NSTimeInterval timeoutInterval;
+@property (nonatomic) NSTimeInterval timeoutInterval;
/**
* Header Fields
*/
-@property (nonatomic, copy) NSArray <NSString *> * whitelistHeaderKeys;
-@property (nonatomic, copy) NSDictionary <NSString *, NSString *> * additionalHeaders;
+@property (nonatomic, copy) NSArray<NSString *> *whitelistHeaderKeys;
+@property (nonatomic, copy) NSDictionary<NSString *, NSString *> *additionalHeaders;
/**
* Content-Type
*/
-@property (nonatomic, copy) NSArray <NSString *> * acceptContentTypes;
-@property (nonatomic, copy) BOOL (^unsupportContentTypeFilter)(NSURL * URL, NSString * contentType);
+@property (nonatomic, copy) NSArray<NSString *> *acceptableContentTypes;
+@property (nonatomic, copy) BOOL (^unacceptableContentTypeDisposer)(NSURL *URL, NSString *contentType);
- (NSURLSessionTask *)downloadWithRequest:(KTVHCDataRequest *)request delegate:(id<KTVHCDownloadDelegate>)delegate;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.m
index c72ec34d1..ad799bf6a 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCDownload/KTVHCDownload.m
@@ -7,6 +7,7 @@
//
#import "KTVHCDownload.h"
+#import "KTVHCData+Internal.h"
#import "KTVHCDataUnitPool.h"
#import "KTVHCDataStorage.h"
#import "KTVHCError.h"
@@ -22,13 +23,14 @@ NSString * const KTVHCContentTypeBinaryOctetStream = @"binary/octet-stream"
@interface KTVHCDownload () <NSURLSessionDataDelegate, NSLocking>
-@property (nonatomic, strong) NSLock * coreLock;
-@property (nonatomic, strong) NSURLSession * session;
-@property (nonatomic, strong) NSOperationQueue * sessionDelegateQueue;
-@property (nonatomic, strong) NSURLSessionConfiguration * sessionConfiguration;
-@property (nonatomic, strong) NSMutableDictionary <NSURLSessionTask *, NSError *> * errorDictionary;
-@property (nonatomic, strong) NSMutableDictionary <NSURLSessionTask *, KTVHCDataRequest *> * requestDictionary;
-@property (nonatomic, strong) NSMutableDictionary <NSURLSessionTask *, id<KTVHCDownloadDelegate>> * delegateDictionary;
+@property (nonatomic, strong) NSLock *coreLock;
+@property (nonatomic, strong) NSURLSession *session;
+@property (nonatomic, strong) NSOperationQueue *sessionDelegateQueue;
+@property (nonatomic, strong) NSURLSessionConfiguration *sessionConfiguration;
+@property (nonatomic, strong) NSMutableDictionary<NSURLSessionTask *, NSError *> *errorDictionary;
+@property (nonatomic, strong) NSMutableDictionary<NSURLSessionTask *, KTVHCDataRequest *> *requestDictionary;
+@property (nonatomic, strong) NSMutableDictionary<NSURLSessionTask *, id<KTVHCDownloadDelegate>> *delegateDictionary;
+@property (nonatomic) UIBackgroundTaskIdentifier backgroundTask;
@end
@@ -36,7 +38,7 @@ NSString * const KTVHCContentTypeBinaryOctetStream = @"binary/octet-stream"
+ (instancetype)download
{
- static KTVHCDownload * obj = nil;
+ static KTVHCDownload *obj = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
obj = [[self alloc] init];
@@ -46,10 +48,10 @@ NSString * const KTVHCContentTypeBinaryOctetStream = @"binary/octet-stream"
- (instancetype)init
{
- if (self = [super init])
- {
+ if (self = [super init]) {
KTVHCLogAlloc(self);
self.timeoutInterval = 30.0f;
+ self.backgroundTask = UIBackgroundTaskInvalid;
self.errorDictionary = [NSMutableDictionary dictionary];
self.requestDictionary = [NSMutableDictionary dictionary];
self.delegateDictionary = [NSMutableDictionary dictionary];
@@ -61,11 +63,11 @@ NSString * const KTVHCContentTypeBinaryOctetStream = @"binary/octet-stream"
self.session = [NSURLSession sessionWithConfiguration:self.sessionConfiguration
delegate:self
delegateQueue:self.sessionDelegateQueue];
- self.acceptContentTypes = @[KTVHCContentTypeVideo,
- KTVHCContentTypeAudio,
- KTVHCContentTypeApplicationMPEG4,
- KTVHCContentTypeApplicationOctetStream,
- KTVHCContentTypeBinaryOctetStream];
+ self.acceptableContentTypes = @[KTVHCContentTypeVideo,
+ KTVHCContentTypeAudio,
+ KTVHCContentTypeApplicationMPEG4,
+ KTVHCContentTypeApplicationOctetStream,
+ KTVHCContentTypeBinaryOctetStream];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(applicationDidEnterBackground:)
name:UIApplicationDidEnterBackgroundNotification
@@ -81,43 +83,45 @@ NSString * const KTVHCContentTypeBinaryOctetStream = @"binary/octet-stream"
- (void)dealloc
{
KTVHCLogDealloc(self);
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
}
-- (NSArray <NSString *> *)availableHeaderKeys
+- (NSArray<NSString *> *)availableHeaderKeys
{
- static NSArray <NSString *> * availableHeaderKeys = nil;
+ static NSArray<NSString *> *obj = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
- availableHeaderKeys = @[@"User-Agent",
- @"Connection",
- @"Accept",
- @"Accept-Encoding",
- @"Accept-Language",
- @"Range"];
+ obj = @[@"User-Agent",
+ @"Connection",
+ @"Accept",
+ @"Accept-Encoding",
+ @"Accept-Language",
+ @"Range"];
});
- return availableHeaderKeys;
+ return obj;
}
- (NSURLSessionTask *)downloadWithRequest:(KTVHCDataRequest *)request delegate:(id<KTVHCDownloadDelegate>)delegate
{
[self lock];
- NSMutableURLRequest * HTTPRequest = [NSMutableURLRequest requestWithURL:request.URL];
- [request.headers enumerateKeysAndObjectsUsingBlock:^(NSString * key, NSString * obj, BOOL * stop) {
- if ([[self availableHeaderKeys] containsObject:key] || [self.whitelistHeaderKeys containsObject:key]) {
- [HTTPRequest setValue:obj forHTTPHeaderField:key];
+ NSMutableURLRequest *mRequest = [NSMutableURLRequest requestWithURL:request.URL];
+ mRequest.timeoutInterval = self.timeoutInterval;
+ mRequest.cachePolicy = NSURLRequestReloadIgnoringCacheData;
+ [request.headers enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *obj, BOOL *stop) {
+ if ([self.availableHeaderKeys containsObject:key] ||
+ [self.whitelistHeaderKeys containsObject:key]) {
+ [mRequest setValue:obj forHTTPHeaderField:key];
}
}];
- HTTPRequest.timeoutInterval = self.timeoutInterval;
- HTTPRequest.cachePolicy = NSURLRequestReloadIgnoringCacheData;
- [self.additionalHeaders enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, NSString * _Nonnull obj, BOOL * _Nonnull stop) {
- [HTTPRequest setValue:obj forHTTPHeaderField:key];
+ [self.additionalHeaders enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *obj, BOOL *stop) {
+ [mRequest setValue:obj forHTTPHeaderField:key];
}];
- NSURLSessionDataTask * task = [self.session dataTaskWithRequest:HTTPRequest];
- task.priority = 1.0;
+ NSURLSessionDataTask *task = [self.session dataTaskWithRequest:mRequest];
[self.requestDictionary setObject:request forKey:task];
[self.delegateDictionary setObject:delegate forKey:task];
- KTVHCLogDownload(@"%p, Add Request\nrequest : %@\nURL : %@\nheaders : %@\nHTTPRequest headers : %@\nCount : %d", self, request, request.URL, request.headers, HTTPRequest.allHTTPHeaderFields, (int)self.delegateDictionary.count);
+ task.priority = 1.0;
[task resume];
+ KTVHCLogDownload(@"%p, Add Request\nrequest : %@\nURL : %@\nheaders : %@\nHTTPRequest headers : %@\nCount : %d", self, request, request.URL, request.headers, mRequest.allHTTPHeaderFields, (int)self.delegateDictionary.count);
[self unlock];
return task;
}
@@ -126,92 +130,84 @@ NSString * const KTVHCContentTypeBinaryOctetStream = @"binary/octet-stream"
{
[self lock];
KTVHCLogDownload(@"%p, Complete\nError : %@", self, error);
- id <KTVHCDownloadDelegate> delegate = [self.delegateDictionary objectForKey:task];
- NSError * cancelError = [self.errorDictionary objectForKey:task];
- if (cancelError)
- {
- error = cancelError;
+ if ([self.errorDictionary objectForKey:task]) {
+ error = [self.errorDictionary objectForKey:task];
}
- [delegate download:self didCompleteWithError:error];
+ id<KTVHCDownloadDelegate> delegate = [self.delegateDictionary objectForKey:task];
+ [delegate ktv_download:self didCompleteWithError:error];
[self.delegateDictionary removeObjectForKey:task];
[self.requestDictionary removeObjectForKey:task];
[self.errorDictionary removeObjectForKey:task];
- if (self.delegateDictionary.count <= 0)
- {
- [self cleanBackgroundTaskAsync];
+ if (self.delegateDictionary.count <= 0) {
+ [self endBackgroundTaskDelay];
}
[self unlock];
}
-- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition))completionHandler
+- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task didReceiveResponse:(NSHTTPURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition))completionHandler
{
[self lock];
- NSHTTPURLResponse * HTTPResponse = (NSHTTPURLResponse *)response;
- KTVHCDataRequest * dataRequest = [self.requestDictionary objectForKey:dataTask];
- KTVHCDataResponse * dataResponse = [[KTVHCDataResponse alloc] initWithURL:dataRequest.URL headers:HTTPResponse.allHeaderFields];
- KTVHCLogDownload(@"%p, Receive response\nrequest : %@\nresponse : %@\nHTTPResponse : %@", self, dataRequest, dataResponse, [(NSHTTPURLResponse *)response allHeaderFields]);
- NSError * error = nil;
- if (!error)
- {
- if (HTTPResponse.statusCode > 400)
- {
- error = [KTVHCError errorForResponseUnavailable:dataTask.currentRequest.URL request:dataTask.currentRequest response:dataTask.response];
+ KTVHCDataRequest *dataRequest = [self.requestDictionary objectForKey:task];
+ KTVHCDataResponse *dataResponse = [[KTVHCDataResponse alloc] initWithURL:dataRequest.URL headers:response.allHeaderFields];
+ KTVHCLogDownload(@"%p, Receive response\nrequest : %@\nresponse : %@\nHTTPResponse : %@", self, dataRequest, dataResponse, response.allHeaderFields);
+ NSError *error = nil;
+ if (!error) {
+ if (response.statusCode > 400) {
+ error = [KTVHCError errorForResponseUnavailable:task.currentRequest.URL
+ request:task.currentRequest
+ response:task.response];
}
- if (!error)
- {
- BOOL contentTypeVaild = NO;
- if (dataResponse.contentType.length > 0)
- {
- for (NSString * obj in self.acceptContentTypes)
- {
- if ([[dataResponse.contentType lowercaseString] containsString:[obj lowercaseString]])
- {
- contentTypeVaild = YES;
- }
- }
- if (!contentTypeVaild && self.unsupportContentTypeFilter)
- {
- contentTypeVaild = self.unsupportContentTypeFilter(dataRequest.URL, dataResponse.contentType);
+ }
+ if (!error) {
+ BOOL vaild = NO;
+ if (dataResponse.contentType.length > 0) {
+ for (NSString *obj in self.acceptableContentTypes) {
+ if ([[dataResponse.contentType lowercaseString] containsString:[obj lowercaseString]]) {
+ vaild = YES;
}
}
- if (!contentTypeVaild)
- {
- error = [KTVHCError errorForUnsupportContentType:dataTask.currentRequest.URL request:dataTask.currentRequest response:dataTask.response];
+ if (!vaild && self.unacceptableContentTypeDisposer) {
+ vaild = self.unacceptableContentTypeDisposer(dataRequest.URL, dataResponse.contentType);
}
- if (!error)
- {
- if (dataResponse.currentLength <= 0 ||
- (!KTVHCRangeIsFull(dataRequest.range) &&
- (dataResponse.currentLength != KTVHCRangeGetLength(dataRequest.range))))
- {
- error = [KTVHCError errorForUnsupportContentType:dataTask.currentRequest.URL request:dataTask.currentRequest response:dataTask.response];
- }
- if (!error)
- {
- long long length = dataResponse.currentLength + [KTVHCDataStorage storage].totalCacheLength - [KTVHCDataStorage storage].maxCacheLength;
- if (length > 0)
- {
- [[KTVHCDataUnitPool pool] deleteUnitsWithLength:length];
- length = dataResponse.currentLength + [KTVHCDataStorage storage].totalCacheLength - [KTVHCDataStorage storage].maxCacheLength;
- if (length > 0)
- {
- error = [KTVHCError errorForNotEnoughDiskSpace:dataResponse.totalLength request:dataResponse.currentLength totalCacheLength:[KTVHCDataStorage storage].totalCacheLength maxCacheLength:[KTVHCDataStorage storage].maxCacheLength];
- }
- }
- }
+ }
+ if (!vaild) {
+ error = [KTVHCError errorForUnsupportContentType:task.currentRequest.URL
+ request:task.currentRequest
+ response:task.response];
+ }
+ }
+ if (!error) {
+ if (dataResponse.contentLength <= 0 ||
+ (!KTVHCRangeIsFull(dataRequest.range) &&
+ (dataResponse.contentLength != KTVHCRangeGetLength(dataRequest.range)))) {
+ error = [KTVHCError errorForUnsupportContentType:task.currentRequest.URL
+ request:task.currentRequest
+ response:task.response];
+ }
+ }
+ if (!error) {
+ long long (^getDeletionLength)(long long) = ^(long long desireLength){
+ return desireLength + [KTVHCDataStorage storage].totalCacheLength - [KTVHCDataStorage storage].maxCacheLength;
+ };
+ long long length = getDeletionLength(dataResponse.contentLength);
+ if (length > 0) {
+ [[KTVHCDataUnitPool pool] deleteUnitsWithLength:length];
+ length = getDeletionLength(dataResponse.contentLength);
+ if (length > 0) {
+ error = [KTVHCError errorForNotEnoughDiskSpace:dataResponse.totalLength
+ request:dataResponse.contentLength
+ totalCacheLength:[KTVHCDataStorage storage].totalCacheLength
+ maxCacheLength:[KTVHCDataStorage storage].maxCacheLength];
}
}
}
- if (error)
- {
+ if (error) {
KTVHCLogDownload(@"%p, Invaild response\nError : %@", self, error);
- [self.errorDictionary setObject:error forKey:dataTask];
+ [self.errorDictionary setObject:error forKey:task];
completionHandler(NSURLSessionResponseCancel);
- }
- else
- {
- id <KTVHCDownloadDelegate> delegate = [self.delegateDictionary objectForKey:dataTask];
- [delegate download:self didReceiveResponse:dataResponse];
+ } else {
+ id<KTVHCDownloadDelegate> delegate = [self.delegateDictionary objectForKey:task];
+ [delegate ktv_download:self didReceiveResponse:dataResponse];
completionHandler(NSURLSessionResponseAllow);
}
[self unlock];
@@ -229,16 +225,15 @@ NSString * const KTVHCContentTypeBinaryOctetStream = @"binary/octet-stream"
{
[self lock];
KTVHCLogDownload(@"%p, Receive data - Begin\nLength : %lld\nURL : %@", self, (long long)data.length, dataTask.originalRequest.URL.absoluteString);
- id <KTVHCDownloadDelegate> delegate = [self.delegateDictionary objectForKey:dataTask];
- [delegate download:self didReceiveData:data];
+ id<KTVHCDownloadDelegate> delegate = [self.delegateDictionary objectForKey:dataTask];
+ [delegate ktv_download:self didReceiveData:data];
KTVHCLogDownload(@"%p, Receive data - End\nLength : %lld\nURL : %@", self, (long long)data.length, dataTask.originalRequest.URL.absoluteString);
[self unlock];
}
- (void)lock
{
- if (!self.coreLock)
- {
+ if (!self.coreLock) {
self.coreLock = [[NSLock alloc] init];
}
[self.coreLock lock];
@@ -251,53 +246,41 @@ NSString * const KTVHCContentTypeBinaryOctetStream = @"binary/octet-stream"
#pragma mark - Background Task
-static UIBackgroundTaskIdentifier backgroundTaskIdentifier = -1;
-
- (void)applicationDidEnterBackground:(NSNotification *)notification
{
- [self cleanBackgroundTask];
[self lock];
- if (self.delegateDictionary.count > 0)
- {
- backgroundTaskIdentifier = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
- [self cleanBackgroundTask];
- }];
- UIBackgroundTaskIdentifier blockIdentifier = backgroundTaskIdentifier;
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(300 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- if (blockIdentifier == backgroundTaskIdentifier)
- {
- [self cleanBackgroundTask];
- }
- });
+ if (self.delegateDictionary.count > 0) {
+ [self beginBackgroundTask];
}
[self unlock];
}
- (void)applicationWillEnterForeground:(NSNotification *)notification
{
- [self cleanBackgroundTask];
+ [self endBackgroundTask];
}
-- (void)cleanBackgroundTask
+- (void)beginBackgroundTask
{
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- backgroundTaskIdentifier = UIBackgroundTaskInvalid;
- });
- if (backgroundTaskIdentifier != UIBackgroundTaskInvalid)
- {
- [[UIApplication sharedApplication] endBackgroundTask:backgroundTaskIdentifier];
- backgroundTaskIdentifier = UIBackgroundTaskInvalid;
+ self.backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
+ [self endBackgroundTask];
+ }];
+}
+
+- (void)endBackgroundTask
+{
+ if (self.backgroundTask != UIBackgroundTaskInvalid) {
+ [[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask];
+ self.backgroundTask = UIBackgroundTaskInvalid;
}
}
-- (void)cleanBackgroundTaskAsync
+- (void)endBackgroundTaskDelay
{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self lock];
- if (self.delegateDictionary.count <= 0)
- {
- [self cleanBackgroundTask];
+ if (self.delegateDictionary.count <= 0) {
+ [self endBackgroundTask];
}
[self unlock];
});
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.h
index 33c2e21d7..8d16f3e7d 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.h
@@ -11,6 +11,4 @@
@interface KTVHCHTTPConnection : HTTPConnection
-+ (NSString *)pingResponseValue;
-
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.m
index 7cf1dc903..8bff81b2d 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPConnection.m
@@ -7,23 +7,16 @@
//
#import "KTVHCHTTPConnection.h"
-#import "KTVHCHTTPRequest.h"
#import "KTVHCHTTPResponse.h"
-#import "KTVHCHTTPPingResponse.h"
-#import "KTVHCHTTPURL.h"
+#import "KTVHCDataStorage.h"
+#import "KTVHCURLTool.h"
#import "KTVHCLog.h"
@implementation KTVHCHTTPConnection
-+ (NSString *)pingResponseValue
-{
- return KTVHCHTTPPingResponseResponseValue;
-}
-
- (id)initWithAsyncSocket:(GCDAsyncSocket *)newSocket configuration:(HTTPConfig *)aConfig
{
- if (self = [super initWithAsyncSocket:newSocket configuration:aConfig])
- {
+ if (self = [super initWithAsyncSocket:newSocket configuration:aConfig]) {
KTVHCLogAlloc(self);
}
return self;
@@ -37,26 +30,11 @@
- (NSObject<HTTPResponse> *)httpResponseForMethod:(NSString *)method URI:(NSString *)path
{
KTVHCLogHTTPConnection(@"%p, Receive request\nmethod : %@\npath : %@\nURL : %@", self, method, path, request.url);
- KTVHCHTTPURL * URL = [[KTVHCHTTPURL alloc] initWithProxyURL:request.url];
- switch (URL.type)
- {
- case KTVHCHTTPURLTypeUnknown:
- return nil;
- case KTVHCHTTPURLTypePing:
- {
- KTVHCHTTPPingResponse * currentResponse = [KTVHCHTTPPingResponse responseWithConnection:self];
- return currentResponse;
- }
- case KTVHCHTTPURLTypeContent:
- {
- KTVHCHTTPRequest * currentRequest = [[KTVHCHTTPRequest alloc] initWithURL:URL.URL headers:request.allHeaderFields];
- currentRequest.method = request.method;
- currentRequest.version = request.version;
- KTVHCHTTPResponse * currentResponse = [[KTVHCHTTPResponse alloc] initWithConnection:self request:currentRequest];
- return currentResponse;
- }
- }
- return nil;
+ NSDictionary<NSString *,NSString *> *parameters = [[KTVHCURLTool tool] parseQuery:request.url.query];
+ NSURL *URL = [NSURL URLWithString:[parameters objectForKey:@"url"]];
+ KTVHCDataRequest *dataRequest = [[KTVHCDataRequest alloc] initWithURL:URL headers:request.allHeaderFields];
+ KTVHCHTTPResponse *response = [[KTVHCHTTPResponse alloc] initWithConnection:self dataRequest:dataRequest];
+ return response;
}
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.h
index f3b8c1588..387377b07 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.h
@@ -10,13 +10,13 @@
#import "KTVHCHTTPHeader.h"
@class KTVHCHTTPConnection;
-@class KTVHCHTTPRequest;
+@class KTVHCDataRequest;
@interface KTVHCHTTPResponse : NSObject <HTTPResponse>
+ (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initWithConnection:(KTVHCHTTPConnection *)connection request:(KTVHCHTTPRequest *)request;
+- (instancetype)initWithConnection:(KTVHCHTTPConnection *)connection dataRequest:(KTVHCDataRequest *)dataRequest NS_DESIGNATED_INITIALIZER;
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.m
index 15e11a7f5..6e4b50eb2 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPResponse.m
@@ -8,34 +8,28 @@
#import "KTVHCHTTPResponse.h"
#import "KTVHCHTTPConnection.h"
-#import "KTVHCHTTPRequest.h"
#import "KTVHCDataStorage.h"
#import "KTVHCLog.h"
@interface KTVHCHTTPResponse () <KTVHCDataReaderDelegate>
-@property (nonatomic, weak) KTVHCHTTPConnection * connection;
-@property (nonatomic, strong) KTVHCHTTPRequest * request;
-@property (nonatomic, strong) KTVHCDataRequest * dataRequest;
-@property (nonatomic, strong) KTVHCDataReader * reader;
-@property (nonatomic, assign) BOOL waitingResponseHeader;
+@property (nonatomic) BOOL waitingResponse;
+@property (nonatomic, strong) KTVHCDataReader *reader;
+@property (nonatomic, weak) KTVHCHTTPConnection *connection;
@end
@implementation KTVHCHTTPResponse
-- (instancetype)initWithConnection:(KTVHCHTTPConnection *)connection request:(KTVHCHTTPRequest *)request
+- (instancetype)initWithConnection:(KTVHCHTTPConnection *)connection dataRequest:(KTVHCDataRequest *)dataRequest
{
- if (self = [super init])
- {
+ if (self = [super init]) {
KTVHCLogAlloc(self);
self.connection = connection;
- self.request = request;
- KTVHCDataRequest * dataRequest = [[KTVHCDataRequest alloc] initWithURL:self.request.URL headers:self.request.headers];
self.reader = [[KTVHCDataStorage storage] readerWithRequest:dataRequest];
self.reader.delegate = self;
[self.reader prepare];
- KTVHCLogHTTPResponse(@"%p, Create response\nrequest : %@", self, self.request);
+ KTVHCLogHTTPResponse(@"%p, Create response\nrequest : %@", self, dataRequest);
}
return self;
}
@@ -50,10 +44,9 @@
- (NSData *)readDataOfLength:(NSUInteger)length
{
- NSData * data = [self.reader readDataOfLength:length];
+ NSData *data = [self.reader readDataOfLength:length];
KTVHCLogHTTPResponse(@"%p, Read data : %lld", self, (long long)data.length);
- if (self.reader.didFinished)
- {
+ if (self.reader.isFinished) {
KTVHCLogHTTPResponse(@"%p, Read data did finished", self);
[self.reader close];
[self.connection responseDidAbort:self];
@@ -63,9 +56,9 @@
- (BOOL)delayResponseHeaders
{
- BOOL waiting = !self.reader.didPrepared;
- self.waitingResponseHeader = waiting;
- KTVHCLogHTTPResponse(@"%p, Delay response : %d", self, self.waitingResponseHeader);
+ BOOL waiting = !self.reader.isPrepared;
+ self.waitingResponse = waiting;
+ KTVHCLogHTTPResponse(@"%p, Delay response : %d", self, self.waitingResponse);
return waiting;
}
@@ -77,52 +70,56 @@
- (NSDictionary *)httpHeaders
{
- KTVHCLogHTTPResponse(@"%p, Header\n%@", self, self.reader.response.headersWithoutRangeAndLength);
- return self.reader.response.headersWithoutRangeAndLength;
+ NSMutableDictionary *headers = [self.reader.response.headers mutableCopy];
+ [headers removeObjectForKey:@"Content-Range"];
+ [headers removeObjectForKey:@"content-range"];
+ [headers removeObjectForKey:@"Content-Length"];
+ [headers removeObjectForKey:@"content-length"];
+ KTVHCLogHTTPResponse(@"%p, Header\n%@", self, headers);
+ return headers;
}
- (UInt64)offset
{
- KTVHCLogHTTPResponse(@"%p, Offset : %lld", self, self.reader.readOffset);
- return self.reader.readOffset;
+ KTVHCLogHTTPResponse(@"%p, Offset : %lld", self, self.reader.readedLength);
+ return self.reader.readedLength;
}
- (void)setOffset:(UInt64)offset
{
- KTVHCLogHTTPResponse(@"%p, Set offset : %lld, %lld", self, offset, self.reader.readOffset);
+ KTVHCLogHTTPResponse(@"%p, Set offset : %lld, %lld", self, offset, self.reader.readedLength);
}
- (BOOL)isDone
{
- KTVHCLogHTTPResponse(@"%p, Check done : %d", self, self.reader.didFinished);
- return self.reader.didFinished;
+ KTVHCLogHTTPResponse(@"%p, Check done : %d", self, self.reader.isFinished);
+ return self.reader.isFinished;
}
- (void)connectionDidClose
{
- KTVHCLogHTTPResponse(@"%p, Connection did closed : %lld, %lld", self, self.reader.response.currentLength, self.reader.readOffset);
+ KTVHCLogHTTPResponse(@"%p, Connection did closed : %lld, %lld", self, self.reader.response.contentLength, self.reader.readedLength);
[self.reader close];
}
#pragma mark - KTVHCDataReaderDelegate
-- (void)readerDidPrepared:(KTVHCDataReader *)reader
+- (void)ktv_readerDidPrepare:(KTVHCDataReader *)reader
{
KTVHCLogHTTPResponse(@"%p, Prepared", self);
- if (self.reader.didPrepared && self.waitingResponseHeader == YES)
- {
+ if (self.reader.isPrepared && self.waitingResponse == YES) {
KTVHCLogHTTPResponse(@"%p, Call connection did prepared", self);
[self.connection responseHasAvailableData:self];
}
}
-- (void)readerHasAvailableData:(KTVHCDataReader *)reader
+- (void)ktv_readerHasAvailableData:(KTVHCDataReader *)reader
{
KTVHCLogHTTPResponse(@"%p, Has available data", self);
[self.connection responseHasAvailableData:self];
}
-- (void)reader:(KTVHCDataReader *)reader didFailed:(NSError *)error
+- (void)ktv_reader:(KTVHCDataReader *)reader didFailWithError:(NSError *)error
{
KTVHCLogHTTPResponse(@"%p, Failed\nError : %@", self, error);
[self.reader close];
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.h
index 8b54ec7b1..4d746cef8 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.h
@@ -15,9 +15,9 @@
+ (instancetype)server;
-@property (nonatomic, assign, readonly) BOOL running;
+@property (nonatomic, readonly, getter=isRunning) BOOL running;
-- (void)start:(NSError **)error;
+- (BOOL)start:(NSError **)error;
- (void)stop;
- (NSURL *)URLWithOriginalURL:(NSURL *)URL;
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.m b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.m
index e4936e259..0e19983e7 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.m
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/Classes/KTVHCHTTPServer/KTVHCHTTPServer.m
@@ -7,20 +7,16 @@
//
#import "KTVHCHTTPServer.h"
-#import "KTVHCHTTPHeader.h"
#import "KTVHCHTTPConnection.h"
-#import "KTVHCHTTPURL.h"
+#import "KTVHCHTTPHeader.h"
+#import "KTVHCURLTool.h"
#import "KTVHCLog.h"
@interface KTVHCHTTPServer ()
-@property (nonatomic, strong) HTTPServer * coreHTTPServer;
-
-@property (nonatomic, assign) BOOL pinging;
-@property (nonatomic, assign) BOOL pingResult;
-@property (nonatomic, strong) NSCondition * pingCondition;
-@property (nonatomic, strong) NSURLSession * pingSession;
-@property (nonatomic, strong) NSURLSessionDataTask * pingTask;
+@property (nonatomic, strong) HTTPServer *server;
+@property (nonatomic) UIBackgroundTaskIdentifier backgroundTask;
+@property (nonatomic) BOOL wantsRunning;
@end
@@ -28,7 +24,7 @@
+ (instancetype)server
{
- static KTVHCHTTPServer * obj = nil;
+ static KTVHCHTTPServer *obj = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
obj = [[self alloc] init];
@@ -38,9 +34,21 @@
- (instancetype)init
{
- if (self = [super init])
- {
+ if (self = [super init]) {
KTVHCLogAlloc(self);
+ self.backgroundTask = UIBackgroundTaskInvalid;
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(applicationDidEnterBackground)
+ name:UIApplicationDidEnterBackgroundNotification
+ object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(applicationWillEnterForeground)
+ name:UIApplicationWillEnterForegroundNotification
+ object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(HTTPConnectionDidDie)
+ name:HTTPConnectionDidDieNotification
+ object:nil];
}
return self;
}
@@ -48,119 +56,119 @@
- (void)dealloc
{
KTVHCLogDealloc(self);
- [self stop];
+ [self stopInternal];
}
-- (BOOL)restart
+- (BOOL)isRunning
{
- KTVHCLogHTTPServer(@"%p, Restart connection count : %lld", self, (long long)[self.coreHTTPServer numberOfHTTPConnections]);
- [self.coreHTTPServer stop];
- NSError * error = nil;
- [self.coreHTTPServer start:&error];
- if (error) {
- KTVHCLogHTTPServer(@"%p, Restart server failed : %@", self, error);
- } else {
- KTVHCLogHTTPServer(@"%p, Restart server success", self);
- }
- return error == nil;
+ return self.server.isRunning;
}
-- (void)start:(NSError * __autoreleasing *)error
+- (BOOL)start:(NSError **)error
{
- self.coreHTTPServer = [[HTTPServer alloc] init];
- [self.coreHTTPServer setConnectionClass:[KTVHCHTTPConnection class]];
- [self.coreHTTPServer setType:@"_http._tcp."];
- NSError * tempError = nil;
- [self.coreHTTPServer start:&tempError];
- if (tempError) {
- * error = tempError;
- KTVHCLogHTTPServer(@"%p, Start server failed : %@", self, tempError);
- } else {
- KTVHCLogHTTPServer(@"%p, Start server success", self);
- }
+ self.wantsRunning = YES;
+ return [self startInternal:error];
}
- (void)stop
{
- if (self.running)
- {
- [self.coreHTTPServer stop];
- [self.pingSession invalidateAndCancel];
- [self.pingTask cancel];
- self.pingTask = nil;
- self.pingSession = nil;
- KTVHCLogHTTPServer(@"%p, Stop server", self);
- }
+ self.wantsRunning = NO;
+ [self stopInternal];
}
- (NSURL *)URLWithOriginalURL:(NSURL *)URL
{
- BOOL success = NO;
- for (int i = 0; i < 2 && !success && self.running && [URL.scheme hasPrefix:@"http"]; i++)
- {
- if (i > 0)
- {
- [self restart];
- }
- success = [self ping];
- KTVHCLogHTTPServer(@"%p, Ping\nsuccess : %d\nindex : %d", self, success, i);
+ if (!URL || URL.isFileURL || URL.absoluteString.length == 0) {
+ return URL;
}
- if (success)
- {
- KTVHCHTTPURL * HCURL = [[KTVHCHTTPURL alloc] initWithOriginalURL:URL];
- URL = [HCURL proxyURLWithPort:self.coreHTTPServer.listeningPort];
+ if (!self.isRunning) {
+ return URL;
}
+ NSString *original = [[KTVHCURLTool tool] URLEncode:URL.absoluteString];
+ NSString *server = [NSString stringWithFormat:@"http://localhost:%d/", self.server.listeningPort];
+ NSString *extension = URL.pathExtension ? [NSString stringWithFormat:@".%@", URL.pathExtension] : @"";
+ NSString *URLString = [NSString stringWithFormat:@"%@request%@?url=%@", server, extension, original];
+ URL = [NSURL URLWithString:URLString];
KTVHCLogHTTPServer(@"%p, Return URL\nURL : %@", self, URL);
return URL;
}
-- (BOOL)ping
+#pragma mark - Internal
+
+- (BOOL)startInternal:(NSError **)error
{
- if (self.running)
- {
- if (!self.pingCondition)
- {
- self.pingCondition = [[NSCondition alloc] init];
- }
- [self.pingCondition lock];
- if (self.pinging)
- {
- [self.pingCondition wait];
- }
- else
- {
- NSURL * pingURL = [[KTVHCHTTPURL pingURL] proxyURLWithPort:self.coreHTTPServer.listeningPort];
- if (!self.pingSession)
- {
- NSURLSessionConfiguration * sessionConfiguration = [NSURLSessionConfiguration defaultSessionConfiguration];
- sessionConfiguration.timeoutIntervalForRequest = 3;
- self.pingSession = [NSURLSession sessionWithConfiguration:sessionConfiguration];
- }
- self.pingTask = [self.pingSession dataTaskWithURL:pingURL completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
- [self.pingCondition lock];
- if (!error && data.length > 0) {
- NSString * pang = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
- self.pingResult = [pang isEqualToString:[KTVHCHTTPConnection pingResponseValue]];
- } else {
- self.pingResult = NO;
- }
- self.pinging = NO;
- [self.pingCondition broadcast];
- [self.pingCondition unlock];
- }];
- self.pinging = YES;
- [self.pingTask resume];
- [self.pingCondition wait];
- }
- [self.pingCondition unlock];
+ self.server = [[HTTPServer alloc] init];
+ [self.server setConnectionClass:[KTVHCHTTPConnection class]];
+ [self.server setType:@"_http._tcp."];
+ [self.server setPort:80];
+ BOOL ret = [self.server start:error];
+ if (ret) {
+ KTVHCLogHTTPServer(@"%p, Start server success", self);
+ } else {
+ KTVHCLogHTTPServer(@"%p, Start server failed", self);
+ }
+ return ret;
+}
+
+- (void)stopInternal
+{
+ [self.server stop];
+ self.server = nil;
+}
+
+#pragma mark - Background Task
+
+- (void)applicationDidEnterBackground
+{
+ if (self.server.numberOfHTTPConnections > 0) {
+ KTVHCLogHTTPServer(@"%p, enter background", self);
+ [self beginBackgroundTask];
+ } else {
+ KTVHCLogHTTPServer(@"%p, enter background and stop server", self);
+ [self stopInternal];
+ }
+}
+
+- (void)applicationWillEnterForeground
+{
+ KTVHCLogHTTPServer(@"%p, enter foreground", self);
+ if (self.backgroundTask == UIBackgroundTaskInvalid && self.wantsRunning) {
+ KTVHCLogHTTPServer(@"%p, restart server", self);
+ [self startInternal:nil];
}
- KTVHCLogHTTPServer(@"%p, Ping result : %d", self, self.pingResult);
- return self.pingResult;
+ [self endBackgroundTask];
}
-- (BOOL)running
+- (void)HTTPConnectionDidDie
{
- return self.coreHTTPServer.isRunning;
+ KTVHCLogHTTPServer(@"%p, connection did die", self);
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+ if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground &&
+ self.server.numberOfHTTPConnections == 0) {
+ KTVHCLogHTTPServer(@"%p, server idle", self);
+ [self endBackgroundTask];
+ [self stopInternal];
+ }
+ });
+}
+
+- (void)beginBackgroundTask
+{
+ KTVHCLogHTTPServer(@"%p, begin background task", self);
+ self.backgroundTask = [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:^{
+ KTVHCLogHTTPServer(@"%p, background task expiration", self);
+ [self endBackgroundTask];
+ [self stopInternal];
+ }];
+}
+
+- (void)endBackgroundTask
+{
+ if (self.backgroundTask != UIBackgroundTaskInvalid) {
+ KTVHCLogHTTPServer(@"%p, end background task", self);
+ [[UIApplication sharedApplication] endBackgroundTask:self.backgroundTask];
+ self.backgroundTask = UIBackgroundTaskInvalid;
+ }
}
@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/KTVHTTPCache.h b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/KTVHTTPCache.h
index a581da771..5e0e6656e 100644
--- a/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/KTVHTTPCache.h
+++ b/Carthage/Checkouts/KTVHTTPCache/KTVHTTPCache/KTVHTTPCache.h
@@ -2,18 +2,28 @@
// KTVHTTPCache.h
// KTVHTTPCache
//
-// Created by Single on 2017/8/10.
+// Created by Single on 2017/8/13.
// Copyright © 2017年 Single. All rights reserved.
//
-#import <UIKit/UIKit.h>
+#import <Foundation/Foundation.h>
-#pragma mark - Interface
+#if __has_include(<KTVHTTPCache/KTVHTTPCache.h>)
-#import "KTVHTTPCacheImp.h"
+FOUNDATION_EXPORT double KTVHTTPCacheVersionNumber;
+FOUNDATION_EXPORT const unsigned char KTVHTTPCacheVersionString[];
-#pragma mark - Data Storage
+#import <KTVHTTPCache/KTVHCRange.h>
+#import <KTVHTTPCache/KTVHCDataReader.h>
+#import <KTVHTTPCache/KTVHCDataLoader.h>
+#import <KTVHTTPCache/KTVHCDataRequest.h>
+#import <KTVHTTPCache/KTVHCDataResponse.h>
+#import <KTVHTTPCache/KTVHCDataCacheItem.h>
+#import <KTVHTTPCache/KTVHCDataCacheItemZone.h>
+
+#else
+#import "KTVHCRange.h"
#import "KTVHCDataReader.h"
#import "KTVHCDataLoader.h"
#import "KTVHCDataRequest.h"
@@ -21,7 +31,324 @@
#import "KTVHCDataCacheItem.h"
#import "KTVHCDataCacheItemZone.h"
-#pragma mark - Common
+#endif
-#import "KTVHCRange.h"
-#import "KTVHCCommon.h"
+/**
+ * KTVHTTPCache is a smart media cache framework.
+ */
+@interface KTVHTTPCache : NSObject
+
+/**
+ * HTTP Server
+ *
+ * This part is used to access the local HTTP server module.
+ * The prefix for API is 'proxy'.
+ */
+#pragma mark - HTTP Server
+
+/**
+ * Start the proxy service.
+ *
+ * @param error : Pointer to receive service error.
+ * @return YES when the proxy service is successfully started, otherwise NO.
+ */
++ (BOOL)proxyStart:(NSError **)error;
+
+/**
+ * Stop the proxy service.
+ */
++ (void)proxyStop;
+
+/**
+ * Proxy service running status.
+ *
+ * @return YES when the proxy service is running, otherwise NO.
+ */
++ (BOOL)proxyIsRunning;
+
+/**
+ * Convert the URL to the proxy URL.
+ *
+ * @param URL : The URL for HTTP content.
+ * @return If the param is a file URL or the proxy service isn't running, return URL. Otherwise reutrn the proxy URL.
+ */
++ (NSURL *)proxyURLWithOriginalURL:(NSURL *)URL;
+
+/**
+ * Data Storage
+ *
+ * This part is used to access the data storage module.
+ * The prefix for API is 'cache'.
+ */
+#pragma mark - Data Storage
+
+/**
+ * Convert the URL to the file URL if the cache is complete.
+ *
+ * @param URL : The URL for HTTP content.
+ * @return If the contents of the URL have all been cached, return the complete file URL. Otherwise return nil.
+ */
++ (NSURL *)cacheCompleteFileURLWithURL:(NSURL *)URL;
+
+/**
+ * Create the data reader for the request.
+ *
+ * @param request : The request of the expected data.
+ * @return The data reader for request.
+ */
++ (KTVHCDataReader *)cacheReaderWithRequest:(KTVHCDataRequest *)request;
+
+/**
+ * Create the data loader for the request.
+ *
+ * @param request : The request of the expected data.
+ * @return The data loader for request.
+ */
++ (KTVHCDataLoader *)cacheLoaderWithRequest:(KTVHCDataRequest *)request;
+
+/**
+ * Set the maximum cache length.
+ * If the current cache length exceeds the maximum length, it will be deleted starting with the oldest cached data.
+ *
+ * @param maxCacheLength : The maximum cache length.
+ */
++ (void)cacheSetMaxCacheLength:(long long)maxCacheLength;
+
+/**
+ * Get the maximum cache length.
+ *
+ * @return Maximum cache length.
+ */
++ (long long)cacheMaxCacheLength;
+
+/**
+ * Get the current cached length.
+ *
+ * @return Current cached length
+ */
++ (long long)cacheTotalCacheLength;
+
+/**
+ * Create the cache item for the URL.
+ *
+ * @param URL : The URL for HTTP content.
+ * @return The cache item for URL.
+ */
++ (KTVHCDataCacheItem *)cacheCacheItemWithURL:(NSURL *)URL;
+
+/**
+ * Get all cache items.
+ *
+ * @return All cache items.
+ */
++ (NSArray<KTVHCDataCacheItem *> *)cacheAllCacheItems;
+
+/**
+ * Delete cache for URL.
+ *
+ * @param URL : The URL for HTTP content.
+ */
++ (void)cacheDeleteCacheWithURL:(NSURL *)URL;
+
+/**
+ * Delete all caches.
+ */
++ (void)cacheDeleteAllCaches;
+
+/**
+ * Encode
+ *
+ * This part is used to access the encode module.
+ * The prefix for API is 'encode'.
+ */
+#pragma mark - Encode
+
+/**
+ * Set URL converter.
+ * If the URL contains authentication parameters. It can be removed here to ensure that the indeterminate URL can use the same cache.
+ *
+ * @warning High frequency call. Make it simple.
+ *
+ * @param URLConverter : The URLConverter.
+ */
++ (void)encodeSetURLConverter:(NSURL * (^)(NSURL *URL))URLConverter;
+
+/**
+ * Download
+ *
+ * This part is used to access the download module.
+ * The prefix for API is 'download'.
+ */
+#pragma mark - Download
+
+/**
+ * Set the HTTP timeout interval.
+ *
+ * @param timeoutInterval : The HTTP timeout interval.
+ */
++ (void)downloadSetTimeoutInterval:(NSTimeInterval)timeoutInterval;
+
+/**
+ * Set HTTP timeout interval.
+ *
+ * @return The current HTTP timeout interval.
+ */
++ (NSTimeInterval)downloadTimeoutInterval;
+
+/**
+ * Set the whitelist header keys.
+ * The following keys are only supported by default:
+ * User-Agent, Connection, Accept, Accept-Encoding, Accept-Language, Range
+ * If you want to allow other keys, set them here.
+ *
+ * @param whitelistHeaderKeys : The keys can be allowed.
+ */
++ (void)downloadSetWhitelistHeaderKeys:(NSArray<NSString *> *)whitelistHeaderKeys;
+
+/**
+ * Get the current whitelist header keys.
+ */
++ (NSArray<NSString *> *)downloadWhitelistHeaderKeys;
+
+/**
+ * Set the additional headers.
+ * If you want to add extra headers, set them here.
+ *
+ * @param additionalHeaders : The headers will be added.
+ */
++ (void)downloadSetAdditionalHeaders:(NSDictionary<NSString *, NSString *> *)additionalHeaders;
+
+/**
+ * Get the current additional headers.
+ */
++ (NSDictionary<NSString *, NSString *> *)downloadAdditionalHeaders;
+
+/**
+ * Set the acceptable content types.
+ * The following values are only supported by default:
+ * video/x, audio/x, application/mp4, application/octet-stream, binary/octet-stream
+ * If you want to allow other content types, set them here.
+ *
+ * @param acceptableContentTypes : The content types can be allowed.
+ */
++ (void)downloadSetAcceptableContentTypes:(NSArray<NSString *> *)acceptableContentTypes;
+
+/**
+ * Get the current acceptable content types.
+ */
++ (NSArray<NSString *> *)downloadAcceptableContentTypes;
+
+/**
+ * Set the unacceptable content type disposer.
+ * If the receive response's Content-Type not included in acceptContentTypes, this method will be called.
+ * If the return value of block is YES, you can continue to load resources. Otherwise the HTTP task will be rejected.
+ *
+ * @param unacceptableContentTypeDisposer : The unacceptable content type disposer.
+ */
++ (void)downloadSetUnacceptableContentTypeDisposer:(BOOL(^)(NSURL *URL, NSString *contentType))unacceptableContentTypeDisposer;
+
+/**
+ * Log
+ *
+ * This part is used to access the Log module.
+ * The prefix for API is 'log'.
+ */
+#pragma mark - Log
+
+/**
+ * Add an external log.
+ *
+ * @param log : An external log.
+ */
++ (void)logAddLog:(NSString *)log;
+
+/**
+ * Set whether to enable the console log.
+ * Default is NO.
+ *
+ * @param consoleLogEnable : The value to enable the console log.
+ */
++ (void)logSetConsoleLogEnable:(BOOL)consoleLogEnable;
+
+/**
+ * Get the value that enables the console log.
+ *
+ * @return The value that enables the console log.
+ */
++ (BOOL)logConsoleLogEnable;
+
+/**
+ * Set whether to enable the record log.
+ * Default is NO.
+ *
+ * @param recordLogEnable : The value to enable the record log.
+ */
++ (void)logSetRecordLogEnable:(BOOL)recordLogEnable;
+
+/**
+ * Get the value that enables the record log.
+ *
+ * @return The value that enables the record log.
+ */
++ (BOOL)logRecordLogEnable;
+
+/**
+ * Get the path to the log file.
+ *
+ * @return The path to the log file.
+ */
++ (NSURL *)logRecordLogFileURL;
+
+/**
+ * Delete the log file.
+ */
++ (void)logDeleteRecordLogFile;
+
+/**
+ * Get all errors
+ *
+ * @return All errors.
+ */
++ (NSDictionary<NSURL *, NSError *> *)logErrors;
+
+/**
+ * Get the error for the URL.
+ *
+ * @param URL : The URL for HTTP content.
+ * @return The error for the URL.
+ */
++ (NSError *)logErrorForURL:(NSURL *)URL;
+
+/**
+ * Delete the error for the URL.
+ *
+ * @param URL : The URL for HTTP content.
+ */
++ (void)logCleanErrorForURL:(NSURL *)URL;
+
+@end
+
+/**
+ * Deprecated
+ *
+ * This part is for compatibility with historical versions.
+ *
+ * @warning This part will be removed in future versions.
+ */
+#pragma mark - Deprecated
+
+@interface KTVHTTPCache (Deprecated)
+
++ (void)logDeleteRecordLog __attribute__((deprecated("Use +logDeleteRecordLogFile instead.")));
++ (NSString *)logRecordLogFilePath __attribute__((deprecated("Use +logRecordLogFileURL instead.")));
++ (NSString *)proxyURLStringWithOriginalURLString:(NSString *)URLString __attribute__((deprecated("Use +proxyURLWithOriginalURL: instead.")));
++ (NSURL *)cacheCompleteFileURLIfExistedWithURL:(NSURL *)URL __attribute__((deprecated("Use +cacheCompleteFileURLWithURL: instead.")));
++ (NSString *)cacheCompleteFilePathIfExistedWithURLString:(NSString *)URLString __attribute__((deprecated("Use +cacheCompleteFileURLWithURL: instead.")));
++ (KTVHCDataCacheItem *)cacheCacheItemWithURLString:(NSString *)URLString __attribute__((deprecated("Use +cacheCacheItemWithURL: instead.")));
++ (void)cacheDeleteCacheWithURLString:(NSString *)URLString __attribute__((deprecated("Use +cacheDeleteCacheWithURL: instead.")));
++ (void)tokenSetURLFilter:(NSURL * (^)(NSURL * URL))URLFilter __attribute__((deprecated("Use +encodeSetURLConverter: instead.")));
++ (void)downloadSetAcceptContentTypes:(NSArray<NSString *> *)acceptContentTypes __attribute__((deprecated("Use +downloadSetAcceptableContentTypes: instead.")));
++ (NSArray<NSString *> *)downloadAcceptContentTypes __attribute__((deprecated("Use +downloadAcceptableContentTypes instead.")));
++ (void)downloadSetUnsupportContentTypeFilter:(BOOL(^)(NSURL *URL, NSString *contentType))contentTypeFilter __attribute__((deprecated("Use +downloadSetUnacceptableContentTypeDisposer: instead.")));
+
+@end
diff --git a/Carthage/Checkouts/KTVHTTPCache/LICENSE b/Carthage/Checkouts/KTVHTTPCache/LICENSE
index 63ce4aa14..c0d42b857 100644
--- a/Carthage/Checkouts/KTVHTTPCache/LICENSE
+++ b/Carthage/Checkouts/KTVHTTPCache/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2017 唱吧
+Copyright (c) 2017 Single
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/Carthage/Checkouts/PDFGenerator/PDFGenerator.podspec b/Carthage/Checkouts/PDFGenerator/PDFGenerator.podspec
index 6ee69aecb..d1e668009 100644
--- a/Carthage/Checkouts/PDFGenerator/PDFGenerator.podspec
+++ b/Carthage/Checkouts/PDFGenerator/PDFGenerator.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "PDFGenerator"
- s.version = "2.1.1"
+ s.version = "2.1"
s.summary = "A simple PDF generator."
s.homepage = "https://github.com/sgr-ksmt/PDFGenerator"
# s.screenshots = ""
@@ -9,6 +9,6 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/sgr-ksmt/PDFGenerator.git", :tag => s.version.to_s }
s.platform = :ios, '8.0'
s.requires_arc = true
- s.source_files = "PDFGenerator/**/*.swift"
+ s.source_files = "PDFGenerator/**/*"
s.frameworks = 'WebKit'
end
diff --git a/Carthage/Checkouts/SVGKit/Source/DOM classes/Core DOM/DOMGlobalSettings.h b/Carthage/Checkouts/SVGKit/Source/DOM classes/Core DOM/DOMGlobalSettings.h
index 661b12837..1ddcd2954 100644
--- a/Carthage/Checkouts/SVGKit/Source/DOM classes/Core DOM/DOMGlobalSettings.h
+++ b/Carthage/Checkouts/SVGKit/Source/DOM classes/Core DOM/DOMGlobalSettings.h
@@ -1 +1 @@
-#define DEBUG_DOM_PARSING 0
+#define DEBUG_DOM_PARSING 0 \ No newline at end of file
diff --git a/Carthage/Checkouts/SVGKit/Source/DOM classes/SVG-DOM/SVGNumber.h b/Carthage/Checkouts/SVGKit/Source/DOM classes/SVG-DOM/SVGNumber.h
index 6993a08a0..dde75b96a 100644
--- a/Carthage/Checkouts/SVGKit/Source/DOM classes/SVG-DOM/SVGNumber.h
+++ b/Carthage/Checkouts/SVGKit/Source/DOM classes/SVG-DOM/SVGNumber.h
@@ -9,4 +9,4 @@
typedef struct
{
float value;
-} SVGNumber;
+} SVGNumber; \ No newline at end of file
diff --git a/Carthage/Checkouts/SVGKit/Source/DOM classes/Unported or Partial DOM/SVGElement.h b/Carthage/Checkouts/SVGKit/Source/DOM classes/Unported or Partial DOM/SVGElement.h
index be92fe776..2fc16e10b 100644
--- a/Carthage/Checkouts/SVGKit/Source/DOM classes/Unported or Partial DOM/SVGElement.h
+++ b/Carthage/Checkouts/SVGKit/Source/DOM classes/Unported or Partial DOM/SVGElement.h
@@ -61,4 +61,4 @@
-(NSString*) cascadedValueForStylableProperty:(NSString*) stylableProperty;
-(NSString*) cascadedValueForStylableProperty:(NSString*) stylableProperty inherit:(BOOL)inherit;
-@end
+@end \ No newline at end of file
diff --git a/Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.h b/Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.h
index 0adffb770..8f9e091ca 100644
--- a/Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.h
+++ b/Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.h
@@ -17,4 +17,4 @@
*/
+(NSData*)dataWithContentsOfStream:(NSInputStream*)input initialCapacity:(NSUInteger)capacity error:(NSError **)error;
-@end
+@end \ No newline at end of file
diff --git a/Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.m b/Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.m
index 23b05f55a..ed28011a8 100644
--- a/Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.m
+++ b/Carthage/Checkouts/SVGKit/Source/Foundation additions/NSData+NSInputStream.m
@@ -57,4 +57,4 @@
}
-@end
+@end \ No newline at end of file
diff --git a/Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKFastImageView.m b/Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKFastImageView.m
index b3e91e54f..0eddc330c 100644
--- a/Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKFastImageView.m
+++ b/Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKFastImageView.m
@@ -39,7 +39,12 @@
self = [super initWithFrame:frame];
if( self )
{
- [self populateFromImage:nil];
+#if SVGKIT_UIKIT
+ self.backgroundColor = [UIColor clearColor];
+#else
+ self.layer.backgroundColor = [NSColor clearColor].CGColor;
+#endif
+
}
return self;
}
diff --git a/Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKLayeredImageView.m b/Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKLayeredImageView.m
index b325eba9e..892bbc16b 100644
--- a/Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKLayeredImageView.m
+++ b/Carthage/Checkouts/SVGKit/Source/UIKit additions/SVGKLayeredImageView.m
@@ -46,7 +46,11 @@
self = [super initWithFrame:frame];
if( self )
{
- [self populateFromImage:nil];
+#if SVGKIT_UIKIT
+ self.backgroundColor = [UIColor clearColor];
+#else
+ self.layer.backgroundColor = [NSColor clearColor].CGColor;
+#endif
}
return self;
}
diff --git a/Carthage/Checkouts/TLPhotoPicker/.swift-version b/Carthage/Checkouts/TLPhotoPicker/.swift-version
index bf77d5496..819e07a22 100644
--- a/Carthage/Checkouts/TLPhotoPicker/.swift-version
+++ b/Carthage/Checkouts/TLPhotoPicker/.swift-version
@@ -1 +1 @@
-4.2
+5.0
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec
index 5d6d7b4d6..a7d342a1c 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker.podspec
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = 'TLPhotoPicker'
- s.version = '1.8.3'
+ s.version = '1.8.5'
s.summary = 'multiple phassets picker for iOS lib. like facebook'
# This description is used to generate tags and improve search results.
@@ -29,8 +29,8 @@ TODO: Add long description of the pod here.
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.ios.deployment_target = '9.1'
- s.swift_version = '4.2'
- s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }
+ s.swift_version = '5.0'
+ s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5.0' }
s.source_files = 'TLPhotoPicker/Classes/**/*'
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAssetsCollection.swift b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAssetsCollection.swift
index 15ddc5062..c2a040dd7 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAssetsCollection.swift
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLAssetsCollection.swift
@@ -26,6 +26,8 @@ public struct TLPHAsset {
var state = CloudDownloadState.ready
public var phAsset: PHAsset? = nil
+ //Bool to check if TLPHAsset returned is created using camera.
+ public var isSelectedFromCamera = false
public var selectedOrder: Int = 0
public var type: AssetType {
get {
@@ -137,7 +139,7 @@ public struct TLPHAsset {
}
@discardableResult
- //convertLivePhotosToPNG
+ //convertLivePhotosToJPG
// false : If you want mov file at live photos
// true : If you want png file at live photos ( HEIC )
public func tempCopyMediaFile(videoRequestOptions: PHVideoRequestOptions? = nil, imageRequestOptions: PHImageRequestOptions? = nil, exportPreset: String = AVAssetExportPresetHighestQuality, convertLivePhotosToJPG: Bool = false, progressBlock:((Double) -> Void)? = nil, completionBlock:@escaping ((URL,String) -> Void)) -> PHImageRequestID? {
@@ -202,7 +204,8 @@ public struct TLPHAsset {
return PHImageManager.default().requestImageData(for: phAsset, options: requestOptions, resultHandler: { (data, uti, orientation, info) in
do {
var data = data
- if convertLivePhotosToJPG == true, let imgData = data, let rawImage = UIImage(data: imgData)?.upOrientationImage() {
+ let needConvertLivePhotoToJPG = phAsset.mediaSubtypes.contains(.photoLive) == true && convertLivePhotosToJPG == true
+ if needConvertLivePhotoToJPG, let imgData = data, let rawImage = UIImage(data: imgData)?.upOrientationImage() {
data = rawImage.jpegData(compressionQuality: 1)
}
try data?.write(to: localURL)
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift
index 1b9a012ce..3911cf5b6 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotoLibrary.swift
@@ -34,13 +34,13 @@ class TLPhotoLibrary {
options.progressHandler = progressBlock
let scale = min(UIScreen.main.scale,2)
let targetSize = CGSize(width: size.width*scale, height: size.height*scale)
- let requestId = self.imageManager.requestLivePhoto(for: asset, targetSize: targetSize, contentMode: .aspectFill, options: options) { (livePhoto, info) in
+ let requestID = self.imageManager.requestLivePhoto(for: asset, targetSize: targetSize, contentMode: .aspectFill, options: options) { (livePhoto, info) in
let complete = (info?["PHImageResultIsDegradedKey"] as? Bool) == false
if let livePhoto = livePhoto {
completionBlock(livePhoto,complete)
}
}
- return requestId
+ return requestID
}
@discardableResult
@@ -49,10 +49,10 @@ class TLPhotoLibrary {
options.isNetworkAccessAllowed = true
options.deliveryMode = .automatic
options.progressHandler = progressBlock
- let requestId = self.imageManager.requestPlayerItem(forVideo: asset, options: options, resultHandler: { playerItem, info in
+ let requestID = self.imageManager.requestPlayerItem(forVideo: asset, options: options, resultHandler: { playerItem, info in
completionBlock(playerItem,info)
})
- return requestId
+ return requestID
}
@discardableResult
@@ -67,17 +67,17 @@ class TLPhotoLibrary {
}
let scale = min(UIScreen.main.scale,2)
let targetSize = CGSize(width: size.width*scale, height: size.height*scale)
- let requestId = self.imageManager.requestImage(for: asset, targetSize: targetSize, contentMode: .aspectFill, options: options) { image, info in
+ let requestID = self.imageManager.requestImage(for: asset, targetSize: targetSize, contentMode: .aspectFill, options: options) { image, info in
let complete = (info?["PHImageResultIsDegradedKey"] as? Bool) == false
if let image = image {
completionBlock(image,complete)
}
}
- return requestId
+ return requestID
}
- func cancelPHImageRequest(requestId: PHImageRequestID) {
- self.imageManager.cancelImageRequest(requestId)
+ func cancelPHImageRequest(requestID: PHImageRequestID) {
+ self.imageManager.cancelImageRequest(requestID)
}
@discardableResult
@@ -91,14 +91,14 @@ class TLPhotoLibrary {
options.progressHandler = { (progress,error,stop,info) in
progressBlock(progress)
}
- let requestId = PHCachingImageManager().requestImageData(for: asset, options: options) { (imageData, dataUTI, orientation, info) in
+ let requestID = PHCachingImageManager().requestImageData(for: asset, options: options) { (imageData, dataUTI, orientation, info) in
if let data = imageData,let _ = info {
completionBlock(UIImage(data: data))
}else{
completionBlock(nil)//error
}
}
- return requestId
+ return requestID
}
@discardableResult
diff --git a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
index d813d38f5..eea7a8fc7 100644
--- a/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
+++ b/Carthage/Checkouts/TLPhotoPicker/TLPhotoPicker/Classes/TLPhotosPickerViewController.swift
@@ -157,8 +157,8 @@ open class TLPhotosPickerViewController: UIViewController {
private var collections = [TLAssetsCollection]()
private var focusedCollection: TLAssetsCollection? = nil
- private var requestIds = [IndexPath:PHImageRequestID]()
- private var playRequestId: (indexPath: IndexPath, requestId: PHImageRequestID)? = nil
+ private var requestIDs = SynchronizedDictionary<IndexPath,PHImageRequestID>()
+ private var playRequestID: (indexPath: IndexPath, requestID: PHImageRequestID)? = nil
private var photoLibrary = TLPhotoLibrary()
private var queue = DispatchQueue(label: "tilltue.photos.pikcker.queue")
private var queueForGroupedBy = DispatchQueue(label: "tilltue.photos.pikcker.queue.for.groupedBy", qos: .utility)
@@ -216,6 +216,8 @@ open class TLPhotosPickerViewController: UIViewController {
case .restricted: fallthrough
case .denied:
handleDeniedAlbumsAuthorization()
+ @unknown default:
+ break
}
}
@@ -276,7 +278,7 @@ extension TLPhotosPickerViewController {
}
private func initItemSize() {
- guard var layout = self.collectionView.collectionViewLayout as? UICollectionViewFlowLayout else {
+ guard let layout = self.collectionView.collectionViewLayout as? UICollectionViewFlowLayout else {
return
}
let count = CGFloat(self.configure.numberOfColumn)
@@ -372,7 +374,7 @@ extension TLPhotosPickerViewController {
}
private func getfocusedIndex() -> Int {
- guard let focused = self.focusedCollection, let result = self.collections.index(where: { $0 == focused }) else { return 0 }
+ guard let focused = self.focusedCollection, let result = self.collections.firstIndex(where: { $0 == focused }) else { return 0 }
return result
}
@@ -401,10 +403,10 @@ extension TLPhotosPickerViewController {
}
private func cancelAllImageAssets() {
- for (_,requestId) in self.requestIds {
- self.photoLibrary.cancelPHImageRequest(requestId: requestId)
+ self.requestIDs.forEach{ (indexPath, requestID) in
+ self.photoLibrary.cancelPHImageRequest(requestID: requestID)
}
- self.requestIds.removeAll()
+ self.requestIDs.removeAll()
}
// User Action
@@ -506,6 +508,8 @@ extension TLPhotosPickerViewController: UIImagePickerControllerDelegate, UINavig
})
case .restricted, .denied:
self.handleDeniedCameraAuthorization()
+ @unknown default:
+ break
}
}
@@ -551,6 +555,7 @@ extension TLPhotosPickerViewController: UIImagePickerControllerDelegate, UINavig
guard let asset = PHAsset.fetchAssets(withLocalIdentifiers: [identifier], options: nil).firstObject else { return }
var result = TLPHAsset(asset: asset)
result.selectedOrder = self.selectedAssets.count + 1
+ result.isSelectedFromCamera = true
self.selectedAssets.append(result)
self.logDelegate?.selectedPhoto(picker: self, at: 1)
}
@@ -566,6 +571,7 @@ extension TLPhotosPickerViewController: UIImagePickerControllerDelegate, UINavig
guard let asset = PHAsset.fetchAssets(withLocalIdentifiers: [identifier], options: nil).firstObject else { return }
var result = TLPHAsset(asset: asset)
result.selectedOrder = self.selectedAssets.count + 1
+ result.isSelectedFromCamera = true
self.selectedAssets.append(result)
self.logDelegate?.selectedPhoto(picker: self, at: 1)
}
@@ -590,12 +596,12 @@ extension TLPhotosPickerViewController {
private func videoCheck() {
func play(asset: (IndexPath,TLPHAsset)) {
- if self.playRequestId?.indexPath != asset.0 {
+ if self.playRequestID?.indexPath != asset.0 {
playVideo(asset: asset.1, indexPath: asset.0)
}
}
guard self.configure.autoPlay else { return }
- guard self.playRequestId == nil else { return }
+ guard self.playRequestID == nil else { return }
let visibleIndexPaths = self.collectionView.indexPathsForVisibleItems.sorted(by: { $0.row < $1.row })
#if swift(>=4.1)
let boundAssets = visibleIndexPaths.compactMap{ indexPath -> (IndexPath,TLPHAsset)? in
@@ -619,8 +625,8 @@ extension TLPhotosPickerViewController {
// MARK: - Video & LivePhotos Control PHLivePhotoViewDelegate
extension TLPhotosPickerViewController: PHLivePhotoViewDelegate {
private func stopPlay() {
- guard let playRequest = self.playRequestId else { return }
- self.playRequestId = nil
+ guard let playRequest = self.playRequestID else { return }
+ self.playRequestID = nil
guard let cell = self.collectionView.cellForItem(at: playRequest.indexPath) as? TLPhotoCollectionViewCell else { return }
cell.stopPlay()
}
@@ -630,7 +636,7 @@ extension TLPhotosPickerViewController: PHLivePhotoViewDelegate {
guard let phAsset = asset.phAsset else { return }
if asset.type == .video {
guard let cell = self.collectionView.cellForItem(at: indexPath) as? TLPhotoCollectionViewCell else { return }
- let requestId = self.photoLibrary.videoAsset(asset: phAsset, completionBlock: { (playerItem, info) in
+ let requestID = self.photoLibrary.videoAsset(asset: phAsset, completionBlock: { (playerItem, info) in
DispatchQueue.main.sync { [weak self, weak cell] in
guard let `self` = self, let cell = cell, cell.player == nil else { return }
let player = AVPlayer(playerItem: playerItem)
@@ -639,19 +645,19 @@ extension TLPhotosPickerViewController: PHLivePhotoViewDelegate {
player.isMuted = self.configure.muteAudio
}
})
- if requestId > 0 {
- self.playRequestId = (indexPath,requestId)
+ if requestID > 0 {
+ self.playRequestID = (indexPath,requestID)
}
}else if asset.type == .livePhoto && self.allowedLivePhotos {
guard let cell = self.collectionView.cellForItem(at: indexPath) as? TLPhotoCollectionViewCell else { return }
- let requestId = self.photoLibrary.livePhotoAsset(asset: phAsset, size: self.thumbnailSize, completionBlock: { [weak cell] (livePhoto,complete) in
+ let requestID = self.photoLibrary.livePhotoAsset(asset: phAsset, size: self.thumbnailSize, completionBlock: { [weak cell] (livePhoto,complete) in
cell?.livePhotoView?.isHidden = false
cell?.livePhotoView?.livePhoto = livePhoto
cell?.livePhotoView?.isMuted = true
cell?.livePhotoView?.startPlayback(with: .hint)
})
- if requestId > 0 {
- self.playRequestId = (indexPath,requestId)
+ if requestID > 0 {
+ self.playRequestID = (indexPath,requestID)
}
}
}
@@ -742,7 +748,7 @@ extension TLPhotosPickerViewController: PHPhotoLibraryChangeObserver {
// MARK: - UICollectionView delegate & datasource
extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDataSourcePrefetching {
private func getSelectedAssets(_ asset: TLPHAsset) -> TLPHAsset? {
- if let index = self.selectedAssets.index(where: { $0.phAsset == asset.phAsset }) {
+ if let index = self.selectedAssets.firstIndex(where: { $0.phAsset == asset.phAsset }) {
return self.selectedAssets[index]
}
return nil
@@ -782,7 +788,7 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
}
guard var asset = collection.getTLAsset(at: indexPath), let phAsset = asset.phAsset else { return }
cell.popScaleAnim()
- if let index = self.selectedAssets.index(where: { $0.phAsset == asset.phAsset }) {
+ if let index = self.selectedAssets.firstIndex(where: { $0.phAsset == asset.phAsset }) {
//deselect
self.logDelegate?.deselectedPhoto(picker: self, at: indexPath.row)
self.selectedAssets.remove(at: index)
@@ -802,7 +808,7 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
cell.selectedAsset = false
cell.stopPlay()
self.orderUpdateCells()
- if self.playRequestId?.indexPath == indexPath {
+ if self.playRequestID?.indexPath == indexPath {
stopPlay()
}
}else {
@@ -824,13 +830,13 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
if let cell = cell as? TLPhotoCollectionViewCell {
cell.endDisplayingCell()
cell.stopPlay()
- if indexPath == self.playRequestId?.indexPath {
- self.playRequestId = nil
+ if indexPath == self.playRequestID?.indexPath {
+ self.playRequestID = nil
}
}
- guard let requestId = self.requestIds[indexPath] else { return }
- self.requestIds.removeValue(forKey: indexPath)
- self.photoLibrary.cancelPHImageRequest(requestId: requestId)
+ guard let requestID = self.requestIDs[indexPath] else { return }
+ self.requestIDs.removeValue(forKey: indexPath)
+ self.photoLibrary.cancelPHImageRequest(requestID: requestID)
}
//Datasource
@@ -873,10 +879,10 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
options.deliveryMode = .opportunistic
options.resizeMode = .exact
options.isNetworkAccessAllowed = true
- let requestId = self.photoLibrary.imageAsset(asset: phAsset, size: self.thumbnailSize, options: options) { [weak self, weak cell] (image,complete) in
+ let requestID = self.photoLibrary.imageAsset(asset: phAsset, size: self.thumbnailSize, options: options) { [weak self, weak cell] (image,complete) in
guard let `self` = self else { return }
DispatchQueue.main.async {
- if self.requestIds[indexPath] != nil {
+ if self.requestIDs[indexPath] != nil {
cell?.imageView?.image = image
cell?.update(with: phAsset)
if self.allowedVideo {
@@ -884,20 +890,20 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
cell?.duration = asset.type == .video ? phAsset.duration : nil
}
if complete {
- self.requestIds.removeValue(forKey: indexPath)
+ self.requestIDs.removeValue(forKey: indexPath)
}
}
}
}
- if requestId > 0 {
- self.requestIds[indexPath] = requestId
+ if requestID > 0 {
+ self.requestIDs[indexPath] = requestID
}
}else {
queue.async { [weak self, weak cell] in
guard let `self` = self else { return }
- let requestId = self.photoLibrary.imageAsset(asset: phAsset, size: self.thumbnailSize, completionBlock: { (image,complete) in
+ let requestID = self.photoLibrary.imageAsset(asset: phAsset, size: self.thumbnailSize, completionBlock: { (image,complete) in
DispatchQueue.main.async {
- if self.requestIds[indexPath] != nil {
+ if self.requestIDs[indexPath] != nil {
cell?.imageView?.image = image
cell?.update(with: phAsset)
if self.allowedVideo {
@@ -905,13 +911,13 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
cell?.duration = asset.type == .video ? phAsset.duration : nil
}
if complete {
- self.requestIds.removeValue(forKey: indexPath)
+ self.requestIDs.removeValue(forKey: indexPath)
}
}
}
})
- if requestId > 0 {
- self.requestIds[indexPath] = requestId
+ if requestID > 0 {
+ self.requestIDs[indexPath] = requestID
}
}
}
@@ -959,9 +965,9 @@ extension TLPhotosPickerViewController: UICollectionViewDelegate,UICollectionVie
open func collectionView(_ collectionView: UICollectionView, cancelPrefetchingForItemsAt indexPaths: [IndexPath]) {
if self.usedPrefetch {
for indexPath in indexPaths {
- guard let requestId = self.requestIds[indexPath] else { continue }
- self.photoLibrary.cancelPHImageRequest(requestId: requestId)
- self.requestIds.removeValue(forKey: indexPath)
+ guard let requestID = self.requestIDs[indexPath] else { continue }
+ self.photoLibrary.cancelPHImageRequest(requestID: requestID)
+ self.requestIDs.removeValue(forKey: indexPath)
}
queue.async { [weak self] in
guard let `self` = self, let collection = self.focusedCollection else { return }
diff --git a/Carthage/Checkouts/realm-cocoa/.jenkins.yml b/Carthage/Checkouts/realm-cocoa/.jenkins.yml
index 75459a205..f3de68052 100644
--- a/Carthage/Checkouts/realm-cocoa/.jenkins.yml
+++ b/Carthage/Checkouts/realm-cocoa/.jenkins.yml
@@ -7,6 +7,7 @@ xcode_version:
- 9.4
- 10.0
- 10.1
+ - 10.2
target:
- osx
- docs
@@ -15,17 +16,21 @@ target:
- ios-swift
- osx-swift
- watchos
- - cocoapods
+ - cocoapods-ios
+ - cocoapods-osx
+ - cocoapods-watchos
- swiftlint
- tvos
- osx-encryption
- osx-object-server
- - ios-device-objc-ios8
+ # These are disabled because the machinen with the devices attached is currently offline
+ # - ios-device-objc-ios8
+ # - ios-device-objc-ios10
+ # - tvos-device
+ # These are disabled because they were very unreliable on CI
# - ios-device-swift-ios8
- - ios-device-objc-ios10
# - ios-device-swift-ios10
- - tvos-device
configuration:
- Debug
- Release
@@ -33,30 +38,33 @@ configuration:
# Combinations have to be excluded in a way that's hard to read.
# This table shows which jobs will run:
-# +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-# | Configuration Matrix | osx | docs | ios-static | ios-dynamic | ios-swift | osx-swift | watchos | cocoapods | swiftlint | tvos | osx-encryption | osx-object-server | ios-device-objc-ios8 | ios-device-swift-ios8 | ios-device-objc-ios10 | ios-device-swift-ios10 | tvos-device |
-# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | --------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
-# | 9.2 | Debug | X | | X | | | | | | | | | | | | | | |
-# | 9.2 | Release | X | | X | X | X | X | X | X | | X | X | X | X | | X | | |
-# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | --------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
-# | 9.3 | Debug | X | | | | | | | | | | | | | | | | |
-# | 9.3 | Release | X | | X | X | X | X | X | X | | X | | | | | | | |
-# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | --------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
-# | 9.4 | Debug | X | | | | | | | | | | | | | | | | |
-# | 9.4 | Release | X | | X | X | X | X | X | X | | X | | | | | | | |
-# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | --------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
-# | 10.0 | Debug | X | | | | | | | | | | | | | | | | |
-# | 10.0 | Release | X | | X | X | X | X | X | X | | X | | | | | | | |
-# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | --------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
-# | 10.1 | Debug | X | | | X | X | X | X | | | X | | | | | | | |
-# | 10.1 | Release | X | X | X | X | X | X | X | X | X | X | X | X | | | X | | X |
-# +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+# +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+# | Configuration Matrix | osx | docs | ios-static | ios-dynamic | ios-swift | osx-swift | watchos | cocoapods-ios | cocoapods-osx | cocoapods-watchos | swiftlint | tvos | osx-encryption | osx-object-server | ios-device-objc-ios8 | ios-device-swift-ios8 | ios-device-objc-ios10 | ios-device-swift-ios10 | tvos-device |
+# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | ------------- | ------------- | ----------------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
+# | 9.2 | Debug | X | | X | | | | | | | | | | | | | | | | |
+# | 9.2 | Release | X | | X | X | X | X | X | X | X | X | | X | X | X | X | | X | | |
+# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | ------------- | ------------- | ----------------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
+# | 9.3 | Debug | X | | | | | | | | | | | | | | | | | | |
+# | 9.3 | Release | X | | X | X | X | X | X | X | X | X | | X | | | | | | | |
+# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | ------------- | ------------- | ----------------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
+# | 9.4 | Debug | X | | | | | | | | | | | | | | | | | | |
+# | 9.4 | Release | X | | X | X | X | X | X | X | X | X | | X | | | | | | | |
+# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | ------------- | ------------- | ----------------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
+# | 10.0 | Debug | X | | | | | | | | | | | | | | | | | | |
+# | 10.0 | Release | X | | X | X | X | X | X | X | X | X | | X | | | | | | | |
+# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | ------------- | ------------- | ----------------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
+# | 10.1 | Debug | X | | | | | | | | | | | | | | | | | | |
+# | 10.1 | Release | X | | X | X | X | X | X | X | X | X | | X | | | | | | | |
+# | -------------------- | --- | ---- | ---------- | ----------- | --------- | --------- | ------- | ------------- | ------------- | ----------------- | --------- | ---- | -------------- | ----------------- | -------------------- | --------------------- | --------------------- | ---------------------- | ----------- |
+# | 10.2 | Debug | X | | | X | X | X | X | | | | | X | | | | | | | |
+# | 10.2 | Release | X | X | X | X | X | X | X | X | X | X | X | X | X | X | | | X | | X |
+# +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
exclude:
################
# docs
################
- # Just run on 10.0 Release
+ # Just run on 10.2 Release
- xcode_version: 9.2
target: docs
- xcode_version: 9.3
@@ -65,13 +73,15 @@ exclude:
target: docs
- xcode_version: 10.0
target: docs
+ - xcode_version: 10.1
+ target: docs
- target: docs
configuration: Debug
################
# ios-static
################
- # Skip on 9.3/9.4/10.0 Debug
+ # Skip Debug on everything but 9.2
- xcode_version: 9.3
target: ios-static
configuration: Debug
@@ -84,11 +94,14 @@ exclude:
- xcode_version: 10.1
target: ios-static
configuration: Debug
+ - xcode_version: 10.2
+ target: ios-static
+ configuration: Debug
################
# ios-dynamic
################
- # Skip on 9.2/9.3/0.2 Debug
+ # Skip Debug on everything but 10.2
- xcode_version: 9.2
target: ios-dynamic
configuration: Debug
@@ -101,11 +114,14 @@ exclude:
- xcode_version: 10.0
target: ios-dynamic
configuration: Debug
+ - xcode_version: 10.1
+ target: ios-dynamic
+ configuration: Debug
################
# ios-swift
################
- # Skip 9.2/9.3/9.4/10.0 Debug
+ # Skip Debug on everything but 10.2
- xcode_version: 9.2
target: ios-swift
configuration: Debug
@@ -118,11 +134,14 @@ exclude:
- xcode_version: 10.0
target: ios-swift
configuration: Debug
+ - xcode_version: 10.1
+ target: ios-swift
+ configuration: Debug
################
# osx-swift
################
- # Skip 9.2/9.3/9.4/10.0 Debug
+ # Skip Debug on everything but 10.2
- xcode_version: 9.2
target: osx-swift
configuration: Debug
@@ -135,11 +154,14 @@ exclude:
- xcode_version: 10.0
target: osx-swift
configuration: Debug
+ - xcode_version: 10.1
+ target: osx-swift
+ configuration: Debug
################
# watchos
################
- # Skip 9.2/9.3/9.4/10.0 Debug
+ # Skip Debug on everything but 10.2
- xcode_version: 9.2
target: watchos
configuration: Debug
@@ -152,18 +174,25 @@ exclude:
- xcode_version: 10.0
target: watchos
configuration: Debug
+ - xcode_version: 10.1
+ target: watchos
+ configuration: Debug
################
# cocoapods
################
# Skip Debug
- - target: cocoapods
+ - target: cocoapods-ios
+ configuration: Debug
+ - target: cocoapods-osx
+ configuration: Debug
+ - target: cocoapods-watchos
configuration: Debug
################
# swiftlint
################
- # Just run on 10.1 Release
+ # Just run on 10.2 Release
- xcode_version: 9.2
target: swiftlint
- xcode_version: 9.3
@@ -172,13 +201,15 @@ exclude:
target: swiftlint
- xcode_version: 10.0
target: swiftlint
+ - xcode_version: 10.1
+ target: swiftlint
- target: swiftlint
configuration: Debug
################
# tvos
################
- # Skip 9.2/9.3/9.4/10.0 Debug
+ # Skip Debug on everything but 10.2
- xcode_version: 9.2
target: tvos
configuration: Debug
@@ -191,29 +222,36 @@ exclude:
- xcode_version: 10.0
target: tvos
configuration: Debug
+ - xcode_version: 10.1
+ target: tvos
+ configuration: Debug
################
# osx-encryption
################
- # Just run on 9.2/10.1 Release
+ # Just run on 9.2/10.2 Release
- xcode_version: 9.3
target: osx-encryption
- xcode_version: 9.4
target: osx-encryption
- xcode_version: 10.0
target: osx-encryption
+ - xcode_version: 10.1
+ target: osx-encryption
- target: osx-encryption
configuration: Debug
################
# osx-object-server
################
- # Just run on 9.2/10.1 Release
+ # Just run on 9.2/10.2 Release
- xcode_version: 9.3
target: osx-object-server
- xcode_version: 9.4
target: osx-object-server
- - xcode_version: 10.01
+ - xcode_version: 10.0
+ target: osx-object-server
+ - xcode_version: 10.1
target: osx-object-server
- target: osx-object-server
configuration: Debug
@@ -221,22 +259,26 @@ exclude:
################
# ios-device-objc-ios8
################
- # Just run on 9.2/10.1 Release
+ # Just run on 9.2/10.2 Release
- xcode_version: 9.3
target: ios-device-objc-ios8
- xcode_version: 10.0
target: ios-device-objc-ios8
+ - xcode_version: 10.1
+ target: ios-device-objc-ios8
- target: ios-device-objc-ios8
configuration: Debug
################
# ios-device-swift-ios8
################
- # Just run on 9.2/10.1 Release
+ # Just run on 9.2/10.2 Release
- xcode_version: 9.3
target: ios-device-swift-ios8
- xcode_version: 9.4
target: ios-device-swift-ios8
+ - xcode_version: 10.0
+ target: ios-device-swift-ios8
- xcode_version: 10.1
target: ios-device-swift-ios8
- target: ios-device-swift-ios8
@@ -245,24 +287,28 @@ exclude:
################
# ios-device-objc-ios10
################
- # Just run on 9.2/10.1 Release
+ # Just run on 9.2/10.2 Release
- xcode_version: 9.3
target: ios-device-objc-ios10
- xcode_version: 9.4
target: ios-device-objc-ios10
- xcode_version: 10.0
target: ios-device-objc-ios10
+ - xcode_version: 10.1
+ target: ios-device-objc-ios10
- target: ios-device-objc-ios10
configuration: Debug
################
# ios-device-swift-ios10
################
- # Just run on 9.2/10.1 Release
+ # Just run on 9.2/10.2 Release
- xcode_version: 9.3
target: ios-device-swift-ios10
- xcode_version: 9.4
target: ios-device-swift-ios10
+ - xcode_version: 10.0
+ target: ios-device-swift-ios10
- xcode_version: 10.1
target: ios-device-swift-ios10
- target: ios-device-swift-ios10
@@ -271,7 +317,7 @@ exclude:
################
# tvos-device
################
- # Just run on 10.1 Release
+ # Just run on 10.2 Release
- xcode_version: 9.2
target: tvos-device
- xcode_version: 9.3
@@ -280,5 +326,7 @@ exclude:
target: tvos-device
- xcode_version: 10.0
target: tvos-device
+ - xcode_version: 10.1
+ target: tvos-device
- target: tvos-device
configuration: Debug
diff --git a/Carthage/Checkouts/realm-cocoa/.swiftlint.yml b/Carthage/Checkouts/realm-cocoa/.swiftlint.yml
index ff6a55a52..a842626b3 100644
--- a/Carthage/Checkouts/realm-cocoa/.swiftlint.yml
+++ b/Carthage/Checkouts/realm-cocoa/.swiftlint.yml
@@ -19,6 +19,10 @@ identifier_name:
- to
disabled_rules:
- block_based_kvo
+ # SwiftLint considers 'Realm' and 'Realm.Private' to be duplicate imports
+ # because we're using submodules in an unsual way, and normally the parent
+ # module re-exports all of its children.
+ - duplicate_imports
- file_length
- force_cast
- force_try
diff --git a/Carthage/Checkouts/realm-cocoa/CHANGELOG.md b/Carthage/Checkouts/realm-cocoa/CHANGELOG.md
index 72ec853c7..055d6351d 100644
--- a/Carthage/Checkouts/realm-cocoa/CHANGELOG.md
+++ b/Carthage/Checkouts/realm-cocoa/CHANGELOG.md
@@ -1,3 +1,52 @@
+3.14.1 Release notes (2019-04-04)
+=============================================================
+
+### Fixed
+
+* Fix "Cannot find interface declaration for 'RealmSwiftObject', superclass of
+ 'MyRealmObjectClass'" errors when building for a simulator with Xcode 10.2
+ with "Install Objective-C Compatibility Header" enabled.
+
+### Compatibility
+
+* File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
+* Realm Object Server: 3.11.0 or later.
+
+3.14.0 Release notes (2019-03-27)
+=============================================================
+
+### Enhancements
+
+* Reduce memory usage when committing write transactions.
+* Improve performance of compacting encrypted Realm files.
+ ([PR #3221](https://github.com/realm/realm-core/pull/3221)).
+* Add a Xcode 10.2 build to the release package.
+
+### Fixed
+
+* Fix a memory leak whenever Realm makes a HTTP(s) request to the Realm Object
+ Server (Issue [#6058](https://github.com/realm/realm-cocoa/issues/6058), since 3.8.0).
+* Fix an assertion failure when creating an object in a synchronized Realm
+ after creating an object with a null int primary key in the same write
+ transaction.
+ ([PR #3227](https://github.com/realm/realm-core/pull/3227)).
+* Fix some new warnings when building with Xcode 10.2 beta.
+* Properly clean up sync sessions when the last Realm object using the session
+ is deallocated while the session is explicitly suspended (since 3.9.0).
+
+### Compatibility
+
+* File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
+* Realm Object Server: 3.11.0 or later.
+* Carthage release for Swift is built with Xcode 10.2.
+
+### Internal
+
+* Throw an exception rather than crashing with an assertion failure in more
+ cases when opening invalid Realm files.
+* Upgrade to REALM_CORE_VERSION=5.14.0
+* Upgrade to REALM_SYNC_VERSION=3.15.1
+
3.13.1 Release notes (2019-01-03)
=============================================================
diff --git a/Carthage/Checkouts/realm-cocoa/Configuration/Base.xcconfig b/Carthage/Checkouts/realm-cocoa/Configuration/Base.xcconfig
index bc6828c35..823afb1d9 100644
--- a/Carthage/Checkouts/realm-cocoa/Configuration/Base.xcconfig
+++ b/Carthage/Checkouts/realm-cocoa/Configuration/Base.xcconfig
@@ -58,4 +58,4 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
TVOS_DEPLOYMENT_TARGET = 9.0;
-SWIFT_VERSION = 3.0;
+SWIFT_VERSION = 4.0;
diff --git a/Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability b/Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability
index d1748dec5..4d93c2f85 100644
--- a/Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability
+++ b/Carthage/Checkouts/realm-cocoa/Jenkinsfile.releasability
@@ -1,8 +1,8 @@
-swiftVersions = ['3.2.3', '3.3', '3.3.2', '3.4', '3.4.1', '4.0.3', '4.1', '4.1.2', '4.2', '4.2.1']
+xcodeVersions = ['9.2', '9.3', '9.4', '10.0', '10.1', '10.2']
platforms = ['osx', 'ios', 'watchos', 'tvos']
platformNames = ['osx': 'macOS', 'ios': 'iOS', 'watchos': 'watchOS', 'tvos': 'tvOS']
-carthageXcodeVersion = '10.1'
-carthageSwiftVersion = '3.4.1'
+carthageXcodeVersion = '10.2'
+docsSwiftVersion = '5.0'
def installationTest(platform, test, language) {
return {
@@ -24,8 +24,6 @@ def installationTest(platform, test, language) {
find . -name 'realm-${language}-*' -print0 | xargs -J% mv % realm-${language}-latest
fi
- sed -i '' 's/swift-3.[0-9.]*/swift-${carthageSwiftVersion}/g' osx/swift/DynamicExample/DynamicExample.xcodeproj/project.pbxproj
- sed -i '' 's/swift-3.[0-9.]*/swift-${carthageSwiftVersion}/g' ios/swift/DynamicExample/DynamicExample.xcodeproj/project.pbxproj
export REALM_XCODE_VERSION=${carthageXcodeVersion}
./build.sh test-${platform}-${language}-${test}
"""
@@ -74,7 +72,7 @@ def doBuild() {
deleteDir()
unstash 'source'
sh """
- export REALM_SWIFT_VERSION=${swiftVersions.last()}
+ export REALM_SWIFT_VERSION=${docsSwiftVersion}
./scripts/reset-simulators.sh
./build.sh docs
cd docs
@@ -127,16 +125,16 @@ def doBuild() {
for (def p in platforms) {
def platform = p
def platformName = platformNames[platform]
- for (def v in swiftVersions) {
- def swiftVersion = v
- parallelBuilds["${platformName} Swift ${swiftVersion}"] = {
+ for (def v in xcodeVersions) {
+ def xcodeVersion = v
+ parallelBuilds["${platformName} Swift ${xcodeVersion}"] = {
node('osx') {
deleteDir()
unstash 'source'
- sh "XCMODE=xcpretty ./build.sh package-${platform}-swift-${swiftVersion}"
+ sh "XCMODE=xcpretty ./build.sh package-${platform}-swift-${xcodeVersion}"
dir("build/${platform}") {
- stash includes: "realm-swift-framework-${platform}-swift-${swiftVersion}.zip",
- name: "${platform}-swift-${swiftVersion}"
+ stash includes: "realm-swift-framework-${platform}-swift-${xcodeVersion}.zip",
+ name: "${platform}-swift-${xcodeVersion}"
}
}
}
@@ -170,8 +168,8 @@ def doBuild() {
deleteDir()
for (def platform in platforms) {
- for (def swiftVersion in swiftVersions) {
- unstash "${platform}-swift-${swiftVersion}"
+ for (def xcodeVersion in xcodeVersions) {
+ unstash "${platform}-swift-${xcodeVersion}"
}
}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMObjectServerTests.mm b/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMObjectServerTests.mm
index 2eac6fa89..17e505607 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMObjectServerTests.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMObjectServerTests.mm
@@ -1518,15 +1518,9 @@
return 0;
};
- NSUInteger sizeBefore = fileSize(c.pathOnDisk);
- @autoreleasepool {
- // We have partial transaction logs but no data
- XCTAssertGreaterThan(sizeBefore, 0U);
- XCTAssertTrue([[RLMRealm realmWithConfiguration:c error:nil] isEmpty]);
- }
XCTAssertNil(RLMGetAnyCachedRealmForPath(c.pathOnDisk.UTF8String));
[self waitForExpectationsWithTimeout:10.0 handler:nil];
- XCTAssertGreaterThan(fileSize(c.pathOnDisk), sizeBefore);
+ XCTAssertGreaterThan(fileSize(c.pathOnDisk), 0U);
XCTAssertNil(RLMGetAnyCachedRealmForPath(c.pathOnDisk.UTF8String));
} else {
RLMRealm *realm = [self openRealmForURL:url user:user];
@@ -1590,45 +1584,6 @@
CHECK_COUNT(NUMBER_OF_BIG_OBJECTS, HugeSyncObject, realm);
}
-- (void)testDownloadWhileOpeningRealm {
- const NSInteger NUMBER_OF_BIG_OBJECTS = 2;
- NSURL *url = REALM_URL();
- // Log in the user.
- RLMSyncUser *user = [self logInUserForCredentials:[RLMObjectServerTests basicCredentialsWithName:NSStringFromSelector(_cmd)
- register:self.isParent]
- server:[RLMObjectServerTests authServerURL]];
- if (self.isParent) {
- // Wait for the child process to upload everything.
- RLMRunChildAndWait();
- XCTestExpectation *ex = [self expectationWithDescription:@"download-realm"];
- RLMRealmConfiguration *c = [user configurationWithURL:url fullSynchronization:true];
- XCTAssertFalse([[NSFileManager defaultManager] fileExistsAtPath:c.pathOnDisk isDirectory:nil]);
- [RLMRealm asyncOpenWithConfiguration:c
- callbackQueue:dispatch_get_main_queue()
- callback:^(RLMRealm * _Nullable realm, NSError * _Nullable error) {
- XCTAssertNil(error);
- CHECK_COUNT(NUMBER_OF_BIG_OBJECTS, HugeSyncObject, realm);
- [ex fulfill];
- }];
- RLMRealm *realm = [RLMRealm realmWithConfiguration:c error:nil];
- CHECK_COUNT(0, HugeSyncObject, realm);
- XCTAssertNotNil(RLMGetAnyCachedRealmForPath(c.pathOnDisk.UTF8String));
- [self waitForExpectationsWithTimeout:10.0 handler:nil];
- CHECK_COUNT(NUMBER_OF_BIG_OBJECTS, HugeSyncObject, realm);
- XCTAssertNotNil(RLMGetAnyCachedRealmForPath(c.pathOnDisk.UTF8String));
- } else {
- RLMRealm *realm = [self openRealmForURL:url user:user];
- // Write lots of data to the Realm, then wait for it to be uploaded.
- [realm beginWriteTransaction];
- for (NSInteger i=0; i<NUMBER_OF_BIG_OBJECTS; i++) {
- [realm addObject:[HugeSyncObject object]];
- }
- [realm commitWriteTransaction];
- [self waitForUploadsForRealm:realm];
- CHECK_COUNT(NUMBER_OF_BIG_OBJECTS, HugeSyncObject, realm);
- }
-}
-
- (void)testDownloadCancelsOnAuthError {
RLMSyncUser *user = [self logInUserForCredentials:[RLMObjectServerTests basicCredentialsWithName:NSStringFromSelector(_cmd)
register:self.isParent]
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.mm b/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.mm
index 82a172546..f78648425 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/RLMSyncTestCase.mm
@@ -82,7 +82,7 @@ static NSString *nodePath() {
const NSInteger fakeDataSize = 1000000;
HugeSyncObject *object = [[self alloc] init];
char fakeData[fakeDataSize];
- memset(fakeData, sizeof(fakeData), 16);
+ memset(fakeData, 16, sizeof(fakeData));
object.dataProp = [NSData dataWithBytes:fakeData length:sizeof(fakeData)];
return object;
}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift b/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift
index 084f19e4e..f506072de 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectServerTests/SwiftObjectServerTests.swift
@@ -235,26 +235,24 @@ class SwiftObjectServerTests: SwiftSyncTestCase {
func testStreamingUploadNotifier() {
let bigObjectCount = 2
do {
- var callCount = 0
var transferred = 0
var transferrable = 0
let user = try synchronouslyLogInUser(for: basicCredentials(register: isParent), server: authURL)
let realm = try synchronouslyOpenRealm(url: realmURL, user: user)
let session = realm.syncSession
XCTAssertNotNil(session)
- let ex = expectation(description: "streaming-uploads-expectation")
- var hasBeenFulfilled = false
+ var ex = expectation(description: "initial upload")
let token = session!.addProgressNotification(for: .upload, mode: .reportIndefinitely) { p in
- callCount += 1
XCTAssert(p.transferredBytes >= transferred)
XCTAssert(p.transferrableBytes >= transferrable)
transferred = p.transferredBytes
transferrable = p.transferrableBytes
- if p.transferredBytes > 0 && p.isTransferComplete && !hasBeenFulfilled {
+ if p.transferredBytes > 0 && p.isTransferComplete {
ex.fulfill()
- hasBeenFulfilled = true
}
}
+ waitForExpectations(timeout: 10.0, handler: nil)
+ ex = expectation(description: "write transaction upload")
try realm.write {
for _ in 0..<bigObjectCount {
realm.add(SwiftHugeSyncObject())
@@ -262,7 +260,6 @@ class SwiftObjectServerTests: SwiftSyncTestCase {
}
waitForExpectations(timeout: 10.0, handler: nil)
token!.invalidate()
- XCTAssert(callCount > 1)
XCTAssert(transferred >= transferrable)
} catch {
XCTFail("Got an error: \(error) (process: \(isParent ? "parent" : "child"))")
@@ -293,15 +290,9 @@ class SwiftObjectServerTests: SwiftSyncTestCase {
}
return 0
}
- let sizeBefore = fileSize(path: pathOnDisk)
- autoreleasepool {
- // We have partial transaction logs but no data
- XCTAssertGreaterThan(sizeBefore, 0)
- XCTAssert(try! Realm(configuration: config).isEmpty)
- }
XCTAssertFalse(RLMHasCachedRealmForPath(pathOnDisk))
waitForExpectations(timeout: 10.0, handler: nil)
- XCTAssertGreaterThan(fileSize(path: pathOnDisk), sizeBefore)
+ XCTAssertGreaterThan(fileSize(path: pathOnDisk), 0)
XCTAssertFalse(RLMHasCachedRealmForPath(pathOnDisk))
} else {
let realm = try synchronouslyOpenRealm(url: realmURL, user: user)
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMake/RealmCore.cmake b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMake/RealmCore.cmake
index 2d24ddf9d..28ca6fe68 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMake/RealmCore.cmake
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMake/RealmCore.cmake
@@ -260,8 +260,8 @@ macro(build_realm_core)
set(core_release_binary_dir "${SOURCE_DIR}/build.release")
set(core_library_debug "${core_debug_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm-dbg${CMAKE_STATIC_LIBRARY_SUFFIX}")
set(core_library_release "${core_release_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm${CMAKE_STATIC_LIBRARY_SUFFIX}")
- set(core_parser_library_debug "${core_debug_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm-parser-dbg${CMAKE_STATIC_LIBRARY_SUFFIX}")
- set(core_parser_library_release "${core_release_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm-parser${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ set(core_parser_library_debug "${core_debug_binary_dir}/src/realm/parser/${CMAKE_STATIC_LIBRARY_PREFIX}realm-parser-dbg${CMAKE_STATIC_LIBRARY_SUFFIX}")
+ set(core_parser_library_release "${core_release_binary_dir}/src/realm/parser/${CMAKE_STATIC_LIBRARY_PREFIX}realm-parser${CMAKE_STATIC_LIBRARY_SUFFIX}")
ExternalProject_Add_Step(realm-core ensure-libraries
DEPENDEES build
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMakeLists.txt b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMakeLists.txt
index ea0b5d4c4..dd6817a2a 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMakeLists.txt
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/CMakeLists.txt
@@ -30,6 +30,11 @@ if(REALM_CORE_PREFIX AND REALM_ENABLE_SYNC AND NOT REALM_SYNC_PREFIX)
message(FATAL_ERROR "REALM_SYNC_PREFIX must be set when specifying REALM_CORE_PREFIX when REALM_ENABLE_SYNC is set.")
endif()
+set(REALM_ENABLE_SERVER OFF CACHE BOOL "Enable the server-only functionality.")
+if(REALM_ENABLE_SERVER AND NOT REALM_ENABLE_SYNC)
+ message(FATAL_ERROR "REALM_ENABLE_SERVER requires REALM_ENABLE_SYNC.")
+endif()
+
include(RealmCore)
use_realm_core("${REALM_ENABLE_SYNC}" "${REALM_CORE_PREFIX}" "${REALM_SYNC_PREFIX}")
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/dependencies.list b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/dependencies.list
index 6c98183ea..406200f2a 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/dependencies.list
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/dependencies.list
@@ -1,4 +1,4 @@
-REALM_CORE_VERSION=5.12.0
-REALM_SYNC_VERSION=3.12.10
+REALM_CORE_VERSION=5.12.7
+REALM_SYNC_VERSION=3.14.12
ANDROID_OPENSSL_VERSION=1.0.2k
REALM_CORE_PACKAGING=2
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/CMakeLists.txt b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/CMakeLists.txt
index 3b619cf90..52009ee29 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/CMakeLists.txt
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/CMakeLists.txt
@@ -64,14 +64,16 @@ set(HEADERS
util/aligned_union.hpp
util/atomic_shared_ptr.hpp
+ util/event_loop_dispatcher.hpp
util/event_loop_signal.hpp
+ util/fifo.hpp
util/tagged_bool.hpp
util/uuid.hpp)
if(APPLE)
- list(APPEND SOURCES impl/apple/external_commit_helper.cpp impl/apple/keychain_helper.cpp)
+ list(APPEND SOURCES impl/apple/external_commit_helper.cpp impl/apple/keychain_helper.cpp util/fifo.cpp)
elseif(REALM_HAVE_EPOLL)
- list(APPEND SOURCES impl/epoll/external_commit_helper.cpp)
+ list(APPEND SOURCES impl/epoll/external_commit_helper.cpp util/fifo.cpp)
elseif(CMAKE_SYSTEM_NAME MATCHES "^Windows")
list(APPEND SOURCES impl/windows/external_commit_helper.cpp)
else()
@@ -119,6 +121,18 @@ if(REALM_ENABLE_SYNC)
list(APPEND INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
endif()
+if(REALM_ENABLE_SERVER)
+ list(APPEND HEADERS
+ server/adapter.hpp
+ server/admin_realm.hpp
+ server/global_notifier.hpp)
+ list(APPEND SOURCES
+ server/adapter.cpp
+ server/admin_realm.cpp
+ server/global_notifier.cpp)
+ list(APPEND INCLUDE_DIRS ../external/json)
+endif()
+
add_library(realm-object-store STATIC ${SOURCES} ${HEADERS})
set_target_properties(realm-object-store PROPERTIES POSITION_INDEPENDENT_CODE 1)
target_compile_definitions(realm-object-store PRIVATE ${PLATFORM_DEFINES})
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.cpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.cpp
index 60f7a660a..6b166c128 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.cpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.cpp
@@ -17,8 +17,10 @@
////////////////////////////////////////////////////////////////////////////
#include "impl/external_commit_helper.hpp"
-
#include "impl/realm_coordinator.hpp"
+#include "util/fifo.hpp"
+
+#include <realm/group_shared_options.hpp>
#include <asl.h>
#include <assert.h>
@@ -53,6 +55,7 @@ void notify_fd(int fd, int read_fd)
read(read_fd, buff, sizeof buff);
}
}
+
} // anonymous namespace
void ExternalCommitHelper::FdHolder::close()
@@ -95,27 +98,38 @@ ExternalCommitHelper::ExternalCommitHelper(RealmCoordinator& parent)
}
#if !TARGET_OS_TV
- auto path = parent.get_path() + ".note";
- // Create and open the named pipe
- int ret = mkfifo(path.c_str(), 0600);
- if (ret == -1) {
- int err = errno;
- if (err == ENOTSUP) {
- // Filesystem doesn't support named pipes, so try putting it in tmp instead
- // Hash collisions are okay here because they just result in doing
- // extra work, as opposed to correctness problems
- std::ostringstream ss;
- ss << getenv("TMPDIR");
- ss << "realm_" << std::hash<std::string>()(path) << ".note";
- path = ss.str();
- ret = mkfifo(path.c_str(), 0600);
- err = errno;
- }
- // the fifo already existing isn't an error
- if (ret == -1 && err != EEXIST) {
- throw std::system_error(err, std::system_category());
- }
+
+ // Object Store needs to create a named pipe in order to coordinate notifications.
+ // This can be a problem on some file systems (e.g. FAT32) or due to security policies in SELinux. Most commonly
+ // it is a problem when saving Realms on external storage: https://stackoverflow.com/questions/2740321/how-to-create-named-pipe-mkfifo-in-android
+ //
+ // For this reason we attempt to create this file in a temporary location known to be safe to write these files.
+ //
+ // In order of priority we attempt to write the file in the following locations:
+ // 1) Next to the Realm file itself
+ // 2) A location defined by `Realm::Config::fifo_files_fallback_path`
+ // 3) A location defined by `SharedGroupOptions::set_sys_tmp_dir()`
+ //
+ // Core has a similar policy for its named pipes.
+ //
+ // Also see https://github.com/realm/realm-java/issues/3140
+ // Note that hash collisions are okay here because they just result in doing extra work instead of resulting
+ // in correctness problems.
+
+ std::string path;
+ std::string temp_dir = util::normalize_dir(parent.get_config().fifo_files_fallback_path);
+ std::string sys_temp_dir = util::normalize_dir(SharedGroupOptions::get_sys_tmp_dir());
+
+ path = parent.get_path() + ".note";
+ bool fifo_created = util::try_create_fifo(path);
+ if (!fifo_created && !temp_dir.empty()) {
+ path = util::format("%1realm_%2.note", temp_dir, std::hash<std::string>()(parent.get_path()));
+ fifo_created = util::try_create_fifo(path);
+ }
+ if (!fifo_created && !sys_temp_dir.empty()) {
+ path = util::format("%1realm_%2.note", sys_temp_dir, std::hash<std::string>()(parent.get_path()));
+ util::create_fifo(path);
}
m_notify_fd = open(path.c_str(), O_RDWR);
@@ -125,7 +139,7 @@ ExternalCommitHelper::ExternalCommitHelper(RealmCoordinator& parent)
// Make writing to the pipe return -1 when the pipe's buffer is full
// rather than blocking until there's space available
- ret = fcntl(m_notify_fd, F_SETFL, O_NONBLOCK);
+ int ret = fcntl(m_notify_fd, F_SETFL, O_NONBLOCK);
if (ret == -1) {
throw std::system_error(errno, std::system_category());
}
@@ -154,7 +168,7 @@ ExternalCommitHelper::ExternalCommitHelper(RealmCoordinator& parent)
m_shutdown_read_fd = shutdown_pipe[0];
m_shutdown_write_fd = shutdown_pipe[1];
- m_thread = std::async(std::launch::async, [=] {
+ m_thread = std::thread([=] {
try {
listen();
}
@@ -177,7 +191,7 @@ ExternalCommitHelper::ExternalCommitHelper(RealmCoordinator& parent)
ExternalCommitHelper::~ExternalCommitHelper()
{
notify_fd(m_shutdown_write_fd, m_shutdown_read_fd);
- m_thread.wait(); // Wait for the thread to exit
+ m_thread.join(); // Wait for the thread to exit
}
void ExternalCommitHelper::listen()
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.hpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.hpp
index c87d8b242..1fc99ed7a 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.hpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/apple/external_commit_helper.hpp
@@ -16,7 +16,7 @@
//
////////////////////////////////////////////////////////////////////////////
-#include <future>
+#include <thread>
namespace realm {
class Realm;
@@ -59,7 +59,7 @@ private:
RealmCoordinator& m_parent;
// The listener thread
- std::future<void> m_thread;
+ std::thread m_thread;
// Pipe which is waited on for changes and written to when there is a new
// commit to notify others of. When using a named pipe m_notify_fd is
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/epoll/external_commit_helper.cpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/epoll/external_commit_helper.cpp
index 1a580181b..fa65c3e7d 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/epoll/external_commit_helper.cpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/epoll/external_commit_helper.cpp
@@ -18,6 +18,7 @@
#include "impl/external_commit_helper.hpp"
#include "impl/realm_coordinator.hpp"
+#include "util/fifo.hpp"
#include <realm/util/assert.hpp>
#include <realm/group_shared_options.hpp>
@@ -29,8 +30,6 @@
#include <stdlib.h>
#include <sys/epoll.h>
#include <sys/time.h>
-#include <sys/stat.h>
-#include <system_error>
#include <unistd.h>
#ifdef __ANDROID__
@@ -115,36 +114,35 @@ ExternalCommitHelper::ExternalCommitHelper(RealmCoordinator& parent)
: m_parent(parent)
{
std::string path;
- std::string temporary_dir = SharedGroupOptions::get_sys_tmp_dir();
- if (temporary_dir.empty()) {
- path = parent.get_path() + ".note";
- } else {
- // The fifo is always created in the temporary directory if it is provided.
- // See https://github.com/realm/realm-java/issues/3140
- // We create .note file on the temp directory always for simplicity no matter where the Realm file is.
- // Hash collisions are okay here because they just result in doing extra work.
- path = util::format("%1%2_realm.note", temporary_dir, std::hash<std::string>()(parent.get_path()));
+ std::string temp_dir = util::normalize_dir(parent.get_config().fifo_files_fallback_path);
+ std::string sys_temp_dir = util::normalize_dir(SharedGroupOptions::get_sys_tmp_dir());
+
+ // Object Store needs to create a named pipe in order to coordinate notifications.
+ // This can be a problem on some file systems (e.g. FAT32) or due to security policies in SELinux. Most commonly
+ // it is a problem when saving Realms on external storage: https://stackoverflow.com/questions/2740321/how-to-create-named-pipe-mkfifo-in-android
+ //
+ // For this reason we attempt to create this file in a temporary location known to be safe to write these files.
+ //
+ // In order of priority we attempt to write the file in the following locations:
+ // 1) Next to the Realm file itself
+ // 2) A location defined by `Realm::Config::fifo_files_fallback_path`
+ // 3) A location defined by `SharedGroupOptions::set_sys_tmp_dir()`
+ //
+ // Core has a similar policy for its named pipes.
+ //
+ // Also see https://github.com/realm/realm-java/issues/3140
+ // Note that hash collisions are okay here because they just result in doing extra work instead of resulting
+ // in correctness problems.
+
+ path = parent.get_path() + ".note";
+ bool fifo_created = util::try_create_fifo(path);
+ if (!fifo_created && !temp_dir.empty()) {
+ path = util::format("%1realm_%2.note", temp_dir, std::hash<std::string>()(parent.get_path()));
+ fifo_created = util::try_create_fifo(path);
}
-
- // Create and open the named pipe
- int ret = mkfifo(path.c_str(), 0600);
- if (ret == -1) {
- int err = errno;
- // the fifo already existing isn't an error
- if (err != EEXIST) {
- // Workaround for a mkfifo bug on Blackberry devices:
- // When the fifo already exists, mkfifo fails with error ENOSYS which is not correct.
- // In this case, we use stat to check if the path exists and it is a fifo.
- struct stat stat_buf;
- if (err == ENOSYS && stat(path.c_str(), &stat_buf) == 0) {
- if ((stat_buf.st_mode & S_IFMT) != S_IFIFO) {
- throw std::runtime_error(path + " exists and it is not a fifo.");
- }
- }
- else {
- throw std::system_error(err, std::system_category());
- }
- }
+ if (!fifo_created && !sys_temp_dir.empty()) {
+ path = util::format("%1realm_%2.note", sys_temp_dir, std::hash<std::string>()(parent.get_path()));
+ util::create_fifo(path);
}
m_notify_fd = open(path.c_str(), O_RDWR);
@@ -154,7 +152,7 @@ ExternalCommitHelper::ExternalCommitHelper(RealmCoordinator& parent)
// Make writing to the pipe return -1 when the pipe's buffer is full
// rather than blocking until there's space available
- ret = fcntl(m_notify_fd, F_SETFL, O_NONBLOCK);
+ int ret = fcntl(m_notify_fd, F_SETFL, O_NONBLOCK);
if (ret == -1) {
throw std::system_error(errno, std::system_category());
}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.cpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.cpp
index 343193a47..0584f6e35 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.cpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.cpp
@@ -196,6 +196,7 @@ std::shared_ptr<Realm> RealmCoordinator::get_realm(Realm::Config config)
auto schema = std::move(config.schema);
auto migration_function = std::move(config.migration_function);
auto initialization_function = std::move(config.initialization_function);
+ auto audit_factory = std::move(config.audit_factory);
config.schema = {};
if (config.cache) {
@@ -239,6 +240,9 @@ std::shared_ptr<Realm> RealmCoordinator::get_realm(Realm::Config config)
if (realm->config().sync_config)
create_sync_session();
+ if (!m_audit_context && audit_factory)
+ m_audit_context = audit_factory();
+
if (schema) {
lock.unlock();
realm->update_schema(std::move(*schema), config.schema_version, std::move(migration_function),
@@ -321,10 +325,19 @@ RealmCoordinator::~RealmCoordinator()
void RealmCoordinator::unregister_realm(Realm* realm)
{
- std::lock_guard<std::mutex> lock(m_realm_mutex);
- auto new_end = remove_if(begin(m_weak_realm_notifiers), end(m_weak_realm_notifiers),
- [=](auto& notifier) { return notifier.expired() || notifier.is_for_realm(realm); });
- m_weak_realm_notifiers.erase(new_end, end(m_weak_realm_notifiers));
+ // Normally results notifiers are cleaned up by the background worker thread
+ // but if that's disabled we need to ensure that any notifiers from this
+ // Realm get cleaned up
+ if (!m_config.automatic_change_notifications) {
+ std::unique_lock<std::mutex> lock(m_notifier_mutex);
+ clean_up_dead_notifiers();
+ }
+ {
+ std::lock_guard<std::mutex> lock(m_realm_mutex);
+ auto new_end = remove_if(begin(m_weak_realm_notifiers), end(m_weak_realm_notifiers),
+ [=](auto& notifier) { return notifier.expired() || notifier.is_for_realm(realm); });
+ m_weak_realm_notifiers.erase(new_end, end(m_weak_realm_notifiers));
+ }
}
void RealmCoordinator::clear_cache()
@@ -864,11 +877,10 @@ void RealmCoordinator::process_available_async(Realm& realm)
if (notifiers.empty())
return;
- if (realm.m_binding_context)
- realm.m_binding_context->will_send_notifications();
-
if (auto error = m_async_error) {
lock.unlock();
+ if (realm.m_binding_context)
+ realm.m_binding_context->will_send_notifications();
for (auto& notifier : notifiers)
notifier->deliver_error(m_async_error);
if (realm.m_binding_context)
@@ -878,19 +890,25 @@ void RealmCoordinator::process_available_async(Realm& realm)
bool in_read = realm.is_in_read_transaction();
auto& sg = Realm::Internal::get_shared_group(realm);
- if (!sg) // i.e. the Realm was closed in a callback above
- return;
auto version = sg->get_version_of_current_transaction();
auto package = [&](auto& notifier) {
return !(notifier->has_run() && (!in_read || notifier->version() == version) && notifier->package_for_delivery());
};
notifiers.erase(std::remove_if(begin(notifiers), end(notifiers), package), end(notifiers));
+ if (notifiers.empty())
+ return;
lock.unlock();
// no before advance because the Realm is already at the given version,
// because we're either sending initial notifications or the write was
// done on this Realm instance
+ if (realm.m_binding_context) {
+ realm.m_binding_context->will_send_notifications();
+ if (!sg) // i.e. the Realm was closed in the callback above
+ return;
+ }
+
// Skip delivering if the Realm isn't in a read transaction
if (in_read) {
for (auto& notifier : notifiers)
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.hpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.hpp
index e67e0eeec..5c5b85750 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.hpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/impl/realm_coordinator.hpp
@@ -146,6 +146,8 @@ public:
partial_sync::WorkQueue& partial_sync_work_queue();
#endif
+ AuditInterface* audit_context() const noexcept { return m_audit_context.get(); }
+
private:
Realm::Config m_config;
@@ -184,6 +186,8 @@ private:
std::unique_ptr<partial_sync::WorkQueue> m_partial_sync_work_queue;
#endif
+ std::shared_ptr<AuditInterface> m_audit_context;
+
// must be called with m_notifier_mutex locked
void pin_version(VersionID version);
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/results.cpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/results.cpp
index 9b0e107a7..9d20ab64a 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/results.cpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/results.cpp
@@ -20,6 +20,7 @@
#include "impl/realm_coordinator.hpp"
#include "impl/results_notifier.hpp"
+#include "audit.hpp"
#include "object_schema.hpp"
#include "object_store.hpp"
#include "schema.hpp"
@@ -267,6 +268,8 @@ void Results::evaluate_query_if_needed(bool wants_notifications)
prepare_async(ForCallback{false});
m_has_used_table_view = true;
m_table_view.sync_if_needed();
+ if (auto audit = m_realm->audit_context())
+ audit->record_query(m_realm->read_transaction_version(), m_table_view);
break;
}
}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.cpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.cpp
index 80f2e24fe..f9831b626 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.cpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.cpp
@@ -21,7 +21,9 @@
#include "impl/collection_notifier.hpp"
#include "impl/realm_coordinator.hpp"
#include "impl/transact_log_handler.hpp"
+#include "util/fifo.hpp"
+#include "audit.hpp"
#include "binding_context.hpp"
#include "list.hpp"
#include "object.hpp"
@@ -144,7 +146,7 @@ REALM_NOINLINE static void translate_file_exception(StringData path, bool immuta
static bool is_nonupgradable_history(IncompatibleHistories const& ex)
{
// FIXME: Replace this with a proper specific exception type once Core adds support for it.
- return ex.what() == std::string("Incompatible histories. Nonupgradable history schema");
+ return std::string(ex.what()).find(std::string("Incompatible histories. Nonupgradable history schema")) != npos;
}
#endif
@@ -180,6 +182,8 @@ void Realm::open_with_config(const Config& config,
SharedGroupOptions options;
options.durability = config.in_memory ? SharedGroupOptions::Durability::MemOnly :
SharedGroupOptions::Durability::Full;
+
+ options.temp_dir = util::normalize_dir(config.fifo_files_fallback_path);
options.encryption_key = config.encryption_key.data();
options.allow_file_format_upgrade = !config.disable_format_upgrade &&
config.schema_mode != SchemaMode::ResetFile;
@@ -205,7 +209,7 @@ void Realm::open_with_config(const Config& config,
translate_file_exception(config.path, config.immutable()); // Throws
// Move the Realm file into the recovery directory.
- std::string recovery_directory = SyncManager::shared().recovery_directory_path();
+ std::string recovery_directory = SyncManager::shared().recovery_directory_path(config.sync_config ? config.sync_config->recovery_directory : none);
std::string new_realm_path = util::reserve_unique_file_name(recovery_directory, "synced-realm-XXXXXXX");
util::File::move(config.path, new_realm_path);
@@ -585,14 +589,14 @@ void Realm::notify_schema_changed()
}
}
-static void check_read_write(Realm *realm)
+static void check_read_write(const Realm* realm)
{
if (realm->config().immutable()) {
throw InvalidTransactionException("Can't perform transactions on read-only Realms.");
}
}
-static void check_write(Realm* realm)
+static void check_write(const Realm* realm)
{
if (realm->config().immutable() || realm->config().read_only_alternative()) {
throw InvalidTransactionException("Can't perform transactions on read-only Realms.");
@@ -623,6 +627,14 @@ void Realm::verify_open() const
}
}
+VersionID Realm::read_transaction_version() const
+{
+ verify_thread();
+ verify_open();
+ check_read_write(this);
+ return m_shared_group->get_version_of_current_transaction();
+}
+
bool Realm::is_in_transaction() const noexcept
{
if (!m_shared_group) {
@@ -678,7 +690,15 @@ void Realm::commit_transaction()
throw InvalidTransactionException("Can't commit a non-existing write transaction");
}
- m_coordinator->commit_write(*this);
+ if (auto audit = audit_context()) {
+ auto prev_version = m_shared_group->pin_version();
+ m_coordinator->commit_write(*this);
+ audit->record_write(prev_version, m_shared_group->get_version_of_current_transaction());
+ m_shared_group->unpin_version(prev_version);
+ }
+ else {
+ m_coordinator->commit_write(*this);
+ }
cache_new_schema();
invalidate_permission_cache();
}
@@ -864,7 +884,7 @@ bool Realm::refresh()
bool Realm::can_deliver_notifications() const noexcept
{
- if (m_config.immutable()) {
+ if (m_config.immutable() || !m_config.automatic_change_notifications) {
return false;
}
@@ -987,6 +1007,11 @@ template Object Realm::resolve_thread_safe_reference(ThreadSafeReference<Object>
template List Realm::resolve_thread_safe_reference(ThreadSafeReference<List> reference);
template Results Realm::resolve_thread_safe_reference(ThreadSafeReference<Results> reference);
+AuditInterface* Realm::audit_context() const noexcept
+{
+ return m_coordinator ? m_coordinator->audit_context() : nullptr;
+}
+
#if REALM_ENABLE_SYNC
static_assert(static_cast<int>(ComputedPrivileges::Read) == static_cast<int>(sync::Privilege::Read), "");
static_assert(static_cast<int>(ComputedPrivileges::Update) == static_cast<int>(sync::Privilege::Update), "");
@@ -1107,8 +1132,3 @@ Group& RealmFriend::read_group_to(Realm& realm, VersionID version)
realm.begin_read(version);
return *realm.m_group;
}
-
-std::size_t Realm::compute_size() {
- Group& group = read_group();
- return group.compute_aggregated_byte_size();
-}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.hpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.hpp
index 4a7b701f9..212bc07a5 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.hpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/src/shared_realm.hpp
@@ -32,6 +32,7 @@
#include <memory>
namespace realm {
+class AuditInterface;
class BindingContext;
class Group;
class Realm;
@@ -188,6 +189,11 @@ public:
// User-supplied encryption key. Must be either empty or 64 bytes.
std::vector<char> encryption_key;
+ // Core and Object Store will in some cases need to create named pipes alongside the Realm file.
+ // But on some filesystems this can be a problem (e.g. external storage on Android that uses FAT32).
+ // In order to work around this, a separate path can be specified for these files.
+ std::string fifo_files_fallback_path;
+
bool in_memory = false;
SchemaMode schema_mode = SchemaMode::Automatic;
@@ -242,9 +248,12 @@ public:
/// A data structure storing data used to configure the Realm for sync support.
std::shared_ptr<SyncConfig> sync_config;
- // FIXME: Realm Java manages sync at the Java level, so it needs to create Realms using the sync history
- // format.
+ // Open the Realm using the sync history mode even if a sync
+ // configuration is not supplied.
bool force_sync_history = false;
+
+ // A factory function which produces an audit implementation.
+ std::function<std::shared_ptr<AuditInterface>()> audit_factory;
};
// Get a cached Realm or create a new one if no cached copies exists
@@ -279,7 +288,10 @@ public:
void commit_transaction();
void cancel_transaction();
bool is_in_transaction() const noexcept;
+
bool is_in_read_transaction() const { return !!m_group; }
+ VersionID read_transaction_version() const;
+ Group& read_group();
bool is_in_migration() const noexcept { return m_in_migration; }
@@ -329,6 +341,8 @@ public:
ComputedPrivileges get_privileges(StringData object_type);
ComputedPrivileges get_privileges(RowExpr row);
+ AuditInterface* audit_context() const noexcept;
+
static SharedRealm make_shared_realm(Config config, std::shared_ptr<_impl::RealmCoordinator> coordinator = nullptr) {
struct make_shared_enabler : public Realm {
make_shared_enabler(Config config, std::shared_ptr<_impl::RealmCoordinator> coordinator)
@@ -426,12 +440,8 @@ private:
public:
std::unique_ptr<BindingContext> m_binding_context;
- // FIXME private
- Group& read_group();
-
- std::size_t compute_size();
-
- Replication *history() { return m_history.get(); }
+ // FIXME: This is currently needed by the adapter to get access to its changeset cooker
+ Replication* history() { return m_history.get(); }
friend class _impl::RealmFriend;
};
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/CMakeLists.txt b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/CMakeLists.txt
index eaf9ff9f2..5ba2f01b3 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/CMakeLists.txt
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/CMakeLists.txt
@@ -5,6 +5,7 @@ set(HEADERS
util/index_helpers.hpp
util/templated_test_case.hpp
util/test_file.hpp
+ util/test_utils.hpp
)
set(SOURCES
@@ -25,6 +26,7 @@ set(SOURCES
util/event_loop.cpp
util/test_file.cpp
+ util/test_utils.cpp
)
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/realm.cpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/realm.cpp
index faf33c3aa..e993a4a9b 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/realm.cpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/realm.cpp
@@ -21,6 +21,7 @@
#include "util/event_loop.hpp"
#include "util/test_file.hpp"
#include "util/templated_test_case.hpp"
+#include "util/test_utils.hpp"
#include "binding_context.hpp"
#include "object_schema.hpp"
@@ -152,6 +153,53 @@ TEST_CASE("SharedRealm: get_shared_realm()") {
}
}
+
+// Windows doesn't use fifos
+#ifndef _WIN32
+ SECTION("should be able to set a FIFO fallback path") {
+ std::string fallback_dir = tmp_dir() + "/fallback/";
+ realm::util::try_make_dir(fallback_dir);
+ TestFile config;
+ config.fifo_files_fallback_path = fallback_dir;
+ config.schema_version = 1;
+ config.schema = Schema{
+ {"object", {
+ {"value", PropertyType::Int}
+ }},
+ };
+
+ realm::util::make_dir(config.path + ".note");
+ auto realm = Realm::get_shared_realm(config);
+ auto fallback_file = util::format("%1realm_%2.note", fallback_dir, std::hash<std::string>()(config.path)); // Mirror internal implementation
+ REQUIRE(File::exists(fallback_file));
+ realm::util::remove_dir(config.path + ".note");
+ realm::util::remove_dir_recursive(fallback_dir);
+ }
+#endif
+
+// Windows doesn't use fifos
+#ifndef _WIN32
+ SECTION("automatically append dir separator to end of fallback path") {
+ std::string fallback_dir = tmp_dir() + "/fallback";
+ realm::util::try_make_dir(fallback_dir);
+ TestFile config;
+ config.fifo_files_fallback_path = fallback_dir;
+ config.schema_version = 1;
+ config.schema = Schema{
+ {"object", {
+ {"value", PropertyType::Int}
+ }},
+ };
+
+ realm::util::make_dir(config.path + ".note");
+ auto realm = Realm::get_shared_realm(config);
+ auto fallback_file = util::format("%1/realm_%2.note", fallback_dir, std::hash<std::string>()(config.path)); // Mirror internal implementation
+ REQUIRE(File::exists(fallback_file));
+ realm::util::remove_dir(config.path + ".note");
+ realm::util::remove_dir_recursive(fallback_dir);
+ }
+#endif
+
SECTION("should verify that the schema is valid") {
config.schema = Schema{
{"object",
@@ -337,8 +385,11 @@ TEST_CASE("SharedRealm: get_shared_realm()") {
#ifndef _WIN32
SECTION("should throw when creating the notification pipe fails") {
util::try_make_dir(config.path + ".note");
+ auto sys_fallback_file = util::format("%1realm_%2.note", SharedGroupOptions::get_sys_tmp_dir(), std::hash<std::string>()(config.path)); // Mirror internal implementation
+ util::try_make_dir(sys_fallback_file);
REQUIRE_THROWS(Realm::get_shared_realm(config));
util::remove_dir(config.path + ".note");
+ util::remove_dir(sys_fallback_file);
}
#endif
@@ -1580,7 +1631,7 @@ TEST_CASE("Statistics on Realms") {
});
SECTION("compute_size") {
- auto s = r->compute_size();
+ auto s = r->read_group().compute_aggregated_byte_size();
REQUIRE(s > 0);
}
}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/results.cpp b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/results.cpp
index f7cc3fd4a..9f5b293ad 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/results.cpp
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/tests/results.cpp
@@ -41,6 +41,15 @@
#include "sync/sync_session.hpp"
#endif
+namespace realm {
+class TestHelper {
+public:
+ static SharedGroup& get_shared_group(SharedRealm const& shared_realm)
+ {
+ return *Realm::Internal::get_shared_group(*shared_realm);
+ }
+};
+}
using namespace realm;
using namespace std::string_literals;
@@ -1897,7 +1906,7 @@ TEST_CASE("results: notifications after move") {
}
}
-TEST_CASE("results: implicit background notifier") {
+TEST_CASE("results: notifier with no callbacks") {
_impl::RealmCoordinator::assert_no_open_realms();
InMemoryTestFile config;
@@ -1917,6 +1926,11 @@ TEST_CASE("results: implicit background notifier") {
results.last(); // force evaluation and creation of TableView
SECTION("refresh() does not block due to implicit notifier") {
+ // Create and then immediately remove a callback because
+ // `automatic_change_notifications = false` makes Results not implicitly
+ // create a notifier
+ results.add_notification_callback([](CollectionChangeSet const&, std::exception_ptr) {});
+
auto r2 = coordinator->get_realm();
r2->begin_transaction();
r2->read_group().get_table("class_object")->add_empty_row();
@@ -1926,6 +1940,8 @@ TEST_CASE("results: implicit background notifier") {
}
SECTION("refresh() does not attempt to deliver stale results") {
+ results.add_notification_callback([](CollectionChangeSet const&, std::exception_ptr) {});
+
// Create version 1
r->begin_transaction();
table->add_empty_row();
@@ -1942,6 +1958,29 @@ TEST_CASE("results: implicit background notifier") {
// they're for version 1 and the realm is at 2)
r->refresh();
}
+
+ SECTION("should not pin the source version even after the Realm has been closed") {
+ auto r2 = coordinator->get_realm();
+ REQUIRE(r != r2);
+ r->close();
+
+ auto& shared_group = TestHelper::get_shared_group(r2);
+ // There's always at least 2 live versions because the previous version
+ // isn't clean up until the *next* commit
+ REQUIRE(shared_group.get_number_of_versions() == 2);
+
+ auto table = r2->read_group().get_table("class_object");
+
+ r2->begin_transaction();
+ table->add_empty_row();
+ r2->commit_transaction();
+ r2->begin_transaction();
+ table->add_empty_row();
+ r2->commit_transaction();
+
+ // Would now be 3 if the closed Realm is still pinning the version it was at
+ REQUIRE(shared_group.get_number_of_versions() == 2);
+ }
}
TEST_CASE("results: error messages") {
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/workflow/build.sh b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/workflow/build.sh
index 6dbfd464e..401bac3ab 100755
--- a/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/workflow/build.sh
+++ b/Carthage/Checkouts/realm-cocoa/Realm/ObjectStore/workflow/build.sh
@@ -27,7 +27,7 @@ if [ "${flavor}" = "android" ]; then
fi
if [ "${sync}" = "sync" ]; then
- cmake_flags="${cmake_flags} -DREALM_ENABLE_SYNC=1"
+ cmake_flags="${cmake_flags} -DREALM_ENABLE_SYNC=1 -DREALM_ENABLE_SERVER=1"
fi
cmake ${cmake_flags} ..
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMCollection.h b/Carthage/Checkouts/realm-cocoa/Realm/RLMCollection.h
index 9d3fa7e85..8d8ca4956 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMCollection.h
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMCollection.h
@@ -18,12 +18,13 @@
#import <Foundation/Foundation.h>
+#import <Realm/RLMConstants.h>
#import <Realm/RLMThreadSafeReference.h>
NS_ASSUME_NONNULL_BEGIN
@class RLMRealm, RLMResults, RLMSortDescriptor, RLMNotificationToken, RLMCollectionChange;
-typedef NS_ENUM(int32_t, RLMPropertyType);
+typedef RLM_CLOSED_ENUM(int32_t, RLMPropertyType);
/**
A homogenous collection of Realm-managed objects. Examples of conforming types
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMConstants.h b/Carthage/Checkouts/realm-cocoa/Realm/RLMConstants.h
index f73fe8387..aa7cd41a9 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMConstants.h
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMConstants.h
@@ -29,6 +29,15 @@ NS_ASSUME_NONNULL_BEGIN
#define RLM_EXTENSIBLE_STRING_ENUM_CASE_SWIFT_NAME(fully_qualified, _) NS_SWIFT_NAME(fully_qualified)
#endif
+// Swift 5 considers NS_ENUM to be "open", meaning there could be values present
+// other than the defined cases (which allows adding more cases later without
+// it being a breaking change), while older versions consider it "closed".
+#ifdef NS_CLOSED_ENUM
+#define RLM_CLOSED_ENUM NS_CLOSED_ENUM
+#else
+#define RLM_CLOSED_ENUM NS_ENUM
+#endif
+
#if __has_attribute(ns_error_domain) && (!defined(__cplusplus) || !__cplusplus || __cplusplus >= 201103L)
#define RLM_ERROR_ENUM(type, name, domain) \
_Pragma("clang diagnostic push") \
@@ -47,7 +56,7 @@ NS_ASSUME_NONNULL_BEGIN
For more information, see [Realm Models](https://realm.io/docs/objc/latest/#models).
*/
-typedef NS_ENUM(int32_t, RLMPropertyType) {
+typedef RLM_CLOSED_ENUM(int32_t, RLMPropertyType) {
#pragma mark - Primitive types
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMNetworkClient.mm b/Carthage/Checkouts/realm-cocoa/Realm/RLMNetworkClient.mm
index db1f67afb..e817a409b 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMNetworkClient.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMNetworkClient.mm
@@ -310,7 +310,7 @@ didCompleteWithError:(NSError *)error
return;
}
- if (![self validateResponse:task.response data:_data error:&error]) {
+ if (NSError *error = [self validateResponse:task.response data:_data]) {
_completionBlock(error, nil);
return;
}
@@ -330,11 +330,10 @@ didCompleteWithError:(NSError *)error
_completionBlock(nil, (NSDictionary *)json);
}
-- (BOOL)validateResponse:(NSURLResponse *)response data:(NSData *)data error:(NSError * __autoreleasing *)error {
+- (NSError *)validateResponse:(NSURLResponse *)response data:(NSData *)data {
if (![response isKindOfClass:[NSHTTPURLResponse class]]) {
// FIXME: Provide error message
- *error = make_auth_error_bad_response();
- return NO;
+ return make_auth_error_bad_response();
}
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
@@ -353,28 +352,22 @@ didCompleteWithError:(NSError *)error
case RLMSyncAuthErrorExpiredPermissionOffer:
case RLMSyncAuthErrorAmbiguousPermissionOffer:
case RLMSyncAuthErrorFileCannotBeShared:
- *error = make_auth_error(responseModel);
- break;
+ return make_auth_error(responseModel);
default:
// Right now we assume that any codes not described
// above are generic HTTP error codes.
- *error = make_auth_error_http_status(responseModel.status);
- break;
+ return make_auth_error_http_status(responseModel.status);
}
- } else {
- *error = make_auth_error_http_status(httpResponse.statusCode);
}
-
- return NO;
+ return make_auth_error_http_status(httpResponse.statusCode);
}
if (!data) {
// FIXME: provide error message
- *error = make_auth_error_bad_response();
- return NO;
+ return make_auth_error_bad_response();
}
- return YES;
+ return nil;
}
- (RLMSyncErrorResponseModel *)responseModelFromData:(NSData *)data {
@@ -425,6 +418,8 @@ didCompleteWithError:(NSError *)error
// Add the request to a task and start it
[[session dataTaskWithRequest:request] resume];
+ // Tell the session to destroy itself once it's done with the request
+ [session finishTasksAndInvalidate];
}
@end
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm
index d077c78b9..8521039cd 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMRealm.mm
@@ -389,7 +389,7 @@ REALM_NOINLINE static void translateSharedGroupOpenException(RLMRealmConfigurati
configuration = [configuration copy];
Realm::Config& config = configuration.config;
- RLMRealm *realm = [[RLMRealm alloc] initPrivate];
+ RLMRealm *realm = [[self alloc] initPrivate];
realm->_dynamic = dynamic;
// protects the realm cache and accessors cache
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncConfiguration_Private.h b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncConfiguration_Private.h
index b3c4a7e4d..07bf0a23c 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncConfiguration_Private.h
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncConfiguration_Private.h
@@ -18,9 +18,11 @@
#import <Realm/RLMSyncConfiguration.h>
+#import <Realm/RLMConstants.h>
+
NS_ASSUME_NONNULL_BEGIN
-typedef NS_ENUM(NSUInteger, RLMSyncStopPolicy) {
+typedef RLM_CLOSED_ENUM(NSUInteger, RLMSyncStopPolicy) {
RLMSyncStopPolicyImmediately,
RLMSyncStopPolicyLiveIndefinitely,
RLMSyncStopPolicyAfterChangesUploaded,
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncManager.h b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncManager.h
index c6b401e5e..1dca3b246 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncManager.h
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncManager.h
@@ -23,7 +23,7 @@
@class RLMSyncSession;
/// An enum representing different levels of sync-related logging that can be configured.
-typedef NS_ENUM(NSUInteger, RLMSyncLogLevel) {
+typedef RLM_CLOSED_ENUM(NSUInteger, RLMSyncLogLevel) {
/// Nothing will ever be logged.
RLMSyncLogLevelOff,
/// Only fatal errors will be logged.
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncPermission.h b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncPermission.h
index c0677a0d1..8a21c74af 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncPermission.h
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncPermission.h
@@ -16,6 +16,7 @@
//
////////////////////////////////////////////////////////////////////////////
+#import <Realm/RLMConstants.h>
#import <Realm/RLMObject.h>
@protocol RLMPermission, RLMPermissionUser;
@@ -362,7 +363,7 @@ FOUNDATION_EXTERN id RLMPermissionForRole(RLMArray *array, id role);
access to a Realm can always read from that Realm, and users with
administrative access can always read or write from the Realm.
*/
-typedef NS_ENUM(NSUInteger, RLMSyncAccessLevel) {
+typedef RLM_CLOSED_ENUM(NSUInteger, RLMSyncAccessLevel) {
/// No access whatsoever.
RLMSyncAccessLevelNone = 0,
/**
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSession.h b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSession.h
index 0d809a44a..1ea50758f 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSession.h
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSession.h
@@ -57,7 +57,7 @@ typedef NS_ENUM(NSUInteger, RLMSyncConnectionState) {
Progress notification blocks can be registered on sessions if your app wishes to be informed
how many bytes have been uploaded or downloaded, for example to show progress indicator UIs.
*/
-typedef NS_ENUM(NSUInteger, RLMSyncProgressDirection) {
+typedef RLM_CLOSED_ENUM(NSUInteger, RLMSyncProgressDirection) {
/// For monitoring upload progress.
RLMSyncProgressDirectionUpload,
/// For monitoring download progress.
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSubscription.h b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSubscription.h
index 13a8083a0..d06d953c1 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSubscription.h
+++ b/Carthage/Checkouts/realm-cocoa/Realm/RLMSyncSubscription.h
@@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
`RLMSyncSubscriptionState` is an enumeration representing the possible state of a sync subscription.
*/
-typedef NS_ENUM(NSInteger, RLMSyncSubscriptionState) {
+typedef RLM_CLOSED_ENUM(NSInteger, RLMSyncSubscriptionState) {
/**
An error occurred while creating the subscription or while the server was processing it.
*/
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist b/Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist
index a923269b8..8d064fca8 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/Realm/Realm-Info.plist
@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>3.13.1</string>
+ <string>3.14.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>3.13.1</string>
+ <string>3.14.1</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2014 Realm. All rights reserved.</string>
<key>NSPrincipalClass</key>
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/Tests/AsyncTests.mm b/Carthage/Checkouts/realm-cocoa/Realm/Tests/AsyncTests.mm
index e4bf7064e..b6e44daed 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/Tests/AsyncTests.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/Tests/AsyncTests.mm
@@ -30,6 +30,14 @@
// A whole bunch of blocks don't use their RLMResults parameter
#pragma clang diagnostic ignored "-Wunused-parameter"
+@interface ManualRefreshRealm : RLMRealm
+@end
+@implementation ManualRefreshRealm
+- (void)verifyNotificationsAreSupported:(__unused bool)isCollection {
+ // The normal implementation of this will reject realms with automatic change notifications disabled
+}
+@end
+
@interface AsyncTests : RLMTestCase
@end
@@ -583,7 +591,7 @@
// Create ten RLMRealm instances, each with a different read version
RLMRealm *realms[10];
for (int i = 0; i < 10; ++i) {
- RLMRealm *realm = realms[i] = [RLMRealm realmWithConfiguration:config error:nil];
+ RLMRealm *realm = realms[i] = [ManualRefreshRealm realmWithConfiguration:config error:nil];
[realm transactionWithBlock:^{
[IntObject createInRealm:realm withValue:@[@(i)]];
}];
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/Tests/InterprocessTests.m b/Carthage/Checkouts/realm-cocoa/Realm/Tests/InterprocessTests.m
index b562d549b..fbd97b50f 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/Tests/InterprocessTests.m
+++ b/Carthage/Checkouts/realm-cocoa/Realm/Tests/InterprocessTests.m
@@ -378,7 +378,7 @@
else {
RLMRealm *realm = RLMRealm.defaultRealm;
[realm beginWriteTransaction];
- abort();
+ _Exit(1);
}
}
@@ -394,7 +394,7 @@
else {
RLMRealm *realm = RLMRealm.defaultRealm;
[realm beginWriteTransaction];
- abort();
+ _Exit(1);
}
}
diff --git a/Carthage/Checkouts/realm-cocoa/Realm/Tests/RealmTests.mm b/Carthage/Checkouts/realm-cocoa/Realm/Tests/RealmTests.mm
index 1187cdd53..abd5ab8a0 100644
--- a/Carthage/Checkouts/realm-cocoa/Realm/Tests/RealmTests.mm
+++ b/Carthage/Checkouts/realm-cocoa/Realm/Tests/RealmTests.mm
@@ -1779,10 +1779,16 @@
assert(![manager fileExistsAtPath:fifoURL.path]);
[manager createDirectoryAtPath:fifoURL.path withIntermediateDirectories:YES attributes:nil error:nil];
+ // Ensure that it doesn't try to fall back to putting it in the temp directory
+ auto oldTempDir = realm::SharedGroupOptions::get_sys_tmp_dir();
+ realm::SharedGroupOptions::set_sys_tmp_dir("");
+
NSError *error;
XCTAssertNil([RLMRealm realmWithConfiguration:configuration error:&error], @"Should not have been able to open FIFO");
XCTAssertNotNil(error);
RLMValidateRealmError(error, RLMErrorFileAccess, @"Is a directory", nil);
+
+ realm::SharedGroupOptions::set_sys_tmp_dir(std::move(oldTempDir));
}
#endif
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift
index 86b8a62d4..16699c790 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Object.swift
@@ -269,7 +269,7 @@ open class Object: RLMObjectBase, ThreadConfined, RealmCollectionValue {
Objects are considered the same if and only if they are both managed by the same
Realm and point to the same underlying object in the database.
-
+
- note: Equality comparison is implemented by `isEqual(_:)`. If the object type
is defined with a primary key, `isEqual(_:)` behaves identically to this
method. If the object type is not defined with a primary key,
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/ObjectiveCSupport.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/ObjectiveCSupport.swift
index 46a1dc345..3c94c720c 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/ObjectiveCSupport.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/ObjectiveCSupport.swift
@@ -163,4 +163,9 @@ public final class ObjectiveCSupport {
public static func convert(object: RLMSyncConfiguration) -> SyncConfiguration {
return SyncConfiguration(config: object)
}
+
+ /// Convert a `RLMSyncSubscription` to a `SyncSubscription`.
+ public static func convert(object: RLMSyncSubscription) -> SyncSubscription<Object> {
+ return SyncSubscription(object)
+ }
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Optional.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Optional.swift
index 6cf5838de..d3e585ca4 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Optional.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Optional.swift
@@ -24,7 +24,7 @@ public protocol RealmOptionalType {
public extension RealmOptionalType {
/// :nodoc:
- public static func className() -> String {
+ static func className() -> String {
return ""
}
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift
index 9c7cae70f..81e935b14 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/RealmCollection.swift
@@ -517,13 +517,13 @@ public extension RealmCollection where Element: MinMaxType {
/**
Returns the minimum (lowest) value of the collection, or `nil` if the collection is empty.
*/
- public func min() -> Element? {
+ func min() -> Element? {
return min(ofProperty: "self")
}
/**
Returns the maximum (highest) value of the collection, or `nil` if the collection is empty.
*/
- public func max() -> Element? {
+ func max() -> Element? {
return max(ofProperty: "self")
}
}
@@ -532,13 +532,13 @@ public extension RealmCollection where Element: OptionalProtocol, Element.Wrappe
/**
Returns the minimum (lowest) value of the collection, or `nil` if the collection is empty.
*/
- public func min() -> Element.Wrapped? {
+ func min() -> Element.Wrapped? {
return min(ofProperty: "self")
}
/**
Returns the maximum (highest) value of the collection, or `nil` if the collection is empty.
*/
- public func max() -> Element.Wrapped? {
+ func max() -> Element.Wrapped? {
return max(ofProperty: "self")
}
}
@@ -547,13 +547,13 @@ public extension RealmCollection where Element: AddableType {
/**
Returns the sum of the values in the collection, or `nil` if the collection is empty.
*/
- public func sum() -> Element {
+ func sum() -> Element {
return sum(ofProperty: "self")
}
/**
Returns the average of all of the values in the collection.
*/
- public func average() -> Double? {
+ func average() -> Double? {
return average(ofProperty: "self")
}
}
@@ -562,13 +562,13 @@ public extension RealmCollection where Element: OptionalProtocol, Element.Wrappe
/**
Returns the sum of the values in the collection, or `nil` if the collection is empty.
*/
- public func sum() -> Element.Wrapped {
+ func sum() -> Element.Wrapped {
return sum(ofProperty: "self")
}
/**
Returns the average of all of the values in the collection.
*/
- public func average() -> Double? {
+ func average() -> Double? {
return average(ofProperty: "self")
}
}
@@ -582,7 +582,7 @@ public extension RealmCollection where Element: Comparable {
- parameter ascending: The direction to sort in.
*/
- public func sorted(ascending: Bool = true) -> Results<Element> {
+ func sorted(ascending: Bool = true) -> Results<Element> {
return sorted(byKeyPath: "self", ascending: ascending)
}
}
@@ -596,7 +596,7 @@ public extension RealmCollection where Element: OptionalProtocol, Element.Wrappe
- parameter ascending: The direction to sort in.
*/
- public func sorted(ascending: Bool = true) -> Results<Element> {
+ func sorted(ascending: Bool = true) -> Results<Element> {
return sorted(byKeyPath: "self", ascending: ascending)
}
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift
index 068c77920..e60abb1cf 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Results.swift
@@ -257,7 +257,7 @@ public final class Results<Element: RealmCollectionValue>: NSObject, NSFastEnume
/**
Returns a `Results` containing distinct objects based on the specified key paths
-
+
- parameter keyPaths: The key paths used produce distinct results
*/
public func distinct<S: Sequence>(by keyPaths: S) -> Results<Element>
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift
index db44249a8..e03f88182 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ListTests.swift
@@ -19,6 +19,14 @@
import XCTest
import RealmSwift
+#if !swift(>=4.1)
+extension Sequence {
+ func compactMap<ElementOfResult>(_ transform: (Self.Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] {
+ return try flatMap(transform)
+ }
+}
+#endif
+
class ListTests: TestCase {
var str1: SwiftStringObject?
var str2: SwiftStringObject?
@@ -429,9 +437,9 @@ class ListTests: TestCase {
do {
let objects = realm.objects(SwiftListOfSwiftObject.self)
- let properties = Array(objects.flatMap { $0.array.map { $0.intCol }})
+ let properties: [Int] = Array(objects.flatMap { $0.array.map { $0.intCol }})
let listsOfObjects = objects.value(forKeyPath: "array") as! [List<SwiftObject>]
- let kvcProperties = Array(listsOfObjects.flatMap { $0.map { $0.intCol }})
+ let kvcProperties: [Int] = Array(listsOfObjects.flatMap { $0.map { $0.intCol }})
XCTAssertEqual(properties, kvcProperties)
}
@@ -459,27 +467,27 @@ class ListTests: TestCase {
do {
let objects = realm.objects(SwiftObject.self)
- let properties = Array(objects.flatMap { $0.intCol })
+ let properties = Array(objects.compactMap { $0.intCol })
let listsOfObjects = objects.value(forKeyPath: "intCol") as! [Int]
- let kvcProperties = Array(listsOfObjects.flatMap { $0 })
+ let kvcProperties = Array(listsOfObjects.compactMap { $0 })
XCTAssertEqual(properties, kvcProperties)
}
do {
let objects = realm.objects(SwiftObject.self)
- let properties = Array(objects.flatMap { $0.doubleCol })
+ let properties = Array(objects.compactMap { $0.doubleCol })
let listsOfObjects = objects.value(forKeyPath: "doubleCol") as! [Double]
- let kvcProperties = Array(listsOfObjects.flatMap { $0 })
+ let kvcProperties = Array(listsOfObjects.compactMap { $0 })
XCTAssertEqual(properties, kvcProperties)
}
do {
let objects = realm.objects(SwiftObject.self)
- let properties = Array(objects.flatMap { $0.stringCol })
+ let properties = Array(objects.compactMap { $0.stringCol })
let listsOfObjects = objects.value(forKeyPath: "stringCol") as! [String]
- let kvcProperties = Array(listsOfObjects.flatMap { $0 })
+ let kvcProperties = Array(listsOfObjects.compactMap { $0 })
XCTAssertEqual(properties, kvcProperties)
}
@@ -505,45 +513,45 @@ class ListTests: TestCase {
do {
let objects = realm.objects(SwiftListOfSwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.array.flatMap { $0.optIntCol.value }})
+ let properties = Array(objects.flatMap { $0.array.compactMap { $0.optIntCol.value }})
let listsOfObjects = objects.value(forKeyPath: "array") as! [List<SwiftOptionalObject>]
- let kvcProperties = Array(listsOfObjects.flatMap { $0.flatMap { $0.optIntCol.value }})
+ let kvcProperties = Array(listsOfObjects.flatMap { $0.compactMap { $0.optIntCol.value }})
XCTAssertEqual(properties, kvcProperties)
}
do {
let objects = realm.objects(SwiftListOfSwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.array.flatMap { $0.optInt8Col.value }})
+ let properties = Array(objects.flatMap { $0.array.compactMap { $0.optInt8Col.value }})
let listsOfObjects = objects.value(forKeyPath: "array") as! [List<SwiftOptionalObject>]
- let kvcProperties = Array(listsOfObjects.flatMap { $0.flatMap { $0.optInt8Col.value }})
+ let kvcProperties = Array(listsOfObjects.flatMap { $0.compactMap { $0.optInt8Col.value }})
XCTAssertEqual(properties, kvcProperties)
}
do {
let objects = realm.objects(SwiftListOfSwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.array.flatMap { $0.optDoubleCol.value }})
+ let properties = Array(objects.flatMap { $0.array.compactMap { $0.optDoubleCol.value }})
let listsOfObjects = objects.value(forKeyPath: "array") as! [List<SwiftOptionalObject>]
- let kvcProperties = Array(listsOfObjects.flatMap { $0.flatMap { $0.optDoubleCol.value }})
+ let kvcProperties = Array(listsOfObjects.flatMap { $0.compactMap { $0.optDoubleCol.value }})
XCTAssertEqual(properties, kvcProperties)
}
do {
let objects = realm.objects(SwiftListOfSwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.array.flatMap { $0.optStringCol }})
+ let properties = Array(objects.flatMap { $0.array.compactMap { $0.optStringCol }})
let listsOfObjects = objects.value(forKeyPath: "array") as! [List<SwiftOptionalObject>]
- let kvcProperties = Array(listsOfObjects.flatMap { $0.flatMap { $0.optStringCol }})
+ let kvcProperties = Array(listsOfObjects.flatMap { $0.compactMap { $0.optStringCol }})
XCTAssertEqual(properties, kvcProperties)
}
do {
let objects = realm.objects(SwiftListOfSwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.array.flatMap { $0.optNSStringCol }})
+ let properties = Array(objects.flatMap { $0.array.compactMap { $0.optNSStringCol }})
let listsOfObjects = objects.value(forKeyPath: "array") as! [List<SwiftOptionalObject>]
- let kvcProperties = Array(listsOfObjects.flatMap { $0.flatMap { $0.optNSStringCol }})
+ let kvcProperties = Array(listsOfObjects.flatMap { $0.compactMap { $0.optNSStringCol }})
XCTAssertEqual(properties, kvcProperties)
}
@@ -551,31 +559,31 @@ class ListTests: TestCase {
do {
let objects = realm.objects(SwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.optIntCol.value })
+ let properties = Array(objects.compactMap { $0.optIntCol.value })
let listsOfObjects = objects.value(forKeyPath: "optIntCol") as! [Int]
- let kvcProperties = Array(listsOfObjects.flatMap { $0 })
+ let kvcProperties = Array(listsOfObjects.compactMap { $0 })
XCTAssertEqual(properties, kvcProperties)
}
do {
let objects = realm.objects(SwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.optInt8Col.value })
+ let properties = Array(objects.compactMap { $0.optInt8Col.value })
#if swift(>=3.1)
let listsOfObjects = objects.value(forKeyPath: "optInt8Col") as! [Int8]
#else
let listsOfObjects = (objects.value(forKeyPath: "optInt8Col") as! [NSNumber]).map { $0.int8Value }
#endif
- let kvcProperties = Array(listsOfObjects.flatMap { $0 })
+ let kvcProperties = Array(listsOfObjects.compactMap { $0 })
XCTAssertEqual(properties, kvcProperties)
}
do {
let objects = realm.objects(SwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.optDoubleCol.value })
+ let properties = Array(objects.compactMap { $0.optDoubleCol.value })
let listsOfObjects = objects.value(forKeyPath: "optDoubleCol") as! [Double]
- let kvcProperties = Array(listsOfObjects.flatMap { $0 })
+ let kvcProperties = Array(listsOfObjects.compactMap { $0 })
XCTAssertEqual(properties, kvcProperties)
}
@@ -585,9 +593,9 @@ class ListTests: TestCase {
do {
let objects = realm.objects(SwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.optStringCol })
+ let properties = Array(objects.compactMap { $0.optStringCol })
let listsOfObjects = objects.value(forKeyPath: "optStringCol") as! [String]
- let kvcProperties = Array(listsOfObjects.flatMap { $0 })
+ let kvcProperties = Array(listsOfObjects.compactMap { $0 })
XCTAssertEqual(properties, kvcProperties)
}
@@ -595,9 +603,9 @@ class ListTests: TestCase {
do {
let objects = realm.objects(SwiftOptionalObject.self)
- let properties = Array(objects.flatMap { $0.optNSStringCol })
+ let properties = Array(objects.compactMap { $0.optNSStringCol })
let listsOfObjects = objects.value(forKeyPath: "optNSStringCol") as! [NSString]
- let kvcProperties = Array(listsOfObjects.flatMap { $0 })
+ let kvcProperties = Array(listsOfObjects.compactMap { $0 })
XCTAssertEqual(properties, kvcProperties)
}
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ObjectCreationTests.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ObjectCreationTests.swift
index 53b7ca0e0..6d77320df 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ObjectCreationTests.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Tests/ObjectCreationTests.swift
@@ -408,7 +408,7 @@ class ObjectCreationTests: TestCase {
let realmA = realmWithTestPath()
let realmB = try! Realm()
- var realmAObject: SwiftListOfSwiftObject!
+ var realmAObject: SwiftListOfSwiftObject?
try! realmA.write {
let array = [SwiftObject(value: values), SwiftObject(value: values)]
realmAObject = realmA.create(SwiftListOfSwiftObject.self, value: ["array": array])
@@ -416,7 +416,7 @@ class ObjectCreationTests: TestCase {
var realmBObject: SwiftListOfSwiftObject!
try! realmB.write {
- realmBObject = realmB.create(SwiftListOfSwiftObject.self, value: realmAObject)
+ realmBObject = realmB.create(SwiftListOfSwiftObject.self, value: realmAObject!)
}
XCTAssertNotEqual(realmAObject, realmBObject)
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/ThreadSafeReference.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/ThreadSafeReference.swift
index 37379fd44..96af15b56 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/ThreadSafeReference.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/ThreadSafeReference.swift
@@ -93,6 +93,8 @@ public class ThreadSafeReference<Confined: ThreadConfined> {
}
extension Realm {
+ // MARK: Thread Safe Reference
+
/**
Returns the same object as the one referenced when the `ThreadSafeReference` was first
created, but resolved for the current Realm for this thread. Returns `nil` if this object was
diff --git a/Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift b/Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift
index 767aa5441..1e0e6a8c3 100644
--- a/Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift
+++ b/Carthage/Checkouts/realm-cocoa/RealmSwift/Util.swift
@@ -83,19 +83,13 @@ extension Object {
// MARK: CustomObjectiveCBridgeable
-fileprivate extension SyncSubscription {
- fileprivate convenience init(_ rlmSubscription: Any) {
- self.init(RLMCastToSyncSubscription(rlmSubscription as AnyObject))
- }
-}
-
internal func dynamicBridgeCast<T>(fromObjectiveC x: Any) -> T {
if T.self == DynamicObject.self {
return unsafeBitCast(x as AnyObject, to: T.self)
} else if let bridgeableType = T.self as? CustomObjectiveCBridgeable.Type {
return bridgeableType.bridging(objCValue: x) as! T
} else if T.self == SyncSubscription<Object>.self {
- return SyncSubscription<Object>(x) as! T
+ return ObjectiveCSupport.convert(object: RLMCastToSyncSubscription(x)) as! T
} else {
return x as! T
}
diff --git a/Carthage/Checkouts/realm-cocoa/build.sh b/Carthage/Checkouts/realm-cocoa/build.sh
index 558a1ce3b..a1247b709 100755
--- a/Carthage/Checkouts/realm-cocoa/build.sh
+++ b/Carthage/Checkouts/realm-cocoa/build.sh
@@ -16,6 +16,8 @@ set -e
source_root="$(dirname "$0")"
# You can override the version of the core library
+: ${REALM_BASE_URL:="https://static.realm.io/downloads"} # set it if you need to use a remote repo
+
: ${REALM_CORE_VERSION:=$(sed -n 's/^REALM_CORE_VERSION=\(.*\)$/\1/p' ${source_root}/dependencies.list)} # set to "current" to always use the current build
: ${REALM_SYNC_VERSION:=$(sed -n 's/^REALM_SYNC_VERSION=\(.*\)$/\1/p' ${source_root}/dependencies.list)}
@@ -164,6 +166,7 @@ build_combined() {
# Derive build paths
local build_products_path="build/DerivedData/Realm/Build/Products"
+ local build_intermediates_path="build/DerivedData/Realm/Build/Intermediates.noindex"
local product_name="$module_name.framework"
local binary_path="$module_name"
local os_path="$build_products_path/$config-$os$scope_suffix/$product_name"
@@ -179,6 +182,20 @@ build_combined() {
cp $simulator_path/Modules/$module_name.swiftmodule/* $os_path/Modules/$module_name.swiftmodule/
fi
+ # Xcode 10.2 merges the generated headers together with ifdef guards for
+ # each of the target platforms. This doesn't handle merging
+ # device/simulator builds, so we need to take care of that ourselves.
+ # Currently all platforms have identical headers, so we just pick one and
+ # use that rather than merging, but this may change in the future.
+ if [ -f $os_path/Headers/$module_name-Swift.h ]; then
+ unique_headers=$(find $build_intermediates_path -name $module_name-Swift.h -exec shasum {} \; | cut -d' ' -f 1 | uniq | grep -c '^')
+ if [ $unique_headers != "1" ]; then
+ echo "Platform-specific Swift generated headers are not identical. Merging them is required and is not yet implemented."
+ exit 1
+ fi
+ find $build_intermediates_path -name $module_name-Swift.h -exec cp {} $os_path/Headers \; -quit
+ fi
+
# Copy *.bcsymbolmap to .framework for submitting app with bitcode
copy_bcsymbolmap "$build_products_path/$config-$os$scope_suffix" "$os_path"
@@ -319,16 +336,16 @@ download_common() {
if [ "$download_type" == "core" ]; then
version=$REALM_CORE_VERSION
- url="https://static.realm.io/downloads/core/realm-core-${version}.tar.xz"
+ url="${REALM_BASE_URL}/core/realm-core-${version}.tar.xz"
elif [ "$download_type" == "sync" ]; then
version=$REALM_SYNC_VERSION
- url="https://static.realm.io/downloads/sync/realm-sync-cocoa-${version}.tar.xz"
+ url="${REALM_BASE_URL}/sync/realm-sync-cocoa-${version}.tar.xz"
else
echo "Unknown dowload_type: $download_type"
exit 1
fi
- echo "Downloading dependency: ${download_type} ${version}"
+ echo "Downloading dependency: ${download_type} ${version} from ${url}"
if [ -z "$TMPDIR" ]; then
TMPDIR='/tmp'
@@ -512,8 +529,8 @@ case "$COMMAND" in
"ios-swift")
sh build.sh ios-dynamic
- build_combined RealmSwift RealmSwift iphoneos iphonesimulator '' "/swift-$REALM_SWIFT_VERSION"
- cp -R build/ios/Realm.framework build/ios/swift-$REALM_SWIFT_VERSION
+ build_combined RealmSwift RealmSwift iphoneos iphonesimulator '' "/swift-$REALM_XCODE_VERSION"
+ cp -R build/ios/Realm.framework build/ios/swift-$REALM_XCODE_VERSION
exit 0
;;
@@ -524,8 +541,8 @@ case "$COMMAND" in
"watchos-swift")
sh build.sh watchos
- build_combined RealmSwift RealmSwift watchos watchsimulator '' "/swift-$REALM_SWIFT_VERSION"
- cp -R build/watchos/Realm.framework build/watchos/swift-$REALM_SWIFT_VERSION
+ build_combined RealmSwift RealmSwift watchos watchsimulator '' "/swift-$REALM_XCODE_VERSION"
+ cp -R build/watchos/Realm.framework build/watchos/swift-$REALM_XCODE_VERSION
exit 0
;;
@@ -536,8 +553,8 @@ case "$COMMAND" in
"tvos-swift")
sh build.sh tvos
- build_combined RealmSwift RealmSwift appletvos appletvsimulator '' "/swift-$REALM_SWIFT_VERSION"
- cp -R build/tvos/Realm.framework build/tvos/swift-$REALM_SWIFT_VERSION
+ build_combined RealmSwift RealmSwift appletvos appletvsimulator '' "/swift-$REALM_XCODE_VERSION"
+ cp -R build/tvos/Realm.framework build/tvos/swift-$REALM_XCODE_VERSION
exit 0
;;
@@ -550,7 +567,7 @@ case "$COMMAND" in
"osx-swift")
sh build.sh osx
xc "-scheme 'RealmSwift' -configuration $CONFIGURATION build"
- destination="build/osx/swift-$REALM_SWIFT_VERSION"
+ destination="build/osx/swift-$REALM_XCODE_VERSION"
clean_retrieve "build/DerivedData/Realm/Build/Products/$CONFIGURATION/RealmSwift.framework" "$destination" "RealmSwift.framework"
cp -R build/osx/Realm.framework "$destination"
exit 0
@@ -714,6 +731,10 @@ case "$COMMAND" in
fi
fi
+ sh build.sh verify-cocoapods-ios
+ sh build.sh verify-cocoapods-osx
+ sh build.sh verify-cocoapods-watchos
+
# https://github.com/CocoaPods/CocoaPods/issues/7708
export EXPANDED_CODE_SIGN_IDENTITY=''
cd examples/installation
@@ -726,6 +747,18 @@ case "$COMMAND" in
sh build.sh test-watchos-swift-cocoapods
;;
+ verify-cocoapods-*)
+ PLATFORM=$(echo $COMMAND | cut -d - -f 3)
+ # https://github.com/CocoaPods/CocoaPods/issues/7708
+ export EXPANDED_CODE_SIGN_IDENTITY=''
+ cd examples/installation
+ sh build.sh test-$PLATFORM-objc-cocoapods
+ sh build.sh test-$PLATFORM-swift-cocoapods
+ if [[ $PLATFORM = "ios" ]]; then
+ sh build.sh test-ios-objc-cocoapods-dynamic
+ fi
+ ;;
+
"verify-osx-encryption")
REALM_ENCRYPT_ALL=YES sh build.sh test-osx
exit 0
@@ -859,7 +892,7 @@ case "$COMMAND" in
sh build.sh prelaunch-simulator
workspace="examples/ios/swift/RealmExamples.xcworkspace"
if [[ ! -d "$workspace" ]]; then
- workspace="${workspace/swift/swift-$REALM_SWIFT_VERSION}"
+ workspace="${workspace/swift/swift-$REALM_XCODE_VERSION}"
fi
xc "-workspace $workspace -scheme Simple -configuration $CONFIGURATION -destination 'name=iPhone 6' build ${CODESIGN_PARAMS}"
@@ -891,7 +924,7 @@ case "$COMMAND" in
"examples-tvos-swift")
workspace="examples/tvos/swift/RealmExamples.xcworkspace"
if [[ ! -d "$workspace" ]]; then
- workspace="${workspace/swift/swift-$REALM_SWIFT_VERSION}"
+ workspace="${workspace/swift/swift-$REALM_XCODE_VERSION}"
fi
if (( $(xcode_version_major) >= 9 )); then
@@ -1056,7 +1089,9 @@ EOM
export sha=$GITHUB_PR_SOURCE_BRANCH
export CONFIGURATION=$configuration
export REALM_EXTRA_BUILD_ARGUMENTS='GCC_GENERATE_DEBUGGING_SYMBOLS=NO -allowProvisioningUpdates'
- sh build.sh prelaunch-simulator
+ if [[ ${target} != *"osx"* ]];then
+ sh build.sh prelaunch-simulator
+ fi
source $(brew --prefix nvm)/nvm.sh
export REALM_NODE_PATH="$(nvm which 8)"
@@ -1193,7 +1228,7 @@ EOM
package-*-swift)
PLATFORM=$(echo $COMMAND | cut -d - -f 2)
- for version in 9.2 9.3 9.4 10.0 10.1; do
+ for version in 9.2 9.3 9.4 10.0 10.1 10.2; do
REALM_XCODE_VERSION=$version
REALM_SWIFT_VERSION=
set_xcode_and_swift_versions
@@ -1202,65 +1237,20 @@ EOM
done
cd build/$PLATFORM
- ln -s swift-4.0.3 swift-3.2.3
- ln -s swift-4.1 swift-3.3
- ln -s swift-4.1.2 swift-3.3.2
- ln -s swift-4.2 swift-3.4
- ln -s swift-4.2.1 swift-3.4.1
- zip --symlinks -r realm-swift-framework-$PLATFORM.zip swift-3.2.3 swift-3.3 swift-3.3.2 swift-3.4 swift-3.4.1 swift-4.0.3 swift-4.1 swift-4.1.2 swift-4.2 swift-4.2.1
- ;;
-
- package-*-swift-3.2.3)
- PLATFORM=$(echo $COMMAND | cut -d - -f 2)
- mkdir -p build/$PLATFORM
- cd build/$PLATFORM
- ln -s swift-4.0.2 swift-3.2.3
- zip --symlinks -r realm-swift-framework-$PLATFORM-swift-3.2.3.zip swift-3.2.3
- ;;
-
- package-*-swift-3.3)
- PLATFORM=$(echo $COMMAND | cut -d - -f 2)
- mkdir -p build/$PLATFORM
- cd build/$PLATFORM
- ln -s swift-4.1 swift-3.3
- zip --symlinks -r realm-swift-framework-$PLATFORM-swift-3.3.zip swift-3.3
- ;;
-
- package-*-swift-3.3.2)
- PLATFORM=$(echo $COMMAND | cut -d - -f 2)
- mkdir -p build/$PLATFORM
- cd build/$PLATFORM
- ln -s swift-4.1.2 swift-3.3.2
- zip --symlinks -r realm-swift-framework-$PLATFORM-swift-3.3.2.zip swift-3.3.2
- ;;
-
- package-*-swift-3.4)
- PLATFORM=$(echo $COMMAND | cut -d - -f 2)
- mkdir -p build/$PLATFORM
- cd build/$PLATFORM
- ln -s swift-4.2 swift-3.4
- zip --symlinks -r realm-swift-framework-$PLATFORM-swift-3.4.zip swift-3.4
- ;;
-
- package-*-swift-3.4.1)
- PLATFORM=$(echo $COMMAND | cut -d - -f 2)
- mkdir -p build/$PLATFORM
- cd build/$PLATFORM
- ln -s swift-4.2.1 swift-3.4.1
- zip --symlinks -r realm-swift-framework-$PLATFORM-swift-3.4.1.zip swift-3.4.1
+ zip --symlinks -r realm-swift-framework-$PLATFORM.zip swift-9.2 swift-9.2 swift-9.4 swift-10.0 swift-10.1 swift-10.2
;;
package-*-swift-*)
PLATFORM=$(echo $COMMAND | cut -d - -f 2)
- REALM_SWIFT_VERSION=$(echo $COMMAND | cut -d - -f 4)
- REALM_XCODE_VERSION=
+ REALM_XCODE_VERSION=$(echo $COMMAND | cut -d - -f 4)
+ REALM_SWIFT_VERSION=
set_xcode_and_swift_versions
sh build.sh prelaunch-simulator
sh build.sh $PLATFORM-swift
cd build/$PLATFORM
- zip --symlinks -r realm-swift-framework-$PLATFORM-swift-$REALM_SWIFT_VERSION.zip swift-$REALM_SWIFT_VERSION
+ zip --symlinks -r realm-swift-framework-$PLATFORM-swift-$REALM_XCODE_VERSION.zip swift-$REALM_XCODE_VERSION
;;
"package-release")
diff --git a/Carthage/Checkouts/realm-cocoa/dependencies.list b/Carthage/Checkouts/realm-cocoa/dependencies.list
index ed27a7926..fa7d1cfb1 100644
--- a/Carthage/Checkouts/realm-cocoa/dependencies.list
+++ b/Carthage/Checkouts/realm-cocoa/dependencies.list
@@ -1,4 +1,4 @@
-VERSION=3.13.1
-REALM_CORE_VERSION=5.12.1
-REALM_SYNC_VERSION=3.13.3
+VERSION=3.14.1
+REALM_CORE_VERSION=5.14.0
+REALM_SYNC_VERSION=3.15.1
REALM_OBJECT_SERVER_VERSION=3.13.1
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/build.sh b/Carthage/Checkouts/realm-cocoa/examples/installation/build.sh
index 384a9bdf8..fd9b3143b 100755
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/build.sh
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/build.sh
@@ -37,6 +37,9 @@ EOF
COMMAND="$1"
+# https://github.com/CocoaPods/CocoaPods/issues/7708
+export EXPANDED_CODE_SIGN_IDENTITY=''
+
download_zip_if_needed() {
LANG="$1"
DIRECTORY=realm-$LANG-latest
@@ -86,7 +89,13 @@ xctest() {
fi
DESTINATION=""
if [[ $PLATFORM == ios ]]; then
- DESTINATION="-destination id=$(xcrun simctl list devices | grep -v unavailable | grep -m 1 -o '[0-9A-F\-]\{36\}')"
+ simulator_id="$(xcrun simctl list devices | grep -v unavailable | grep -m 1 -o '[0-9A-F\-]\{36\}')"
+ xcrun simctl boot $simulator_id
+ DESTINATION="-destination id=$simulator_id"
+ elif [[ $PLATFORM == watchos ]]; then
+ if xcrun simctl list devicetypes | grep -q 'iPhone Xs'; then
+ DESTINATION="-destination id=$(xcrun simctl list devices | grep -v unavailable | grep 'iPhone Xs' | grep -m 1 -o '[0-9A-F\-]\{36\}')"
+ fi
fi
CMD="-project $PROJECT"
if [ -d $WORKSPACE ]; then
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExample/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExample/Info.plist
index 78b719fcf..6905cc67b 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExample/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExample/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExampleTests/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExampleTests/Info.plist
index 0d400b711..ba72822e8 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExampleTests/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/CocoaPodsDynamicExampleTests/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/Podfile b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/Podfile
index 772c6e9a9..abf7004d6 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/Podfile
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsDynamicExample/Podfile
@@ -5,9 +5,9 @@ use_frameworks!
branch = ENV['sha']
target 'CocoaPodsDynamicExample' do
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
target 'CocoaPodsDynamicExampleTests' do
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExample/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExample/Info.plist
index 78b719fcf..6905cc67b 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExample/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExample/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
index 0d400b711..ba72822e8 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/Podfile b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/Podfile
index 8fe628848..4720c1e80 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/Podfile
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/CocoaPodsExample/Podfile
@@ -4,9 +4,9 @@
branch = ENV['sha']
target 'CocoaPodsExample' do
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
target 'CocoaPodsExampleTests' do
- pod 'Realm/Headers', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm/Headers', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExample/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExample/Info.plist
index 78b719fcf..6905cc67b 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExample/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExample/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExampleTests/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExampleTests/Info.plist
index 0d400b711..ba72822e8 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExampleTests/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/objc/DynamicExample/DynamicExampleTests/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExample/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExample/Info.plist
index 78b719fcf..6905cc67b 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExample/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExample/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExampleTests/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
index 0d400b711..ba72822e8 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/Podfile b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/Podfile
index b15a8c59f..24c78606e 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/Podfile
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/ios/swift/CocoaPodsExample/Podfile
@@ -5,20 +5,20 @@ branch = ENV['sha']
target 'CocoaPodsExample' do
use_frameworks!
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
- pod 'RealmSwift', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
target 'CocoaPodsExampleTests' do
use_frameworks!
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
- pod 'RealmSwift', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
- config.build_settings['SWIFT_VERSION'] = '3.0'
+ config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExample/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExample/Info.plist
index d3a869f96..34ad20fe2 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExample/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExample/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExampleTests/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExampleTests/Info.plist
index 0d400b711..ba72822e8 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExampleTests/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CarthageExample/CarthageExampleTests/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExample/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExample/Info.plist
index d3a869f96..34ad20fe2 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExample/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExample/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
index 0d400b711..ba72822e8 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/CocoaPodsExampleTests/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/Podfile b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/Podfile
index 8fe628848..4720c1e80 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/Podfile
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/CocoaPodsExample/Podfile
@@ -4,9 +4,9 @@
branch = ENV['sha']
target 'CocoaPodsExample' do
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
target 'CocoaPodsExampleTests' do
- pod 'Realm/Headers', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm/Headers', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExample/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExample/Info.plist
index d3a869f96..34ad20fe2 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExample/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExample/Info.plist
@@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExampleTests/Info.plist b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExampleTests/Info.plist
index 0d400b711..ba72822e8 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExampleTests/Info.plist
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/objc/DynamicExample/DynamicExampleTests/Info.plist
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
- <string>io.realm.$(PRODUCT_NAME:rfc1034identifier)</string>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/swift/CocoaPodsExample/Podfile b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/swift/CocoaPodsExample/Podfile
index b15a8c59f..24c78606e 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/osx/swift/CocoaPodsExample/Podfile
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/osx/swift/CocoaPodsExample/Podfile
@@ -5,20 +5,20 @@ branch = ENV['sha']
target 'CocoaPodsExample' do
use_frameworks!
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
- pod 'RealmSwift', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
target 'CocoaPodsExampleTests' do
use_frameworks!
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
- pod 'RealmSwift', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
- config.build_settings['SWIFT_VERSION'] = '3.0'
+ config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/objc/CocoaPodsExample/Podfile b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/objc/CocoaPodsExample/Podfile
index 40c3a24f8..1749015f8 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/objc/CocoaPodsExample/Podfile
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/objc/CocoaPodsExample/Podfile
@@ -3,5 +3,5 @@ branch = ENV['sha']
target 'CocoaPodsExample WatchKit Extension' do
platform :watchos, '2.0'
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CarthageExample/CarthageExample WatchKit Extension/InterfaceController.swift b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CarthageExample/CarthageExample WatchKit Extension/InterfaceController.swift
index 8d4db90f1..cf779dd7b 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CarthageExample/CarthageExample WatchKit Extension/InterfaceController.swift
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CarthageExample/CarthageExample WatchKit Extension/InterfaceController.swift
@@ -21,7 +21,7 @@ import WatchKit
import RealmSwift
class Counter: Object {
- dynamic var count = 0
+ @objc dynamic var count = 0
}
class InterfaceController: WKInterfaceController {
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/CocoaPodsExample WatchKit Extension/InterfaceController.swift b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/CocoaPodsExample WatchKit Extension/InterfaceController.swift
index 8d4db90f1..cf779dd7b 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/CocoaPodsExample WatchKit Extension/InterfaceController.swift
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/CocoaPodsExample WatchKit Extension/InterfaceController.swift
@@ -21,7 +21,7 @@ import WatchKit
import RealmSwift
class Counter: Object {
- dynamic var count = 0
+ @objc dynamic var count = 0
}
class InterfaceController: WKInterfaceController {
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/Podfile b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/Podfile
index 70f5646e3..101328cd3 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/Podfile
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/CocoaPodsExample/Podfile
@@ -3,14 +3,14 @@ branch = ENV['sha']
target 'CocoaPodsExample WatchKit Extension' do
platform :watchos, '2.0'
- pod 'Realm', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
- pod 'RealmSwift', git: 'git@github.com:realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'Realm', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
+ pod 'RealmSwift', git: 'https://github.com/realm/realm-cocoa.git', branch: branch, submodules: true
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
- config.build_settings['SWIFT_VERSION'] = '3.0'
+ config.build_settings['SWIFT_VERSION'] = '4.0'
end
end
end
diff --git a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/DynamicExample/DynamicExample WatchKit Extension/InterfaceController.swift b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/DynamicExample/DynamicExample WatchKit Extension/InterfaceController.swift
index 8d4db90f1..cf779dd7b 100644
--- a/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/DynamicExample/DynamicExample WatchKit Extension/InterfaceController.swift
+++ b/Carthage/Checkouts/realm-cocoa/examples/installation/watchos/swift/DynamicExample/DynamicExample WatchKit Extension/InterfaceController.swift
@@ -21,7 +21,7 @@ import WatchKit
import RealmSwift
class Counter: Object {
- dynamic var count = 0
+ @objc dynamic var count = 0
}
class InterfaceController: WKInterfaceController {
diff --git a/Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb b/Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb
index 2036a3efc..2793093c0 100755
--- a/Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb
+++ b/Carthage/Checkouts/realm-cocoa/scripts/package_examples.rb
@@ -41,7 +41,7 @@ base_examples = [
"examples/tvos/swift",
]
-swift_versions = %w(3.1 3.2 3.2.2 3.2.3 3.3 4.0 4.0.2 4.0.3 4.1 4.1.2)
+xcode_versions = %w(9.2 9.3 9.4 10.0 10.1)
# Remove reference to Realm.xcodeproj from all example workspaces.
base_examples.each do |example|
@@ -51,8 +51,8 @@ end
# Make a copy of each Swift example for each Swift version.
base_examples.each do |example|
if example =~ /\/swift$/
- swift_versions.each do |swift_version|
- FileUtils.cp_r example, "#{example}-#{swift_version}"
+ xcode_versions.each do |xcode_version|
+ FileUtils.cp_r example, "#{example}-#{xcode_version}"
end
FileUtils.rm_r example
end
@@ -63,9 +63,9 @@ framework_directory_for_example = {
'examples/osx/objc' => '../../../osx',
'examples/tvos/objc' => '../../../tvos'
}
-swift_versions.each do |swift_version|
- framework_directory_for_example["examples/ios/swift-#{swift_version}"] = "../../../ios/swift-#{swift_version}"
- framework_directory_for_example["examples/tvos/swift-#{swift_version}"] = "../../../tvos/swift-#{swift_version}"
+xcode_versions.each do |xcode_version|
+ framework_directory_for_example["examples/ios/swift-#{xcode_version}"] = "../../../ios/swift-#{xcode_version}"
+ framework_directory_for_example["examples/tvos/swift-#{xcode_version}"] = "../../../tvos/swift-#{xcode_version}"
end
# Update the paths to the prebuilt frameworks
@@ -78,8 +78,8 @@ end
# Update Playground imports and instructions
-swift_versions.each do |swift_version|
- playground_file = "examples/ios/swift-#{swift_version}/GettingStarted.playground/Contents.swift"
+xcode_versions.each do |xcode_version|
+ playground_file = "examples/ios/swift-#{xcode_version}/GettingStarted.playground/Contents.swift"
replace_in_file(playground_file, 'choose RealmSwift', 'choose PlaygroundFrameworkWrapper')
replace_in_file(playground_file,
"import Foundation\n",
diff --git a/Carthage/Checkouts/realm-cocoa/scripts/reset-simulators.rb b/Carthage/Checkouts/realm-cocoa/scripts/reset-simulators.rb
index 28a6709b9..070580329 100755
--- a/Carthage/Checkouts/realm-cocoa/scripts/reset-simulators.rb
+++ b/Carthage/Checkouts/realm-cocoa/scripts/reset-simulators.rb
@@ -44,10 +44,10 @@ begin
# CoreSimulatorService doesn't exit when sent SIGTERM
system('pkill -9 Simulator 2>/dev/null')
end
- puts ' done!'
-
wait_for_core_simulator_service
+ puts ' done!'
+ print 'Shut down existing simulator devices...'
# Shut down any running simulator devices. This may take multiple attempts if some
# simulators are currently in the process of booting or being created.
all_available_devices = []
@@ -68,6 +68,7 @@ begin
shutdown_simulator_devices all_available_devices
sleep shutdown_attempt if shutdown_attempt > 0
end
+ puts ' done!'
# Delete all simulators.
print 'Deleting all simulators...'
@@ -105,6 +106,10 @@ begin
end
puts ' done!'
+ print 'Booting iPhone 6 simulator...'
+ system("xcrun simctl boot 'iPhone 6'") or raise "Failed to boot iPhone 6 simulator"
+ puts ' done!'
+
rescue => e
if (attempts += 1) < 5
puts ''
diff --git a/Carthage/Checkouts/realm-cocoa/scripts/swift-version.sh b/Carthage/Checkouts/realm-cocoa/scripts/swift-version.sh
index c5b54be8e..b514f6a4b 100755
--- a/Carthage/Checkouts/realm-cocoa/scripts/swift-version.sh
+++ b/Carthage/Checkouts/realm-cocoa/scripts/swift-version.sh
@@ -10,19 +10,19 @@ get_xcode_version() {
find_xcode_with_version() {
local path required_version
-
+
if [ -z "$1" ]; then
echo "find_xcode_with_version requires an Xcode version" >&2
exit 1
fi
required_version=$1
-
+
# First check if the currently active one is fine, unless we are in a CI run
if [ -z "$JENKINS_HOME" ] && [[ $(get_xcode_version xcodebuild) = "$required_version" ]]; then
DEVELOPER_DIR=$(xcode-select -p)
return 0
fi
-
+
# Check all of the items in /Applications that look promising per #4534
for path in /Applications/Xcode*.app/Contents/Developer; do
if [ $(get_xcode_version "$path/usr/bin/xcodebuild") = "$required_version" ]; then
@@ -30,7 +30,7 @@ find_xcode_with_version() {
return 0
fi
done
-
+
# Use Spotlight to see if we can find others installed copies of Xcode
for path in $(/usr/bin/mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'" 2>/dev/null); do
path="$path/Contents/Developer"
@@ -54,7 +54,7 @@ test_xcode_for_swift_version() {
fi
local path=$1
local required_version=$2
-
+
for swift in "$path"/Toolchains/*.xctoolchain/usr/bin/swift; do
if [ $(get_swift_version "$swift") = "$required_version" ]; then
return 0
@@ -65,13 +65,13 @@ test_xcode_for_swift_version() {
find_xcode_for_swift() {
local path required_version
-
+
if [ -z "$1" ]; then
echo "find_xcode_for_swift requires a Swift version" >&2
exit 1
fi
required_version=$1
-
+
# First check if the currently active one is fine, unless we are in a CI run
if [ -z "$JENKINS_HOME" ] && test_xcode_for_swift_version "$(xcode-select -p)" "$required_version"; then
DEVELOPER_DIR=$(xcode-select -p)
@@ -85,7 +85,7 @@ find_xcode_for_swift() {
return 0
fi
done
-
+
# Use Spotlight to see if we can find others installed copies of Xcode
for path in $(/usr/bin/mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'" 2>/dev/null); do
path="$path/Contents/Developer"
@@ -97,7 +97,7 @@ find_xcode_for_swift() {
return 0
fi
done
-
+
echo "No version of Xcode found that supports Swift $required_version" >&2
exit 1
}
@@ -135,7 +135,7 @@ find_default_xcode_version() {
set_xcode_and_swift_versions() {
if [ -n "$REALM_XCODE_VERSION" ]; then
find_xcode_with_version $REALM_XCODE_VERSION
-
+
if [ -n "$REALM_SWIFT_VERSION" ] && ! test_xcode_for_swift_version "$DEVELOPER_DIR" "$REALM_SWIFT_VERSION"; then
echo "The version of Xcode specified ($REALM_XCODE_VERSION) does not support the Swift version required: $REALM_SWIFT_VERSION"
exit 1
@@ -149,7 +149,7 @@ set_xcode_and_swift_versions() {
REALM_XCODE_VERSION=$(get_xcode_version "$DEVELOPER_DIR/usr/bin/xcodebuild")
export REALM_XCODE_VERSION
-
+
if [ -z "$REALM_SWIFT_VERSION" ]; then
REALM_SWIFT_VERSION=$(get_swift_version "$(xcrun -f swift)")
fi
diff --git a/File Provider Extension/FileProviderData.swift b/File Provider Extension/FileProviderData.swift
index e184fdb5c..f320e1962 100644
--- a/File Provider Extension/FileProviderData.swift
+++ b/File Provider Extension/FileProviderData.swift
@@ -75,7 +75,7 @@ class FileProviderData: NSObject {
account = activeAccount.account
accountUser = activeAccount.user
accountUserID = activeAccount.userID
- accountPassword = activeAccount.password
+ accountPassword = CCUtility.getPassword(activeAccount.account)
accountUrl = activeAccount.url
homeServerUrl = CCUtility.getHomeServerUrlActiveUrl(activeAccount.url)
}
diff --git a/File Provider Extension/FileProviderExtension+Thumbnail.swift b/File Provider Extension/FileProviderExtension+Thumbnail.swift
index 32777c405..8d2b73f22 100644
--- a/File Provider Extension/FileProviderExtension+Thumbnail.swift
+++ b/File Provider Extension/FileProviderExtension+Thumbnail.swift
@@ -38,42 +38,42 @@ extension FileProviderExtension {
for itemIdentifier in itemIdentifiers {
- let metadata = providerData.getTableMetadataFromItemIdentifier(itemIdentifier)
- if metadata != nil {
+ guard let metadata = providerData.getTableMetadataFromItemIdentifier(itemIdentifier) else {
- if (metadata!.typeFile == k_metadataTypeFile_image || metadata!.typeFile == k_metadataTypeFile_video) {
-
- let width = NCUtility.sharedInstance.getScreenWidthForPreview()
- let height = NCUtility.sharedInstance.getScreenHeightForPreview()
-
- OCNetworking.sharedManager().downloadPreview(withAccount: providerData.account, metadata: metadata, withWidth: width, andHeight: height, completion: { (account, preview, message, errorCode) in
-
- if errorCode == 0 && account == self.providerData.account {
- do {
- let url = URL.init(fileURLWithPath: CCUtility.getDirectoryProviderStorageIconFileID(metadata!.fileID, fileNameView: metadata!.fileNameView))
- let data = try Data.init(contentsOf: url)
- perThumbnailCompletionHandler(itemIdentifier, data, nil)
- } catch let error {
- print("error: \(error)")
- perThumbnailCompletionHandler(itemIdentifier, nil, NSFileProviderError(.noSuchItem))
- }
- } else {
- perThumbnailCompletionHandler(itemIdentifier, nil, NSFileProviderError(.serverUnreachable))
- }
-
- counterProgress += 1
- if (counterProgress == progress.totalUnitCount) {
- completionHandler(nil)
+ counterProgress += 1
+ if (counterProgress == progress.totalUnitCount) {
+ completionHandler(nil)
+ }
+
+ continue
+ }
+
+ if (metadata.hasPreview == 1) {
+
+ let width = NCUtility.sharedInstance.getScreenWidthForPreview()
+ let height = NCUtility.sharedInstance.getScreenHeightForPreview()
+
+ OCNetworking.sharedManager().downloadPreview(withAccount: providerData.account, metadata: metadata, withWidth: width, andHeight: height, completion: { (account, preview, message, errorCode) in
+
+ if errorCode == 0 && account == self.providerData.account {
+ do {
+ let url = URL.init(fileURLWithPath: CCUtility.getDirectoryProviderStorageIconFileID(metadata.fileID, fileNameView: metadata.fileNameView))
+ let data = try Data.init(contentsOf: url)
+ perThumbnailCompletionHandler(itemIdentifier, data, nil)
+ } catch let error {
+ print("error: \(error)")
+ perThumbnailCompletionHandler(itemIdentifier, nil, NSFileProviderError(.noSuchItem))
}
- })
-
- } else {
+ } else {
+ perThumbnailCompletionHandler(itemIdentifier, nil, NSFileProviderError(.serverUnreachable))
+ }
counterProgress += 1
if (counterProgress == progress.totalUnitCount) {
completionHandler(nil)
}
- }
+ })
+
} else {
counterProgress += 1
diff --git a/File Provider Extension/FileProviderExtension-Bridging-Header.h b/File Provider Extension/FileProviderExtension-Bridging-Header.h
index a8cfbce2b..3c2dba831 100644
--- a/File Provider Extension/FileProviderExtension-Bridging-Header.h
+++ b/File Provider Extension/FileProviderExtension-Bridging-Header.h
@@ -29,9 +29,9 @@
#import "CCBKPasscode.h"
#import "CCUtility.h"
#import "NCEndToEndEncryption.h"
-
#import "OCActivity.h"
#import "OCUserProfile.h"
#import "OCCapabilities.h"
#import "OCExternalSites.h"
#import "OCSharedDto.h"
+#import "HCFeatures.h"
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics
deleted file mode 100755
index dd2c2c1e2..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/FirebaseAnalytics
+++ /dev/null
Binary files differ
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h
deleted file mode 100755
index d499af668..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics+AppDelegate.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#import "FIRAnalytics.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * Provides App Delegate handlers to be used in your App Delegate.
- *
- * To save time integrating Firebase Analytics in an application, Firebase Analytics does not
- * require delegation implementation from the AppDelegate. Instead this is automatically done by
- * Firebase Analytics. Should you choose instead to delegate manually, you can turn off the App
- * Delegate Proxy by adding FirebaseAppDelegateProxyEnabled into your app's Info.plist and setting
- * it to NO, and adding the methods in this category to corresponding delegation handlers.
- *
- * To handle Universal Links, you must return YES in
- * [UIApplicationDelegate application:didFinishLaunchingWithOptions:].
- */
-@interface FIRAnalytics (AppDelegate)
-
-/**
- * Handles events related to a URL session that are waiting to be processed.
- *
- * For optimal use of Firebase Analytics, call this method from the
- * [UIApplicationDelegate application:handleEventsForBackgroundURLSession:completionHandler]
- * method of the app delegate in your app.
- *
- * @param identifier The identifier of the URL session requiring attention.
- * @param completionHandler The completion handler to call when you finish processing the events.
- * Calling this completion handler lets the system know that your app's user interface is
- * updated and a new snapshot can be taken.
- */
-+ (void)handleEventsForBackgroundURLSession:(NSString *)identifier
- completionHandler:(nullable void (^)(void))completionHandler;
-
-/**
- * Handles the event when the app is launched by a URL.
- *
- * Call this method from [UIApplicationDelegate application:openURL:options:] &#40;on iOS 9.0 and
- * above&#41;, or [UIApplicationDelegate application:openURL:sourceApplication:annotation:] &#40;on
- * iOS 8.x and below&#41; in your app.
- *
- * @param url The URL resource to open. This resource can be a network resource or a file.
- */
-+ (void)handleOpenURL:(NSURL *)url;
-
-/**
- * Handles the event when the app receives data associated with user activity that includes a
- * Universal Link (on iOS 9.0 and above).
- *
- * Call this method from [UIApplication continueUserActivity:restorationHandler:] in your app
- * delegate (on iOS 9.0 and above).
- *
- * @param userActivity The activity object containing the data associated with the task the user
- * was performing.
- */
-+ (void)handleUserActivity:(id)userActivity;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h
deleted file mode 100755
index 39d23f18f..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalytics.h
+++ /dev/null
@@ -1,119 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#import "FIREventNames.h"
-#import "FIRParameterNames.h"
-#import "FIRUserPropertyNames.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// The top level Firebase Analytics singleton that provides methods for logging events and setting
-/// user properties. See <a href="http://goo.gl/gz8SLz">the developer guides</a> for general
-/// information on using Firebase Analytics in your apps.
-NS_SWIFT_NAME(Analytics)
-@interface FIRAnalytics : NSObject
-
-/// Logs an app event. The event can have up to 25 parameters. Events with the same name must have
-/// the same parameters. Up to 500 event names are supported. Using predefined events and/or
-/// parameters is recommended for optimal reporting.
-///
-/// The following event names are reserved and cannot be used:
-/// <ul>
-/// <li>ad_activeview</li>
-/// <li>ad_click</li>
-/// <li>ad_exposure</li>
-/// <li>ad_impression</li>
-/// <li>ad_query</li>
-/// <li>adunit_exposure</li>
-/// <li>app_clear_data</li>
-/// <li>app_remove</li>
-/// <li>app_update</li>
-/// <li>error</li>
-/// <li>first_open</li>
-/// <li>in_app_purchase</li>
-/// <li>notification_dismiss</li>
-/// <li>notification_foreground</li>
-/// <li>notification_open</li>
-/// <li>notification_receive</li>
-/// <li>os_update</li>
-/// <li>screen_view</li>
-/// <li>session_start</li>
-/// <li>user_engagement</li>
-/// </ul>
-///
-/// @param name The name of the event. Should contain 1 to 40 alphanumeric characters or
-/// underscores. The name must start with an alphabetic character. Some event names are
-/// reserved. See FIREventNames.h for the list of reserved event names. The "firebase_",
-/// "google_", and "ga_" prefixes are reserved and should not be used. Note that event names are
-/// case-sensitive and that logging two events whose names differ only in case will result in
-/// two distinct events.
-/// @param parameters The dictionary of event parameters. Passing nil indicates that the event has
-/// no parameters. Parameter names can be up to 40 characters long and must start with an
-/// alphabetic character and contain only alphanumeric characters and underscores. Only NSString
-/// and NSNumber (signed 64-bit integer and 64-bit floating-point number) parameter types are
-/// supported. NSString parameter values can be up to 100 characters long. The "firebase_",
-/// "google_", and "ga_" prefixes are reserved and should not be used for parameter names.
-+ (void)logEventWithName:(NSString *)name
- parameters:(nullable NSDictionary<NSString *, id> *)parameters
- NS_SWIFT_NAME(logEvent(_:parameters:));
-
-/// Sets a user property to a given value. Up to 25 user property names are supported. Once set,
-/// user property values persist throughout the app lifecycle and across sessions.
-///
-/// The following user property names are reserved and cannot be used:
-/// <ul>
-/// <li>first_open_time</li>
-/// <li>last_deep_link_referrer</li>
-/// <li>user_id</li>
-/// </ul>
-///
-/// @param value The value of the user property. Values can be up to 36 characters long. Setting the
-/// value to nil removes the user property.
-/// @param name The name of the user property to set. Should contain 1 to 24 alphanumeric characters
-/// or underscores and must start with an alphabetic character. The "firebase_", "google_", and
-/// "ga_" prefixes are reserved and should not be used for user property names.
-+ (void)setUserPropertyString:(nullable NSString *)value forName:(NSString *)name
- NS_SWIFT_NAME(setUserProperty(_:forName:));
-
-/// Sets the user ID property. This feature must be used in accordance with
-/// <a href="https://www.google.com/policies/privacy">Google's Privacy Policy</a>
-///
-/// @param userID The user ID to ascribe to the user of this app on this device, which must be
-/// non-empty and no more than 256 characters long. Setting userID to nil removes the user ID.
-+ (void)setUserID:(nullable NSString *)userID;
-
-/// Sets the current screen name, which specifies the current visual context in your app. This helps
-/// identify the areas in your app where users spend their time and how they interact with your app.
-/// Must be called on the main thread.
-///
-/// Note that screen reporting is enabled automatically and records the class name of the current
-/// UIViewController for you without requiring you to call this method. If you implement
-/// viewDidAppear in your UIViewController but do not call [super viewDidAppear:], that screen class
-/// will not be automatically tracked. The class name can optionally be overridden by calling this
-/// method in the viewDidAppear callback of your UIViewController and specifying the
-/// screenClassOverride parameter. setScreenName:screenClass: must be called after
-/// [super viewDidAppear:].
-///
-/// If your app does not use a distinct UIViewController for each screen, you should call this
-/// method and specify a distinct screenName each time a new screen is presented to the user.
-///
-/// The screen name and screen class remain in effect until the current UIViewController changes or
-/// a new call to setScreenName:screenClass: is made.
-///
-/// @param screenName The name of the current screen. Should contain 1 to 100 characters. Set to nil
-/// to clear the current screen name.
-/// @param screenClassOverride The name of the screen class. Should contain 1 to 100 characters. By
-/// default this is the class name of the current UIViewController. Set to nil to revert to the
-/// default class name.
-+ (void)setScreenName:(nullable NSString *)screenName
- screenClass:(nullable NSString *)screenClassOverride;
-
-/// The unique ID for this instance of the application.
-+ (NSString *)appInstanceID;
-
-/// Clears all analytics data for this instance from the device and resets the app instance ID.
-/// FIRAnalyticsConfiguration values will be reset to the default values.
-+ (void)resetAnalyticsData;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h
deleted file mode 100755
index 50fbf2e2d..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRAnalyticsSwiftNameSupport.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef FIR_SWIFT_NAME
-
-#import <Foundation/Foundation.h>
-
-// NS_SWIFT_NAME can only translate factory methods before the iOS 9.3 SDK.
-// Wrap it in our own macro if it's a non-compatible SDK.
-#ifdef __IPHONE_9_3
-#define FIR_SWIFT_NAME(X) NS_SWIFT_NAME(X)
-#else
-#define FIR_SWIFT_NAME(X) // Intentionally blank.
-#endif // #ifdef __IPHONE_9_3
-
-#endif // FIR_SWIFT_NAME
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h
deleted file mode 100755
index c70c53e25..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIREventNames.h
+++ /dev/null
@@ -1,407 +0,0 @@
-/// @file FIREventNames.h
-///
-/// Predefined event names.
-///
-/// An Event is an important occurrence in your app that you want to measure. You can report up to
-/// 500 different types of Events per app and you can associate up to 25 unique parameters with each
-/// Event type. Some common events are suggested below, but you may also choose to specify custom
-/// Event types that are associated with your specific app. Each event type is identified by a
-/// unique name. Event names can be up to 40 characters long, may only contain alphanumeric
-/// characters and underscores ("_"), and must start with an alphabetic character. The "firebase_",
-/// "google_", and "ga_" prefixes are reserved and should not be used.
-
-#import <Foundation/Foundation.h>
-
-/// Add Payment Info event. This event signifies that a user has submitted their payment information
-/// to your app.
-static NSString *const kFIREventAddPaymentInfo NS_SWIFT_NAME(AnalyticsEventAddPaymentInfo) =
- @"add_payment_info";
-
-/// E-Commerce Add To Cart event. This event signifies that an item was added to a cart for
-/// purchase. Add this event to a funnel with kFIREventEcommercePurchase to gauge the effectiveness
-/// of your checkout process. Note: If you supply the @c kFIRParameterValue parameter, you must
-/// also supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed
-/// accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventAddToCart NS_SWIFT_NAME(AnalyticsEventAddToCart) = @"add_to_cart";
-
-/// E-Commerce Add To Wishlist event. This event signifies that an item was added to a wishlist.
-/// Use this event to identify popular gift items in your app. Note: If you supply the
-/// @c kFIRParameterValue parameter, you must also supply the @c kFIRParameterCurrency
-/// parameter so that revenue metrics can be computed accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// </ul>
-static NSString *const kFIREventAddToWishlist NS_SWIFT_NAME(AnalyticsEventAddToWishlist) =
- @"add_to_wishlist";
-
-/// App Open event. By logging this event when an App becomes active, developers can understand how
-/// often users leave and return during the course of a Session. Although Sessions are automatically
-/// reported, this event can provide further clarification around the continuous engagement of
-/// app-users.
-static NSString *const kFIREventAppOpen NS_SWIFT_NAME(AnalyticsEventAppOpen) = @"app_open";
-
-/// E-Commerce Begin Checkout event. This event signifies that a user has begun the process of
-/// checking out. Add this event to a funnel with your kFIREventEcommercePurchase event to gauge the
-/// effectiveness of your checkout process. Note: If you supply the @c kFIRParameterValue
-/// parameter, you must also supply the @c kFIRParameterCurrency parameter so that revenue
-/// metrics can be computed accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterTransactionID (NSString) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional)
-/// for travel bookings</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterTravelClass (NSString) (optional) for travel bookings</li>
-/// </ul>
-static NSString *const kFIREventBeginCheckout NS_SWIFT_NAME(AnalyticsEventBeginCheckout) =
- @"begin_checkout";
-
-/// Campaign Detail event. Log this event to supply the referral details of a re-engagement
-/// campaign. Note: you must supply at least one of the required parameters kFIRParameterSource,
-/// kFIRParameterMedium or kFIRParameterCampaign. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterSource (NSString)</li>
-/// <li>@c kFIRParameterMedium (NSString)</li>
-/// <li>@c kFIRParameterCampaign (NSString)</li>
-/// <li>@c kFIRParameterTerm (NSString) (optional)</li>
-/// <li>@c kFIRParameterContent (NSString) (optional)</li>
-/// <li>@c kFIRParameterAdNetworkClickID (NSString) (optional)</li>
-/// <li>@c kFIRParameterCP1 (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventCampaignDetails NS_SWIFT_NAME(AnalyticsEventCampaignDetails) =
- @"campaign_details";
-
-/// Checkout progress. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterCheckoutStep (unsigned 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterCheckoutOption (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventCheckoutProgress NS_SWIFT_NAME(AnalyticsEventCheckoutProgress) =
- @"checkout_progress";
-
-/// Earn Virtual Currency event. This event tracks the awarding of virtual currency in your app. Log
-/// this along with @c kFIREventSpendVirtualCurrency to better understand your virtual economy.
-/// Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterVirtualCurrencyName (NSString)</li>
-/// <li>@c kFIRParameterValue (signed 64-bit integer or double as NSNumber)</li>
-/// </ul>
-static NSString *const kFIREventEarnVirtualCurrency
- NS_SWIFT_NAME(AnalyticsEventEarnVirtualCurrency) = @"earn_virtual_currency";
-
-/// E-Commerce Purchase event. This event signifies that an item was purchased by a user. Note:
-/// This is different from the in-app purchase event, which is reported automatically for App
-/// Store-based apps. Note: If you supply the @c kFIRParameterValue parameter, you must also
-/// supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed
-/// accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterTransactionID (NSString) (optional)</li>
-/// <li>@c kFIRParameterTax (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterShipping (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCoupon (NSString) (optional)</li>
-/// <li>@c kFIRParameterLocation (NSString) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional)
-/// for travel bookings</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterTravelClass (NSString) (optional) for travel bookings</li>
-/// </ul>
-static NSString *const kFIREventEcommercePurchase NS_SWIFT_NAME(AnalyticsEventEcommercePurchase) =
- @"ecommerce_purchase";
-
-/// Generate Lead event. Log this event when a lead has been generated in the app to understand the
-/// efficacy of your install and re-engagement campaigns. Note: If you supply the
-/// @c kFIRParameterValue parameter, you must also supply the @c kFIRParameterCurrency
-/// parameter so that revenue metrics can be computed accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// </ul>
-static NSString *const kFIREventGenerateLead NS_SWIFT_NAME(AnalyticsEventGenerateLead) =
- @"generate_lead";
-
-/// Join Group event. Log this event when a user joins a group such as a guild, team or family. Use
-/// this event to analyze how popular certain groups or social features are in your app. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterGroupID (NSString)</li>
-/// </ul>
-static NSString *const kFIREventJoinGroup NS_SWIFT_NAME(AnalyticsEventJoinGroup) = @"join_group";
-
-/// Level Up event. This event signifies that a player has leveled up in your gaming app. It can
-/// help you gauge the level distribution of your userbase and help you identify certain levels that
-/// are difficult to pass. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterLevel (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterCharacter (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventLevelUp NS_SWIFT_NAME(AnalyticsEventLevelUp) = @"level_up";
-
-/// Login event. Apps with a login feature can report this event to signify that a user has logged
-/// in.
-static NSString *const kFIREventLogin NS_SWIFT_NAME(AnalyticsEventLogin) = @"login";
-
-/// Post Score event. Log this event when the user posts a score in your gaming app. This event can
-/// help you understand how users are actually performing in your game and it can help you correlate
-/// high scores with certain audiences or behaviors. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterScore (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterLevel (signed 64-bit integer as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCharacter (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventPostScore NS_SWIFT_NAME(AnalyticsEventPostScore) = @"post_score";
-
-/// Present Offer event. This event signifies that the app has presented a purchase offer to a user.
-/// Add this event to a funnel with the kFIREventAddToCart and kFIREventEcommercePurchase to gauge
-/// your conversion process. Note: If you supply the @c kFIRParameterValue parameter, you must
-/// also supply the @c kFIRParameterCurrency parameter so that revenue metrics can be computed
-/// accurately. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// </ul>
-static NSString *const kFIREventPresentOffer NS_SWIFT_NAME(AnalyticsEventPresentOffer) =
- @"present_offer";
-
-/// E-Commerce Purchase Refund event. This event signifies that an item purchase was refunded.
-/// Note: If you supply the @c kFIRParameterValue parameter, you must also supply the
-/// @c kFIRParameterCurrency parameter so that revenue metrics can be computed accurately.
-/// Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterTransactionID (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventPurchaseRefund NS_SWIFT_NAME(AnalyticsEventPurchaseRefund) =
- @"purchase_refund";
-
-/// Remove from cart event. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// </ul>
-static NSString *const kFIREventRemoveFromCart NS_SWIFT_NAME(AnalyticsEventRemoveFromCart) =
- @"remove_from_cart";
-
-/// Search event. Apps that support search features can use this event to contextualize search
-/// operations by supplying the appropriate, corresponding parameters. This event can help you
-/// identify the most popular content in your app. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterSearchTerm (NSString)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for
-/// hotel bookings</li>
-/// <li>@c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional)
-/// for travel bookings</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterTravelClass (NSString) (optional) for travel bookings</li>
-/// </ul>
-static NSString *const kFIREventSearch NS_SWIFT_NAME(AnalyticsEventSearch) = @"search";
-
-/// Select Content event. This general purpose event signifies that a user has selected some content
-/// of a certain type in an app. The content can be any object in your app. This event can help you
-/// identify popular content and categories of content in your app. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterContentType (NSString)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// </ul>
-static NSString *const kFIREventSelectContent NS_SWIFT_NAME(AnalyticsEventSelectContent) =
- @"select_content";
-
-/// Set checkout option. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterCheckoutStep (unsigned 64-bit integer as NSNumber)</li>
-/// <li>@c kFIRParameterCheckoutOption (NSString)</li>
-/// </ul>
-static NSString *const kFIREventSetCheckoutOption NS_SWIFT_NAME(AnalyticsEventSetCheckoutOption) =
- @"set_checkout_option";
-
-/// Share event. Apps with social features can log the Share event to identify the most viral
-/// content. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterContentType (NSString)</li>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// </ul>
-static NSString *const kFIREventShare NS_SWIFT_NAME(AnalyticsEventShare) = @"share";
-
-/// Sign Up event. This event indicates that a user has signed up for an account in your app. The
-/// parameter signifies the method by which the user signed up. Use this event to understand the
-/// different behaviors between logged in and logged out users. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterSignUpMethod (NSString)</li>
-/// </ul>
-static NSString *const kFIREventSignUp NS_SWIFT_NAME(AnalyticsEventSignUp) = @"sign_up";
-
-/// Spend Virtual Currency event. This event tracks the sale of virtual goods in your app and can
-/// help you identify which virtual goods are the most popular objects of purchase. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterVirtualCurrencyName (NSString)</li>
-/// <li>@c kFIRParameterValue (signed 64-bit integer or double as NSNumber)</li>
-/// </ul>
-static NSString *const kFIREventSpendVirtualCurrency
- NS_SWIFT_NAME(AnalyticsEventSpendVirtualCurrency) = @"spend_virtual_currency";
-
-/// Tutorial Begin event. This event signifies the start of the on-boarding process in your app. Use
-/// this in a funnel with kFIREventTutorialComplete to understand how many users complete this
-/// process and move on to the full app experience.
-static NSString *const kFIREventTutorialBegin NS_SWIFT_NAME(AnalyticsEventTutorialBegin) =
- @"tutorial_begin";
-
-/// Tutorial End event. Use this event to signify the user's completion of your app's on-boarding
-/// process. Add this to a funnel with kFIREventTutorialBegin to gauge the completion rate of your
-/// on-boarding process.
-static NSString *const kFIREventTutorialComplete NS_SWIFT_NAME(AnalyticsEventTutorialComplete) =
- @"tutorial_complete";
-
-/// Unlock Achievement event. Log this event when the user has unlocked an achievement in your
-/// game. Since achievements generally represent the breadth of a gaming experience, this event can
-/// help you understand how many users are experiencing all that your game has to offer. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterAchievementID (NSString)</li>
-/// </ul>
-static NSString *const kFIREventUnlockAchievement NS_SWIFT_NAME(AnalyticsEventUnlockAchievement) =
- @"unlock_achievement";
-
-/// View Item event. This event signifies that some content was shown to the user. This content may
-/// be a product, a webpage or just a simple image or text. Use the appropriate parameters to
-/// contextualize the event. Use this event to discover the most popular items viewed in your app.
-/// Note: If you supply the @c kFIRParameterValue parameter, you must also supply the
-/// @c kFIRParameterCurrency parameter so that revenue metrics can be computed accurately.
-/// Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterItemID (NSString)</li>
-/// <li>@c kFIRParameterItemName (NSString)</li>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// <li>@c kFIRParameterItemLocationID (NSString) (optional)</li>
-/// <li>@c kFIRParameterPrice (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterQuantity (signed 64-bit integer as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterCurrency (NSString) (optional)</li>
-/// <li>@c kFIRParameterValue (double as NSNumber) (optional)</li>
-/// <li>@c kFIRParameterStartDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterEndDate (NSString) (optional)</li>
-/// <li>@c kFIRParameterFlightNumber (NSString) (optional) for travel bookings</li>
-/// <li>@c kFIRParameterNumberOfPassengers (signed 64-bit integer as NSNumber) (optional)
-/// for travel bookings</li>
-/// <li>@c kFIRParameterNumberOfNights (signed 64-bit integer as NSNumber) (optional) for
-/// travel bookings</li>
-/// <li>@c kFIRParameterNumberOfRooms (signed 64-bit integer as NSNumber) (optional) for
-/// travel bookings</li>
-/// <li>@c kFIRParameterOrigin (NSString) (optional)</li>
-/// <li>@c kFIRParameterDestination (NSString) (optional)</li>
-/// <li>@c kFIRParameterSearchTerm (NSString) (optional) for travel bookings</li>
-/// <li>@c kFIRParameterTravelClass (NSString) (optional) for travel bookings</li>
-/// </ul>
-static NSString *const kFIREventViewItem NS_SWIFT_NAME(AnalyticsEventViewItem) = @"view_item";
-
-/// View Item List event. Log this event when the user has been presented with a list of items of a
-/// certain category. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterItemCategory (NSString)</li>
-/// </ul>
-static NSString *const kFIREventViewItemList NS_SWIFT_NAME(AnalyticsEventViewItemList) =
- @"view_item_list";
-
-/// View Search Results event. Log this event when the user has been presented with the results of a
-/// search. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterSearchTerm (NSString)</li>
-/// </ul>
-static NSString *const kFIREventViewSearchResults NS_SWIFT_NAME(AnalyticsEventViewSearchResults) =
- @"view_search_results";
-
-/// Level Start event. Log this event when the user starts a new level. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterLevelName (NSString)</li>
-/// </ul>
-static NSString *const kFIREventLevelStart NS_SWIFT_NAME(AnalyticsEventLevelStart) =
- @"level_start";
-
-/// Level End event. Log this event when the user finishes a level. Params:
-///
-/// <ul>
-/// <li>@c kFIRParameterLevelName (NSString)</li>
-/// <li>@c kFIRParameterSuccess (NSString)</li>
-/// </ul>
-static NSString *const kFIREventLevelEnd NS_SWIFT_NAME(AnalyticsEventLevelEnd) = @"level_end";
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h
deleted file mode 100755
index 4e1366ce9..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRParameterNames.h
+++ /dev/null
@@ -1,507 +0,0 @@
-/// @file FIRParameterNames.h
-///
-/// Predefined event parameter names.
-///
-/// Params supply information that contextualize Events. You can associate up to 25 unique Params
-/// with each Event type. Some Params are suggested below for certain common Events, but you are
-/// not limited to these. You may supply extra Params for suggested Events or custom Params for
-/// Custom events. Param names can be up to 40 characters long, may only contain alphanumeric
-/// characters and underscores ("_"), and must start with an alphabetic character. Param values can
-/// be up to 100 characters long. The "firebase_", "google_", and "ga_" prefixes are reserved and
-/// should not be used.
-
-#import <Foundation/Foundation.h>
-
-/// Game achievement ID (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterAchievementID : @"10_matches_won",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterAchievementID NS_SWIFT_NAME(AnalyticsParameterAchievementID) =
- @"achievement_id";
-
-/// Ad Network Click ID (NSString). Used for network-specific click IDs which vary in format.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterAdNetworkClickID : @"1234567",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterAdNetworkClickID
- NS_SWIFT_NAME(AnalyticsParameterAdNetworkClickID) = @"aclid";
-
-/// The store or affiliation from which this transaction occurred (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterAffiliation : @"Google Store",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterAffiliation NS_SWIFT_NAME(AnalyticsParameterAffiliation) =
- @"affiliation";
-
-/// The individual campaign name, slogan, promo code, etc. Some networks have pre-defined macro to
-/// capture campaign information, otherwise can be populated by developer. Highly Recommended
-/// (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCampaign : @"winter_promotion",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCampaign NS_SWIFT_NAME(AnalyticsParameterCampaign) =
- @"campaign";
-
-/// Character used in game (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCharacter : @"beat_boss",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCharacter NS_SWIFT_NAME(AnalyticsParameterCharacter) =
- @"character";
-
-/// The checkout step (1..N) (unsigned 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCheckoutStep : @"1",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCheckoutStep NS_SWIFT_NAME(AnalyticsParameterCheckoutStep) =
- @"checkout_step";
-
-/// Some option on a step in an ecommerce flow (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCheckoutOption : @"Visa",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCheckoutOption
- NS_SWIFT_NAME(AnalyticsParameterCheckoutOption) = @"checkout_option";
-
-/// Campaign content (NSString).
-static NSString *const kFIRParameterContent NS_SWIFT_NAME(AnalyticsParameterContent) = @"content";
-
-/// Type of content selected (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterContentType : @"news article",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterContentType NS_SWIFT_NAME(AnalyticsParameterContentType) =
- @"content_type";
-
-/// Coupon code for a purchasable item (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCoupon : @"zz123",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCoupon NS_SWIFT_NAME(AnalyticsParameterCoupon) = @"coupon";
-
-/// Campaign custom parameter (NSString). Used as a method of capturing custom data in a campaign.
-/// Use varies by network.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCP1 : @"custom_data",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCP1 NS_SWIFT_NAME(AnalyticsParameterCP1) = @"cp1";
-
-/// The name of a creative used in a promotional spot (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCreativeName : @"Summer Sale",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCreativeName NS_SWIFT_NAME(AnalyticsParameterCreativeName) =
- @"creative_name";
-
-/// The name of a creative slot (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCreativeSlot : @"summer_banner2",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCreativeSlot NS_SWIFT_NAME(AnalyticsParameterCreativeSlot) =
- @"creative_slot";
-
-/// Purchase currency in 3-letter <a href="http://en.wikipedia.org/wiki/ISO_4217#Active_codes">
-/// ISO_4217</a> format (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterCurrency : @"USD",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterCurrency NS_SWIFT_NAME(AnalyticsParameterCurrency) =
- @"currency";
-
-/// Flight or Travel destination (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterDestination : @"Mountain View, CA",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterDestination NS_SWIFT_NAME(AnalyticsParameterDestination) =
- @"destination";
-
-/// The arrival date, check-out date or rental end date for the item. This should be in
-/// YYYY-MM-DD format (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterEndDate : @"2015-09-14",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterEndDate NS_SWIFT_NAME(AnalyticsParameterEndDate) = @"end_date";
-
-/// Flight number for travel events (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterFlightNumber : @"ZZ800",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterFlightNumber NS_SWIFT_NAME(AnalyticsParameterFlightNumber) =
- @"flight_number";
-
-/// Group/clan/guild ID (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterGroupID : @"g1",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterGroupID NS_SWIFT_NAME(AnalyticsParameterGroupID) = @"group_id";
-
-/// Index of an item in a list (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterIndex : @(1),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterIndex NS_SWIFT_NAME(AnalyticsParameterIndex) = @"index";
-
-/// Item brand (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemBrand : @"Google",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemBrand NS_SWIFT_NAME(AnalyticsParameterItemBrand) =
- @"item_brand";
-
-/// Item category (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemCategory : @"t-shirts",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemCategory NS_SWIFT_NAME(AnalyticsParameterItemCategory) =
- @"item_category";
-
-/// Item ID (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemID : @"p7654",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemID NS_SWIFT_NAME(AnalyticsParameterItemID) = @"item_id";
-
-/// The Google <a href="https://developers.google.com/places/place-id">Place ID</a> (NSString) that
-/// corresponds to the associated item. Alternatively, you can supply your own custom Location ID.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemLocationID : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemLocationID
- NS_SWIFT_NAME(AnalyticsParameterItemLocationID) = @"item_location_id";
-
-/// Item name (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemName : @"abc",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemName NS_SWIFT_NAME(AnalyticsParameterItemName) =
- @"item_name";
-
-/// The list in which the item was presented to the user (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemList : @"Search Results",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemList NS_SWIFT_NAME(AnalyticsParameterItemList) =
- @"item_list";
-
-/// Item variant (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterItemVariant : @"Red",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterItemVariant NS_SWIFT_NAME(AnalyticsParameterItemVariant) =
- @"item_variant";
-
-/// Level in game (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterLevel : @(42),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterLevel NS_SWIFT_NAME(AnalyticsParameterLevel) = @"level";
-
-/// Location (NSString). The Google <a href="https://developers.google.com/places/place-id">Place ID
-/// </a> that corresponds to the associated event. Alternatively, you can supply your own custom
-/// Location ID.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterLocation : @"ChIJiyj437sx3YAR9kUWC8QkLzQ",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterLocation NS_SWIFT_NAME(AnalyticsParameterLocation) =
- @"location";
-
-/// The advertising or marketing medium, for example: cpc, banner, email, push. Highly recommended
-/// (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterMedium : @"email",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterMedium NS_SWIFT_NAME(AnalyticsParameterMedium) = @"medium";
-
-/// Number of nights staying at hotel (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterNumberOfNights : @(3),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterNumberOfNights
- NS_SWIFT_NAME(AnalyticsParameterNumberOfNights) = @"number_of_nights";
-
-/// Number of passengers traveling (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterNumberOfPassengers : @(11),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterNumberOfPassengers
- NS_SWIFT_NAME(AnalyticsParameterNumberOfPassengers) = @"number_of_passengers";
-
-/// Number of rooms for travel events (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterNumberOfRooms : @(2),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterNumberOfRooms NS_SWIFT_NAME(AnalyticsParameterNumberOfRooms) =
- @"number_of_rooms";
-
-/// Flight or Travel origin (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterOrigin : @"Mountain View, CA",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterOrigin NS_SWIFT_NAME(AnalyticsParameterOrigin) = @"origin";
-
-/// Purchase price (double as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterPrice : @(1.0),
-/// kFIRParameterCurrency : @"USD", // e.g. $1.00 USD
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterPrice NS_SWIFT_NAME(AnalyticsParameterPrice) = @"price";
-
-/// Purchase quantity (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterQuantity : @(1),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterQuantity NS_SWIFT_NAME(AnalyticsParameterQuantity) =
- @"quantity";
-
-/// Score in game (signed 64-bit integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterScore : @(4200),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterScore NS_SWIFT_NAME(AnalyticsParameterScore) = @"score";
-
-/// The search string/keywords used (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterSearchTerm : @"periodic table",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterSearchTerm NS_SWIFT_NAME(AnalyticsParameterSearchTerm) =
- @"search_term";
-
-/// Shipping cost (double as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterShipping : @(9.50),
-/// kFIRParameterCurrency : @"USD", // e.g. $9.50 USD
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterShipping NS_SWIFT_NAME(AnalyticsParameterShipping) =
- @"shipping";
-
-/// Sign up method (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterSignUpMethod : @"google",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterSignUpMethod NS_SWIFT_NAME(AnalyticsParameterSignUpMethod) =
- @"sign_up_method";
-
-/// The origin of your traffic, such as an Ad network (for example, google) or partner (urban
-/// airship). Identify the advertiser, site, publication, etc. that is sending traffic to your
-/// property. Highly recommended (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterSource : @"InMobi",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterSource NS_SWIFT_NAME(AnalyticsParameterSource) = @"source";
-
-/// The departure date, check-in date or rental start date for the item. This should be in
-/// YYYY-MM-DD format (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterStartDate : @"2015-09-14",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterStartDate NS_SWIFT_NAME(AnalyticsParameterStartDate) =
- @"start_date";
-
-/// Tax amount (double as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterTax : @(1.0),
-/// kFIRParameterCurrency : @"USD", // e.g. $1.00 USD
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterTax NS_SWIFT_NAME(AnalyticsParameterTax) = @"tax";
-
-/// If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword
-/// (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterTerm : @"game",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterTerm NS_SWIFT_NAME(AnalyticsParameterTerm) = @"term";
-
-/// A single ID for a ecommerce group transaction (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterTransactionID : @"ab7236dd9823",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterTransactionID NS_SWIFT_NAME(AnalyticsParameterTransactionID) =
- @"transaction_id";
-
-/// Travel class (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterTravelClass : @"business",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterTravelClass NS_SWIFT_NAME(AnalyticsParameterTravelClass) =
- @"travel_class";
-
-/// A context-specific numeric value which is accumulated automatically for each event type. This is
-/// a general purpose parameter that is useful for accumulating a key metric that pertains to an
-/// event. Examples include revenue, distance, time and points. Value should be specified as signed
-/// 64-bit integer or double as NSNumber. Notes: Values for pre-defined currency-related events
-/// (such as @c kFIREventAddToCart) should be supplied using double as NSNumber and must be
-/// accompanied by a @c kFIRParameterCurrency parameter. The valid range of accumulated values is
-/// [-9,223,372,036,854.77, 9,223,372,036,854.77]. Supplying a non-numeric value, omitting the
-/// corresponding @c kFIRParameterCurrency parameter, or supplying an invalid
-/// <a href="https://goo.gl/qqX3J2">currency code</a> for conversion events will cause that
-/// conversion to be omitted from reporting.
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterValue : @(3.99),
-/// kFIRParameterCurrency : @"USD", // e.g. $3.99 USD
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterValue NS_SWIFT_NAME(AnalyticsParameterValue) = @"value";
-
-/// Name of virtual currency type (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterVirtualCurrencyName : @"virtual_currency_name",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterVirtualCurrencyName
- NS_SWIFT_NAME(AnalyticsParameterVirtualCurrencyName) = @"virtual_currency_name";
-
-/// The name of a level in a game (NSString).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterLevelName : @"room_1",
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterLevelName NS_SWIFT_NAME(AnalyticsParameterLevelName) =
- @"level_name";
-
-/// The result of an operation. Specify 1 to indicate success and 0 to indicate failure (unsigned
-/// integer as NSNumber).
-/// <pre>
-/// NSDictionary *params = @{
-/// kFIRParameterSuccess : @(1),
-/// // ...
-/// };
-/// </pre>
-static NSString *const kFIRParameterSuccess NS_SWIFT_NAME(AnalyticsParameterSuccess) = @"success";
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h
deleted file mode 100755
index f50707fa1..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FIRUserPropertyNames.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/// @file FIRUserPropertyNames.h
-///
-/// Predefined user property names.
-///
-/// A UserProperty is an attribute that describes the app-user. By supplying UserProperties, you can
-/// later analyze different behaviors of various segments of your userbase. You may supply up to 25
-/// unique UserProperties per app, and you can use the name and value of your choosing for each one.
-/// UserProperty names can be up to 24 characters long, may only contain alphanumeric characters and
-/// underscores ("_"), and must start with an alphabetic character. UserProperty values can be up to
-/// 36 characters long. The "firebase_", "google_", and "ga_" prefixes are reserved and should not
-/// be used.
-
-#import <Foundation/Foundation.h>
-
-/// The method used to sign in. For example, "google", "facebook" or "twitter".
-static NSString *const kFIRUserPropertySignUpMethod
- NS_SWIFT_NAME(AnalyticsUserPropertySignUpMethod) = @"sign_up_method";
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h
deleted file mode 100755
index 80f987188..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Headers/FirebaseAnalytics.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#import "FIRAnalytics+AppDelegate.h"
-#import "FIRAnalytics.h"
-#import "FIRAnalyticsSwiftNameSupport.h"
-#import "FIREventNames.h"
-#import "FIRParameterNames.h"
-#import "FIRUserPropertyNames.h"
diff --git a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap b/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap
deleted file mode 100755
index ef80595cd..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseAnalytics.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,10 +0,0 @@
-framework module FirebaseAnalytics {
- umbrella header "FirebaseAnalytics.h"
- export *
- module * { export *}
- link "sqlite3"
- link "z"
- link framework "Security"
- link framework "StoreKit"
- link framework "SystemConfiguration"
- link framework "UIKit"}
diff --git a/Libraries external/Firebase/Analytics/FirebaseCore.framework/FirebaseCore b/Libraries external/Firebase/Analytics/FirebaseCore.framework/FirebaseCore
deleted file mode 100644
index b414c9d5b..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCore.framework/FirebaseCore
+++ /dev/null
Binary files differ
diff --git a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h b/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h
deleted file mode 100644
index ca1d32c6e..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRAnalyticsConfiguration.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * This class provides configuration fields for Firebase Analytics.
- */
-NS_SWIFT_NAME(AnalyticsConfiguration)
-@interface FIRAnalyticsConfiguration : NSObject
-
-/**
- * Returns the shared instance of FIRAnalyticsConfiguration.
- */
-+ (FIRAnalyticsConfiguration *)sharedInstance NS_SWIFT_NAME(shared());
-
-/**
- * Sets the minimum engagement time in seconds required to start a new session. The default value
- * is 10 seconds.
- */
-- (void)setMinimumSessionInterval:(NSTimeInterval)minimumSessionInterval;
-
-/**
- * Sets the interval of inactivity in seconds that terminates the current session. The default
- * value is 1800 seconds (30 minutes).
- */
-- (void)setSessionTimeoutInterval:(NSTimeInterval)sessionTimeoutInterval;
-
-/**
- * Sets whether analytics collection is enabled for this app on this device. This setting is
- * persisted across app sessions. By default it is enabled.
- */
-- (void)setAnalyticsCollectionEnabled:(BOOL)analyticsCollectionEnabled;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h b/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h
deleted file mode 100644
index fb18b75e2..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRApp.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-@class FIROptions;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** A block that takes a BOOL and has no return value. */
-typedef void (^FIRAppVoidBoolCallback)(BOOL success) NS_SWIFT_NAME(FirebaseAppVoidBoolCallback);
-
-/**
- * The entry point of Firebase SDKs.
- *
- * Initialize and configure FIRApp using +[FIRApp configure]
- * or other customized ways as shown below.
- *
- * The logging system has two modes: default mode and debug mode. In default mode, only logs with
- * log level Notice, Warning and Error will be sent to device. In debug mode, all logs will be sent
- * to device. The log levels that Firebase uses are consistent with the ASL log levels.
- *
- * Enable debug mode by passing the -FIRDebugEnabled argument to the application. You can add this
- * argument in the application's Xcode scheme. When debug mode is enabled via -FIRDebugEnabled,
- * further executions of the application will also be in debug mode. In order to return to default
- * mode, you must explicitly disable the debug mode with the application argument -FIRDebugDisabled.
- *
- * It is also possible to change the default logging level in code by calling setLoggerLevel: on
- * the FIRConfiguration interface.
- */
-NS_SWIFT_NAME(FirebaseApp)
-@interface FIRApp : NSObject
-
-/**
- * Configures a default Firebase app. Raises an exception if any configuration step fails. The
- * default app is named "__FIRAPP_DEFAULT". This method should be called after the app is launched
- * and before using Firebase services. This method is thread safe and contains synchronous file I/O
- * (reading GoogleService-Info.plist from disk).
- */
-+ (void)configure;
-
-/**
- * Configures the default Firebase app with the provided options. The default app is named
- * "__FIRAPP_DEFAULT". Raises an exception if any configuration step fails. This method is thread
- * safe.
- *
- * @param options The Firebase application options used to configure the service.
- */
-+ (void)configureWithOptions:(FIROptions *)options NS_SWIFT_NAME(configure(options:));
-
-/**
- * Configures a Firebase app with the given name and options. Raises an exception if any
- * configuration step fails. This method is thread safe.
- *
- * @param name The application's name given by the developer. The name should should only contain
- Letters, Numbers and Underscore.
- * @param options The Firebase application options used to configure the services.
- */
-// clang-format off
-+ (void)configureWithName:(NSString *)name
- options:(FIROptions *)options NS_SWIFT_NAME(configure(name:options:));
-// clang-format on
-
-/**
- * Returns the default app, or nil if the default app does not exist.
- */
-+ (nullable FIRApp *)defaultApp NS_SWIFT_NAME(app());
-
-/**
- * Returns a previously created FIRApp instance with the given name, or nil if no such app exists.
- * This method is thread safe.
- */
-+ (nullable FIRApp *)appNamed:(NSString *)name NS_SWIFT_NAME(app(name:));
-
-/**
- * Returns the set of all extant FIRApp instances, or nil if there are no FIRApp instances. This
- * method is thread safe.
- */
-@property(class, readonly, nullable) NSDictionary<NSString *, FIRApp *> *allApps;
-
-/**
- * Cleans up the current FIRApp, freeing associated data and returning its name to the pool for
- * future use. This method is thread safe.
- */
-- (void)deleteApp:(FIRAppVoidBoolCallback)completion;
-
-/**
- * FIRApp instances should not be initialized directly. Call +[FIRApp configure],
- * +[FIRApp configureWithOptions:], or +[FIRApp configureWithNames:options:] directly.
- */
-- (instancetype)init NS_UNAVAILABLE;
-
-/**
- * Gets the name of this app.
- */
-@property(nonatomic, copy, readonly) NSString *name;
-
-/**
- * Gets a copy of the options for this app. These are non-modifiable.
- */
-@property(nonatomic, copy, readonly) FIROptions *options;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h b/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h
deleted file mode 100644
index 95bba5e7b..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRConfiguration.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-#import "FIRAnalyticsConfiguration.h"
-#import "FIRLoggerLevel.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * This interface provides global level properties that the developer can tweak, and the singleton
- * of the Firebase Analytics configuration class.
- */
-NS_SWIFT_NAME(FirebaseConfiguration)
-@interface FIRConfiguration : NSObject
-
-/** Returns the shared configuration object. */
-@property(class, nonatomic, readonly) FIRConfiguration *sharedInstance NS_SWIFT_NAME(shared);
-
-/** The configuration class for Firebase Analytics. */
-@property(nonatomic, readwrite) FIRAnalyticsConfiguration *analyticsConfiguration;
-
-/**
- * Sets the logging level for internal Firebase logging. Firebase will only log messages
- * that are logged at or below loggerLevel. The messages are logged both to the Xcode
- * console and to the device's log. Note that if an app is running from AppStore, it will
- * never log above FIRLoggerLevelNotice even if loggerLevel is set to a higher (more verbose)
- * setting.
- *
- * @param loggerLevel The maximum logging level. The default level is set to FIRLoggerLevelNotice.
- */
-- (void)setLoggerLevel:(FIRLoggerLevel)loggerLevel;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h b/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h
deleted file mode 100644
index 8b6579fc5..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIRLoggerLevel.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * The log levels used by internal logging.
- */
-typedef NS_ENUM(NSInteger, FIRLoggerLevel) {
- /** Error level, matches ASL_LEVEL_ERR. */
- FIRLoggerLevelError = 3,
- /** Warning level, matches ASL_LEVEL_WARNING. */
- FIRLoggerLevelWarning = 4,
- /** Notice level, matches ASL_LEVEL_NOTICE. */
- FIRLoggerLevelNotice = 5,
- /** Info level, matches ASL_LEVEL_NOTICE. */
- FIRLoggerLevelInfo = 6,
- /** Debug level, matches ASL_LEVEL_DEBUG. */
- FIRLoggerLevelDebug = 7,
- /** Minimum log level. */
- FIRLoggerLevelMin = FIRLoggerLevelError,
- /** Maximum log level. */
- FIRLoggerLevelMax = FIRLoggerLevelDebug
-} NS_SWIFT_NAME(FirebaseLoggerLevel);
diff --git a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h b/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h
deleted file mode 100644
index 87a01ddc7..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FIROptions.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * This class provides constant fields of Google APIs.
- */
-NS_SWIFT_NAME(FirebaseOptions)
-@interface FIROptions : NSObject <NSCopying>
-
-/**
- * Returns the default options. The first time this is called it synchronously reads
- * GoogleService-Info.plist from disk.
- */
-+ (nullable FIROptions *)defaultOptions NS_SWIFT_NAME(defaultOptions());
-
-/**
- * An iOS API key used for authenticating requests from your app, e.g.
- * @"AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk", used to identify your app to Google servers.
- */
-@property(nonatomic, copy, nullable) NSString *APIKey NS_SWIFT_NAME(apiKey);
-
-/**
- * The bundle ID for the application. Defaults to `[[NSBundle mainBundle] bundleID]` when not set
- * manually or in a plist.
- */
-@property(nonatomic, copy) NSString *bundleID;
-
-/**
- * The OAuth2 client ID for iOS application used to authenticate Google users, for example
- * @"12345.apps.googleusercontent.com", used for signing in with Google.
- */
-@property(nonatomic, copy, nullable) NSString *clientID;
-
-/**
- * The tracking ID for Google Analytics, e.g. @"UA-12345678-1", used to configure Google Analytics.
- */
-@property(nonatomic, copy, nullable) NSString *trackingID;
-
-/**
- * The Project Number from the Google Developer's console, for example @"012345678901", used to
- * configure Google Cloud Messaging.
- */
-@property(nonatomic, copy) NSString *GCMSenderID NS_SWIFT_NAME(gcmSenderID);
-
-/**
- * The Project ID from the Firebase console, for example @"abc-xyz-123".
- */
-@property(nonatomic, copy, nullable) NSString *projectID;
-
-/**
- * The Android client ID used in Google AppInvite when an iOS app has its Android version, for
- * example @"12345.apps.googleusercontent.com".
- */
-@property(nonatomic, copy, nullable) NSString *androidClientID;
-
-/**
- * The Google App ID that is used to uniquely identify an instance of an app.
- */
-@property(nonatomic, copy) NSString *googleAppID;
-
-/**
- * The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com".
- */
-@property(nonatomic, copy, nullable) NSString *databaseURL;
-
-/**
- * The URL scheme used to set up Durable Deep Link service.
- */
-@property(nonatomic, copy, nullable) NSString *deepLinkURLScheme;
-
-/**
- * The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com".
- */
-@property(nonatomic, copy, nullable) NSString *storageBucket;
-
-/**
- * Initializes a customized instance of FIROptions from the file at the given plist file path. This
- * will read the file synchronously from disk.
- * For example,
- * NSString *filePath =
- * [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
- * FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
- * Returns nil if the plist file does not exist or is invalid.
- */
-- (nullable instancetype)initWithContentsOfFile:(NSString *)plistPath;
-
-/**
- * Initializes a customized instance of FIROptions with required fields. Use the mutable properties
- * to modify fields for configuring specific services.
- */
-// clang-format off
-- (instancetype)initWithGoogleAppID:(NSString *)googleAppID
- GCMSenderID:(NSString *)GCMSenderID
- NS_SWIFT_NAME(init(googleAppID:gcmSenderID:));
-// clang-format on
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h b/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h
deleted file mode 100644
index fa26f694b..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Headers/FirebaseCore.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import "FIRAnalyticsConfiguration.h"
-#import "FIRApp.h"
-#import "FIRConfiguration.h"
-#import "FIRLoggerLevel.h"
-#import "FIROptions.h"
diff --git a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap b/Libraries external/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap
deleted file mode 100644
index 9b473a9f9..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCore.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,7 +0,0 @@
-framework module FirebaseCore {
- umbrella header "FirebaseCore.h"
- export *
- module * { export *}
- link framework "Foundation"
- link framework "SystemConfiguration"
-}
diff --git a/Libraries external/Firebase/Analytics/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics b/Libraries external/Firebase/Analytics/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics
deleted file mode 100755
index b8965da58..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics
+++ /dev/null
Binary files differ
diff --git a/Libraries external/Firebase/Analytics/FirebaseCoreDiagnostics.framework/Modules/module.modulemap b/Libraries external/Firebase/Analytics/FirebaseCoreDiagnostics.framework/Modules/module.modulemap
deleted file mode 100755
index bbcb94e31..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseCoreDiagnostics.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,6 +0,0 @@
-framework module FirebaseCoreDiagnostics {
- export *
- module * { export *}
- link "z"
- link framework "Security"
- link framework "SystemConfiguration"}
diff --git a/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID b/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID
deleted file mode 100755
index 1cfa487a5..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/FirebaseInstanceID
+++ /dev/null
Binary files differ
diff --git a/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h b/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h
deleted file mode 100755
index 97777e1c3..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FIRInstanceID.h
+++ /dev/null
@@ -1,304 +0,0 @@
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@class FIRInstanceIDResult;
-/**
- * @memberof FIRInstanceID
- *
- * The scope to be used when fetching/deleting a token for Firebase Messaging.
- */
-FOUNDATION_EXPORT NSString *const kFIRInstanceIDScopeFirebaseMessaging
- NS_SWIFT_NAME(InstanceIDScopeFirebaseMessaging);
-
-#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-/**
- * Called when the system determines that tokens need to be refreshed.
- * This method is also called if Instance ID has been reset in which
- * case, tokens and FCM topic subscriptions also need to be refreshed.
- *
- * Instance ID service will throttle the refresh event across all devices
- * to control the rate of token updates on application servers.
- */
-FOUNDATION_EXPORT const NSNotificationName kFIRInstanceIDTokenRefreshNotification
- NS_SWIFT_NAME(InstanceIDTokenRefresh);
-#else
-/**
- * Called when the system determines that tokens need to be refreshed.
- * This method is also called if Instance ID has been reset in which
- * case, tokens and FCM topic subscriptions also need to be refreshed.
- *
- * Instance ID service will throttle the refresh event across all devices
- * to control the rate of token updates on application servers.
- */
-FOUNDATION_EXPORT NSString *const kFIRInstanceIDTokenRefreshNotification
- NS_SWIFT_NAME(InstanceIDTokenRefreshNotification);
-#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the InstanceID token returns. If
- * the call fails we return the appropriate `error code` as described below.
- *
- * @param token The valid token as returned by InstanceID backend.
- *
- * @param error The error describing why generating a new token
- * failed. See the error codes below for a more detailed
- * description.
- */
-typedef void (^FIRInstanceIDTokenHandler)(NSString *__nullable token, NSError *__nullable error)
- NS_SWIFT_NAME(InstanceIDTokenHandler);
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the InstanceID `deleteToken` returns. If
- * the call fails we return the appropriate `error code` as described below
- *
- * @param error The error describing why deleting the token failed.
- * See the error codes below for a more detailed description.
- */
-typedef void (^FIRInstanceIDDeleteTokenHandler)(NSError *error)
- NS_SWIFT_NAME(InstanceIDDeleteTokenHandler);
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the app identity is created. If the
- * identity wasn't created for some reason we return the appropriate error code.
- *
- * @param identity A valid identity for the app instance, nil if there was an error
- * while creating an identity.
- * @param error The error if fetching the identity fails else nil.
- */
-typedef void (^FIRInstanceIDHandler)(NSString *__nullable identity, NSError *__nullable error)
- NS_SWIFT_NAME(InstanceIDHandler);
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the app identity and all the tokens associated
- * with it are deleted. Returns a valid error object in case of failure else nil.
- *
- * @param error The error if deleting the identity and all the tokens associated with
- * it fails else nil.
- */
-typedef void (^FIRInstanceIDDeleteHandler)(NSError *__nullable error)
- NS_SWIFT_NAME(InstanceIDDeleteHandler);
-
-/**
- * @related FIRInstanceID
- *
- * The completion handler invoked when the app identity and token are fetched. If the
- * identity wasn't created for some reason we return the appropriate error code.
- *
- * @param result The result containing an identity for the app instance and a valid token,
- * nil if there was an error while creating the result.
- * @param error The error if fetching the identity or token fails else nil.
- */
-typedef void (^FIRInstanceIDResultHandler)(FIRInstanceIDResult *__nullable result,
- NSError *__nullable error)
- NS_SWIFT_NAME(InstanceIDResultHandler);
-
-/**
- * Public errors produced by InstanceID.
- */
-typedef NS_ENUM(NSUInteger, FIRInstanceIDError) {
- // Http related errors.
-
- /// Unknown error.
- FIRInstanceIDErrorUnknown = 0,
-
- /// Auth Error -- GCM couldn't validate request from this client.
- FIRInstanceIDErrorAuthentication = 1,
-
- /// NoAccess -- InstanceID service cannot be accessed.
- FIRInstanceIDErrorNoAccess = 2,
-
- /// Timeout -- Request to InstanceID backend timed out.
- FIRInstanceIDErrorTimeout = 3,
-
- /// Network -- No network available to reach the servers.
- FIRInstanceIDErrorNetwork = 4,
-
- /// OperationInProgress -- Another similar operation in progress,
- /// bailing this one.
- FIRInstanceIDErrorOperationInProgress = 5,
-
- /// InvalidRequest -- Some parameters of the request were invalid.
- FIRInstanceIDErrorInvalidRequest = 7,
-} NS_SWIFT_NAME(InstanceIDError);
-
-/**
- * A class contains the results of InstanceID and token query.
- */
-NS_SWIFT_NAME(InstanceIDResult)
-@interface FIRInstanceIDResult : NSObject <NSCopying>
-
-/**
- * An instanceID uniquely identifies the app instance.
- */
-@property(nonatomic, readonly, copy) NSString *instanceID;
-
-/*
- * Returns a Firebase Messaging scoped token for the firebase app.
- */
-@property(nonatomic, readonly, copy) NSString *token;
-
-@end
-
-/**
- * Instance ID provides a unique identifier for each app instance and a mechanism
- * to authenticate and authorize actions (for example, sending an FCM message).
- *
- * Once an InstanceID is generated, the library periodically sends information about the
- * application and the device where it's running to the Firebase backend. To stop this. see
- * `[FIRInstanceID deleteIDWithHandler:]`.
- *
- * Instance ID is long lived but, may be reset if the device is not used for
- * a long time or the Instance ID service detects a problem.
- * If Instance ID is reset, the app will be notified via
- * `kFIRInstanceIDTokenRefreshNotification`.
- *
- * If the Instance ID has become invalid, the app can request a new one and
- * send it to the app server.
- * To prove ownership of Instance ID and to allow servers to access data or
- * services associated with the app, call
- * `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`.
- */
-NS_SWIFT_NAME(InstanceID)
-@interface FIRInstanceID : NSObject
-
-/**
- * FIRInstanceID.
- *
- * @return A shared instance of FIRInstanceID.
- */
-+ (instancetype)instanceID NS_SWIFT_NAME(instanceID());
-
-/**
- * Unavailable. Use +instanceID instead.
- */
-- (instancetype)init __attribute__((unavailable("Use +instanceID instead.")));
-
-#pragma mark - Tokens
-
-/**
- * Returns a result of app instance identifier InstanceID and a Firebase Messaging scoped token.
- * param handler The callback handler invoked when an app instanceID and a default token
- * are generated and returned. If instanceID and token fetching fail for some
- * reason the callback is invoked with nil `result` and the appropriate error.
- */
-- (void)instanceIDWithHandler:(FIRInstanceIDResultHandler)handler;
-
-/**
- * Returns a Firebase Messaging scoped token for the firebase app.
- *
- * @return Returns the stored token if the device has registered with Firebase Messaging, otherwise
- * returns nil.
- */
-- (nullable NSString *)token __deprecated_msg("Use instanceIDWithHandler: instead.");
-
-/**
- * Returns a token that authorizes an Entity (example: cloud service) to perform
- * an action on behalf of the application identified by Instance ID.
- *
- * This is similar to an OAuth2 token except, it applies to the
- * application instance instead of a user.
- *
- * This is an asynchronous call. If the token fetching fails for some reason
- * we invoke the completion callback with nil `token` and the appropriate
- * error.
- *
- * This generates an Instance ID if it does not exist yet, which starts periodically sending
- * information to the Firebase backend (see `[FIRInstanceID getIDWithHandler:]`).
- *
- * Note, you can only have one `token` or `deleteToken` call for a given
- * authorizedEntity and scope at any point of time. Making another such call with the
- * same authorizedEntity and scope before the last one finishes will result in an
- * error with code `OperationInProgress`.
- *
- * @see FIRInstanceID deleteTokenWithAuthorizedEntity:scope:handler:
- *
- * @param authorizedEntity Entity authorized by the token.
- * @param scope Action authorized for authorizedEntity.
- * @param options The extra options to be sent with your token request. The
- * value for the `apns_token` should be the NSData object
- * passed to the UIApplicationDelegate's
- * `didRegisterForRemoteNotificationsWithDeviceToken` method.
- * The value for `apns_sandbox` should be a boolean (or an
- * NSNumber representing a BOOL in Objective C) set to true if
- * your app is a debug build, which means that the APNs
- * device token is for the sandbox environment. It should be
- * set to false otherwise. If the `apns_sandbox` key is not
- * provided, an automatically-detected value shall be used.
- * @param handler The callback handler which is invoked when the token is
- * successfully fetched. In case of success a valid `token` and
- * `nil` error are returned. In case of any error the `token`
- * is nil and a valid `error` is returned. The valid error
- * codes have been documented above.
- */
-- (void)tokenWithAuthorizedEntity:(NSString *)authorizedEntity
- scope:(NSString *)scope
- options:(nullable NSDictionary *)options
- handler:(FIRInstanceIDTokenHandler)handler;
-
-/**
- * Revokes access to a scope (action) for an entity previously
- * authorized by `[FIRInstanceID tokenWithAuthorizedEntity:scope:options:handler]`.
- *
- * This is an asynchronous call. Call this on the main thread since InstanceID lib
- * is not thread safe. In case token deletion fails for some reason we invoke the
- * `handler` callback passed in with the appropriate error code.
- *
- * Note, you can only have one `token` or `deleteToken` call for a given
- * authorizedEntity and scope at a point of time. Making another such call with the
- * same authorizedEntity and scope before the last one finishes will result in an error
- * with code `OperationInProgress`.
- *
- * @param authorizedEntity Entity that must no longer have access.
- * @param scope Action that entity is no longer authorized to perform.
- * @param handler The handler that is invoked once the unsubscribe call ends.
- * In case of error an appropriate error object is returned
- * else error is nil.
- */
-- (void)deleteTokenWithAuthorizedEntity:(NSString *)authorizedEntity
- scope:(NSString *)scope
- handler:(FIRInstanceIDDeleteTokenHandler)handler;
-
-#pragma mark - Identity
-
-/**
- * Asynchronously fetch a stable identifier that uniquely identifies the app
- * instance. If the identifier has been revoked or has expired, this method will
- * return a new identifier.
- *
- * Once an InstanceID is generated, the library periodically sends information about the
- * application and the device where it's running to the Firebase backend. To stop this. see
- * `[FIRInstanceID deleteIDWithHandler:]`.
- *
- * @param handler The handler to invoke once the identifier has been fetched.
- * In case of error an appropriate error object is returned else
- * a valid identifier is returned and a valid identifier for the
- * application instance.
- */
-- (void)getIDWithHandler:(FIRInstanceIDHandler)handler NS_SWIFT_NAME(getID(handler:));
-
-/**
- * Resets Instance ID and revokes all tokens.
- *
- * This method also triggers a request to fetch a new Instance ID and Firebase Messaging scope
- * token. Please listen to kFIRInstanceIDTokenRefreshNotification when the new ID and token are
- * ready.
- *
- * This stops the periodic sending of data to the Firebase backend that began when the Instance ID
- * was generated. No more data is sent until another library calls Instance ID internally again
- * (like FCM, RemoteConfig or Analytics) or user explicitly calls Instance ID APIs to get an
- * Instance ID and token again.
- */
-- (void)deleteIDWithHandler:(FIRInstanceIDDeleteHandler)handler NS_SWIFT_NAME(deleteID(handler:));
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h b/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h
deleted file mode 100755
index 053ec2b1c..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Headers/FirebaseInstanceID.h
+++ /dev/null
@@ -1 +0,0 @@
-#import "FIRInstanceID.h"
diff --git a/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap b/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap
deleted file mode 100755
index 6ab7f1be5..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseInstanceID.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,7 +0,0 @@
-framework module FirebaseInstanceID {
- umbrella header "FirebaseInstanceID.h"
- export *
- module * { export *}
- link "z"
- link framework "Security"
- link framework "SystemConfiguration"}
diff --git a/Libraries external/Firebase/Analytics/FirebaseNanoPB.framework/FirebaseNanoPB b/Libraries external/Firebase/Analytics/FirebaseNanoPB.framework/FirebaseNanoPB
deleted file mode 100755
index 1a317d6f4..000000000
--- a/Libraries external/Firebase/Analytics/FirebaseNanoPB.framework/FirebaseNanoPB
+++ /dev/null
Binary files differ
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac
deleted file mode 100644
index 2c58d161e..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/GoogleToolboxForMac
+++ /dev/null
Binary files differ
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDebugSelectorValidation.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDebugSelectorValidation.h
deleted file mode 100644
index c90caeb1f..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDebugSelectorValidation.h
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// GTMDebugSelectorValidation.h
-//
-// This file should only be included within an implimation file. In any
-// function that takes an object and selector to invoke, you should call:
-//
-// GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, @encode(arg1type), ..., NULL)
-// or
-// GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(obj, sel, @encode(returnType), @encode(arg1type), ..., NULL)
-//
-// This will then validate that the selector is defined and using the right
-// type(s), this can help catch errors much earlier then waiting for the
-// selector to actually fire (and in the case of error selectors, might never
-// really be tested until in the field).
-//
-// Copyright 2007-2008 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#if DEBUG
-
-#import <stdarg.h>
-#import "GTMDefines.h"
-
-static void GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(id obj, SEL sel, const char *retType, ...) {
-
- // verify that the object's selector is implemented with the proper
- // number and type of arguments
- va_list argList;
- va_start(argList, retType);
-
- if (obj && sel) {
- // check that the selector is implemented
- _GTMDevAssert([obj respondsToSelector:sel],
- @"\"%@\" selector \"%@\" is unimplemented or misnamed",
- NSStringFromClass([obj class]),
- NSStringFromSelector(sel));
-
- const char *expectedArgType;
- NSUInteger argCount = 2; // skip self and _cmd
- NSMethodSignature *sig = [obj methodSignatureForSelector:sel];
-
- // check that each expected argument is present and of the correct type
- while ((expectedArgType = va_arg(argList, const char*)) != 0) {
-
- if ([sig numberOfArguments] > argCount) {
- const char *foundArgType = [sig getArgumentTypeAtIndex:argCount];
-
- _GTMDevAssert(0 == strncmp(foundArgType, expectedArgType, strlen(expectedArgType)),
- @"\"%@\" selector \"%@\" argument %u should be type %s",
- NSStringFromClass([obj class]),
- NSStringFromSelector(sel),
- (uint32_t)(argCount - 2),
- expectedArgType);
- }
- argCount++;
- }
-
- // check that the proper number of arguments are present in the selector
- _GTMDevAssert(argCount == [sig numberOfArguments],
- @"\"%@\" selector \"%@\" should have %u arguments",
- NSStringFromClass([obj class]),
- NSStringFromSelector(sel),
- (uint32_t)(argCount - 2));
-
- // if asked, validate the return type
- if (retType && (strcmp("gtm_skip_return_test", retType) != 0)) {
- const char *foundRetType = [sig methodReturnType];
- _GTMDevAssert(0 == strncmp(foundRetType, retType, strlen(retType)),
- @"\"%@\" selector \"%@\" return type should be type %s",
- NSStringFromClass([obj class]),
- NSStringFromSelector(sel),
- retType);
- }
- }
-
- va_end(argList);
-}
-
-#define GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, ...) \
- GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments((obj), (sel), "gtm_skip_return_test", __VA_ARGS__)
-
-#else // DEBUG
-
-// make it go away if not debug
-#define GTMAssertSelectorNilOrImplementedWithReturnTypeAndArguments(obj, sel, retType, ...) do { } while (0)
-#define GTMAssertSelectorNilOrImplementedWithArguments(obj, sel, ...) do { } while (0)
-
-#endif // DEBUG
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDebugThreadValidation.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDebugThreadValidation.h
deleted file mode 100644
index 8d116d940..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDebugThreadValidation.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// GTMDebugThreadValidation.h
-//
-// Copyright 2016 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#import "GTMDefines.h"
-#import <Foundation/Foundation.h>
-
-// GTMCheckCurrentQueue, GTMIsCurrentQueue
-//
-// GTMCheckCurrentQueue takes a target queue and uses _GTMDevAssert to
-// report if that is not the currently executing queue.
-//
-// GTMIsCurrentQueue takes a target queue and returns true if the target queue
-// is the currently executing dispatch queue. This can be passed to another
-// assertion call in debug builds; it should never be used in release code.
-//
-// The dispatch queue must have a label.
-#define GTMCheckCurrentQueue(targetQueue) \
- _GTMDevAssert(GTMIsCurrentQueue(targetQueue), \
- @"Current queue is %s (expected %s)", \
- _GTMQueueName(DISPATCH_CURRENT_QUEUE_LABEL), \
- _GTMQueueName(targetQueue))
-
-#define GTMIsCurrentQueue(targetQueue) \
- (strcmp(_GTMQueueName(DISPATCH_CURRENT_QUEUE_LABEL), \
- _GTMQueueName(targetQueue)) == 0)
-
-#define _GTMQueueName(queue) \
- (strlen(dispatch_queue_get_label(queue)) > 0 ? \
- dispatch_queue_get_label(queue) : "unnamed")
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDefines.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDefines.h
deleted file mode 100644
index 7feb1cbd8..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMDefines.h
+++ /dev/null
@@ -1,398 +0,0 @@
-//
-// GTMDefines.h
-//
-// Copyright 2008 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-// ============================================================================
-
-#include <AvailabilityMacros.h>
-#include <TargetConditionals.h>
-
-#ifdef __OBJC__
-#include <Foundation/NSObjCRuntime.h>
-#endif // __OBJC__
-
-#if TARGET_OS_IPHONE
-#include <Availability.h>
-#endif // TARGET_OS_IPHONE
-
-// ----------------------------------------------------------------------------
-// CPP symbols that can be overridden in a prefix to control how the toolbox
-// is compiled.
-// ----------------------------------------------------------------------------
-
-
-// By setting the GTM_CONTAINERS_VALIDATION_FAILED_LOG and
-// GTM_CONTAINERS_VALIDATION_FAILED_ASSERT macros you can control what happens
-// when a validation fails. If you implement your own validators, you may want
-// to control their internals using the same macros for consistency.
-#ifndef GTM_CONTAINERS_VALIDATION_FAILED_ASSERT
- #define GTM_CONTAINERS_VALIDATION_FAILED_ASSERT 0
-#endif
-
-// Ensure __has_feature and __has_extension are safe to use.
-// See http://clang-analyzer.llvm.org/annotations.html
-#ifndef __has_feature // Optional.
- #define __has_feature(x) 0 // Compatibility with non-clang compilers.
-#endif
-
-#ifndef __has_extension
- #define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
-#endif
-
-// Give ourselves a consistent way to do inlines. Apple's macros even use
-// a few different actual definitions, so we're based off of the foundation
-// one.
-#if !defined(GTM_INLINE)
- #if (defined (__GNUC__) && (__GNUC__ == 4)) || defined (__clang__)
- #define GTM_INLINE static __inline__ __attribute__((always_inline))
- #else
- #define GTM_INLINE static __inline__
- #endif
-#endif
-
-// Give ourselves a consistent way of doing externs that links up nicely
-// when mixing objc and objc++
-#if !defined (GTM_EXTERN)
- #if defined __cplusplus
- #define GTM_EXTERN extern "C"
- #define GTM_EXTERN_C_BEGIN extern "C" {
- #define GTM_EXTERN_C_END }
- #else
- #define GTM_EXTERN extern
- #define GTM_EXTERN_C_BEGIN
- #define GTM_EXTERN_C_END
- #endif
-#endif
-
-// Give ourselves a consistent way of exporting things if we have visibility
-// set to hidden.
-#if !defined (GTM_EXPORT)
- #define GTM_EXPORT __attribute__((visibility("default")))
-#endif
-
-// Give ourselves a consistent way of declaring something as unused. This
-// doesn't use __unused because that is only supported in gcc 4.2 and greater.
-#if !defined (GTM_UNUSED)
-#define GTM_UNUSED(x) ((void)(x))
-#endif
-
-// _GTMDevLog & _GTMDevAssert
-//
-// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for
-// developer level errors. This implementation simply macros to NSLog/NSAssert.
-// It is not intended to be a general logging/reporting system.
-//
-// Please see http://code.google.com/p/google-toolbox-for-mac/wiki/DevLogNAssert
-// for a little more background on the usage of these macros.
-//
-// _GTMDevLog log some error/problem in debug builds
-// _GTMDevAssert assert if condition isn't met w/in a method/function
-// in all builds.
-//
-// To replace this system, just provide different macro definitions in your
-// prefix header. Remember, any implementation you provide *must* be thread
-// safe since this could be called by anything in what ever situtation it has
-// been placed in.
-//
-
-// Ignore the "Macro name is a reserved identifier" warning in this section
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wreserved-id-macro"
-
-// We only define the simple macros if nothing else has defined this.
-#ifndef _GTMDevLog
-
-#ifdef DEBUG
- #define _GTMDevLog(...) NSLog(__VA_ARGS__)
-#else
- #define _GTMDevLog(...) do { } while (0)
-#endif
-
-#endif // _GTMDevLog
-
-#ifndef _GTMDevAssert
-// we directly invoke the NSAssert handler so we can pass on the varargs
-// (NSAssert doesn't have a macro we can use that takes varargs)
-#if !defined(NS_BLOCK_ASSERTIONS)
- #define _GTMDevAssert(condition, ...) \
- do { \
- if (!(condition)) { \
- [[NSAssertionHandler currentHandler] \
- handleFailureInFunction:(NSString *) \
- [NSString stringWithUTF8String:__PRETTY_FUNCTION__] \
- file:(NSString *)[NSString stringWithUTF8String:__FILE__] \
- lineNumber:__LINE__ \
- description:__VA_ARGS__]; \
- } \
- } while(0)
-#else // !defined(NS_BLOCK_ASSERTIONS)
- #define _GTMDevAssert(condition, ...) do { } while (0)
-#endif // !defined(NS_BLOCK_ASSERTIONS)
-
-#endif // _GTMDevAssert
-
-// _GTMCompileAssert
-//
-// Note: Software for current compilers should just use _Static_assert directly
-// instead of this macro.
-//
-// _GTMCompileAssert is an assert that is meant to fire at compile time if you
-// want to check things at compile instead of runtime. For example if you
-// want to check that a wchar is 4 bytes instead of 2 you would use
-// _GTMCompileAssert(sizeof(wchar_t) == 4, wchar_t_is_4_bytes_on_OS_X)
-// Note that the second "arg" is not in quotes, and must be a valid processor
-// symbol in it's own right (no spaces, punctuation etc).
-
-// Wrapping this in an #ifndef allows external groups to define their own
-// compile time assert scheme.
-#ifndef _GTMCompileAssert
- #if __has_feature(c_static_assert) || __has_extension(c_static_assert)
- #define _GTMCompileAssert(test, msg) _Static_assert((test), #msg)
- #else
- // Pre-Xcode 7 support.
- //
- // We got this technique from here:
- // http://unixjunkie.blogspot.com/2007/10/better-compile-time-asserts_29.html
- #define _GTMCompileAssertSymbolInner(line, msg) _GTMCOMPILEASSERT ## line ## __ ## msg
- #define _GTMCompileAssertSymbol(line, msg) _GTMCompileAssertSymbolInner(line, msg)
- #define _GTMCompileAssert(test, msg) \
- typedef char _GTMCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ]
- #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert)
-#endif // _GTMCompileAssert
-
-#pragma clang diagnostic pop
-
-// ----------------------------------------------------------------------------
-// CPP symbols defined based on the project settings so the GTM code has
-// simple things to test against w/o scattering the knowledge of project
-// setting through all the code.
-// ----------------------------------------------------------------------------
-
-// Provide a single constant CPP symbol that all of GTM uses for ifdefing
-// iPhone code.
-#if TARGET_OS_IPHONE // iPhone SDK
- // For iPhone specific stuff
- #define GTM_IPHONE_SDK 1
- #if TARGET_IPHONE_SIMULATOR
- #define GTM_IPHONE_DEVICE 0
- #define GTM_IPHONE_SIMULATOR 1
- #else
- #define GTM_IPHONE_DEVICE 1
- #define GTM_IPHONE_SIMULATOR 0
- #endif // TARGET_IPHONE_SIMULATOR
- // By default, GTM has provided it's own unittesting support, define this
- // to use the support provided by Xcode, especially for the Xcode4 support
- // for unittesting.
- #ifndef GTM_USING_XCTEST
- #define GTM_USING_XCTEST 0
- #endif
- #define GTM_MACOS_SDK 0
-#else
- // For MacOS specific stuff
- #define GTM_MACOS_SDK 1
- #define GTM_IPHONE_SDK 0
- #define GTM_IPHONE_SIMULATOR 0
- #define GTM_IPHONE_DEVICE 0
- #ifndef GTM_USING_XCTEST
- #define GTM_USING_XCTEST 0
- #endif
-#endif
-
-// Some of our own availability macros
-#if GTM_MACOS_SDK
-#define GTM_AVAILABLE_ONLY_ON_IPHONE UNAVAILABLE_ATTRIBUTE
-#define GTM_AVAILABLE_ONLY_ON_MACOS
-#else
-#define GTM_AVAILABLE_ONLY_ON_IPHONE
-#define GTM_AVAILABLE_ONLY_ON_MACOS UNAVAILABLE_ATTRIBUTE
-#endif
-
-// GC was dropped by Apple, define the old constant incase anyone still keys
-// off of it.
-#ifndef GTM_SUPPORT_GC
- #define GTM_SUPPORT_GC 0
-#endif
-
-// Some support for advanced clang static analysis functionality
-#ifndef NS_RETURNS_RETAINED
- #if __has_feature(attribute_ns_returns_retained)
- #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained))
- #else
- #define NS_RETURNS_RETAINED
- #endif
-#endif
-
-#ifndef NS_RETURNS_NOT_RETAINED
- #if __has_feature(attribute_ns_returns_not_retained)
- #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained))
- #else
- #define NS_RETURNS_NOT_RETAINED
- #endif
-#endif
-
-#ifndef CF_RETURNS_RETAINED
- #if __has_feature(attribute_cf_returns_retained)
- #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
- #else
- #define CF_RETURNS_RETAINED
- #endif
-#endif
-
-#ifndef CF_RETURNS_NOT_RETAINED
- #if __has_feature(attribute_cf_returns_not_retained)
- #define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained))
- #else
- #define CF_RETURNS_NOT_RETAINED
- #endif
-#endif
-
-#ifndef NS_CONSUMED
- #if __has_feature(attribute_ns_consumed)
- #define NS_CONSUMED __attribute__((ns_consumed))
- #else
- #define NS_CONSUMED
- #endif
-#endif
-
-#ifndef CF_CONSUMED
- #if __has_feature(attribute_cf_consumed)
- #define CF_CONSUMED __attribute__((cf_consumed))
- #else
- #define CF_CONSUMED
- #endif
-#endif
-
-#ifndef NS_CONSUMES_SELF
- #if __has_feature(attribute_ns_consumes_self)
- #define NS_CONSUMES_SELF __attribute__((ns_consumes_self))
- #else
- #define NS_CONSUMES_SELF
- #endif
-#endif
-
-#ifndef GTM_NONNULL
- #if defined(__has_attribute)
- #if __has_attribute(nonnull)
- #define GTM_NONNULL(x) __attribute__((nonnull x))
- #else
- #define GTM_NONNULL(x)
- #endif
- #else
- #define GTM_NONNULL(x)
- #endif
-#endif
-
-// Invalidates the initializer from which it's called.
-#ifndef GTMInvalidateInitializer
- #if __has_feature(objc_arc)
- #define GTMInvalidateInitializer() \
- do { \
- [self class]; /* Avoid warning of dead store to |self|. */ \
- _GTMDevAssert(NO, @"Invalid initializer."); \
- return nil; \
- } while (0)
- #else
- #define GTMInvalidateInitializer() \
- do { \
- [self release]; \
- _GTMDevAssert(NO, @"Invalid initializer."); \
- return nil; \
- } while (0)
- #endif
-#endif
-
-#ifndef GTMCFAutorelease
- // GTMCFAutorelease returns an id. In contrast, Apple's CFAutorelease returns
- // a CFTypeRef.
- #if __has_feature(objc_arc)
- #define GTMCFAutorelease(x) CFBridgingRelease(x)
- #else
- #define GTMCFAutorelease(x) ([(id)x autorelease])
- #endif
-#endif
-
-#ifdef __OBJC__
-
-
-// Macro to allow you to create NSStrings out of other macros.
-// #define FOO foo
-// NSString *fooString = GTM_NSSTRINGIFY(FOO);
-#if !defined (GTM_NSSTRINGIFY)
- #define GTM_NSSTRINGIFY_INNER(x) @#x
- #define GTM_NSSTRINGIFY(x) GTM_NSSTRINGIFY_INNER(x)
-#endif
-
-// Macro to allow fast enumeration when building for 10.5 or later, and
-// reliance on NSEnumerator for 10.4. Remember, NSDictionary w/ FastEnumeration
-// does keys, so pick the right thing, nothing is done on the FastEnumeration
-// side to be sure you're getting what you wanted.
-#ifndef GTM_FOREACH_OBJECT
- #if TARGET_OS_IPHONE || !(MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5)
- #define GTM_FOREACH_ENUMEREE(element, enumeration) \
- for (element in enumeration)
- #define GTM_FOREACH_OBJECT(element, collection) \
- for (element in collection)
- #define GTM_FOREACH_KEY(element, collection) \
- for (element in collection)
- #else
- #define GTM_FOREACH_ENUMEREE(element, enumeration) \
- for (NSEnumerator *_ ## element ## _enum = enumeration; \
- (element = [_ ## element ## _enum nextObject]) != nil; )
- #define GTM_FOREACH_OBJECT(element, collection) \
- GTM_FOREACH_ENUMEREE(element, [collection objectEnumerator])
- #define GTM_FOREACH_KEY(element, collection) \
- GTM_FOREACH_ENUMEREE(element, [collection keyEnumerator])
- #endif
-#endif
-
-// ============================================================================
-
-// GTM_SEL_STRING is for specifying selector (usually property) names to KVC
-// or KVO methods.
-// In debug it will generate warnings for undeclared selectors if
-// -Wunknown-selector is turned on.
-// In release it will have no runtime overhead.
-#ifndef GTM_SEL_STRING
- #ifdef DEBUG
- #define GTM_SEL_STRING(selName) NSStringFromSelector(@selector(selName))
- #else
- #define GTM_SEL_STRING(selName) @#selName
- #endif // DEBUG
-#endif // GTM_SEL_STRING
-
-#ifndef GTM_WEAK
-#if __has_feature(objc_arc_weak)
- // With ARC enabled, __weak means a reference that isn't implicitly
- // retained. __weak objects are accessed through runtime functions, so
- // they are zeroed out, but this requires OS X 10.7+.
- // At clang r251041+, ARC-style zeroing weak references even work in
- // non-ARC mode.
- #define GTM_WEAK __weak
- #elif __has_feature(objc_arc)
- // ARC, but targeting 10.6 or older, where zeroing weak references don't
- // exist.
- #define GTM_WEAK __unsafe_unretained
- #else
- // With manual reference counting, __weak used to be silently ignored.
- // clang r251041 gives it the ARC semantics instead. This means they
- // now require a deployment target of 10.7, while some clients of GTM
- // still target 10.6. In these cases, expand to __unsafe_unretained instead
- #define GTM_WEAK
- #endif
-#endif
-
-#endif // __OBJC__
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMLocalizedString.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMLocalizedString.h
deleted file mode 100644
index c49b8a9da..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMLocalizedString.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//
-// GTMLocalizedString.h
-//
-// Copyright (c) 2010 Google Inc. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#import <Foundation/Foundation.h>
-#import "GTMDefines.h"
-
-// The NSLocalizedString macros do not have NS_FORMAT_ARGUMENT modifiers put
-// on them which means you get warnings on Snow Leopard with when
-// GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES and you do things like:
-// NSString *foo
-// = [NSString stringWithFormat:NSLocalizedString(@"blah %@", nil), @"bar"];
-// The GTMLocalizedString functions fix that for you so you can do:
-// NSString *foo
-// = [NSString stringWithFormat:GTMLocalizedString(@"blah %@", nil), @"bar"];
-// and you will compile cleanly.
-// If you use genstrings you can call it with
-// genstrings -s GTMLocalizedString ...
-// and it should work as expected.
-// You can override how GTM gets its localized strings (if you are using
-// something other than NSLocalizedString) by redefining
-// GTMLocalizedStringWithDefaultValueInternal.
-
-#ifndef GTMLocalizedStringWithDefaultValueInternal
- #define GTMLocalizedStringWithDefaultValueInternal \
- NSLocalizedStringWithDefaultValue
-#endif
-
-GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedString(
- NSString *key, NSString *comment) {
- return GTMLocalizedStringWithDefaultValueInternal(key,
- nil,
- [NSBundle mainBundle],
- @"",
- comment);
-}
-
-GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringFromTable(
- NSString *key, NSString *tableName, NSString *comment) {
- return GTMLocalizedStringWithDefaultValueInternal(key,
- tableName,
- [NSBundle mainBundle],
- @"",
- comment);
-}
-
-GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringFromTableInBundle(
- NSString *key, NSString *tableName, NSBundle *bundle, NSString *comment) {
- return GTMLocalizedStringWithDefaultValueInternal(key,
- tableName,
- bundle,
- @"",
- comment);
-}
-
-GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringWithDefaultValue(
- NSString *key, NSString *tableName, NSBundle *bundle, NSString *value,
- NSString *comment) {
- return GTMLocalizedStringWithDefaultValueInternal(key,
- tableName,
- bundle,
- value,
- comment);
-}
-
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMLogger.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMLogger.h
deleted file mode 100644
index 16f0eafb9..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMLogger.h
+++ /dev/null
@@ -1,508 +0,0 @@
-//
-// GTMLogger.h
-//
-// Copyright 2007-2008 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-// Key Abstractions
-// ----------------
-//
-// This file declares multiple classes and protocols that are used by the
-// GTMLogger logging system. The 4 main abstractions used in this file are the
-// following:
-//
-// * logger (GTMLogger) - The main logging class that users interact with. It
-// has methods for logging at different levels and uses a log writer, a log
-// formatter, and a log filter to get the job done.
-//
-// * log writer (GTMLogWriter) - Writes a given string to some log file, where
-// a "log file" can be a physical file on disk, a POST over HTTP to some URL,
-// or even some in-memory structure (e.g., a ring buffer).
-//
-// * log formatter (GTMLogFormatter) - Given a format string and arguments as
-// a va_list, returns a single formatted NSString. A "formatted string" could
-// be a string with the date prepended, a string with values in a CSV format,
-// or even a string of XML.
-//
-// * log filter (GTMLogFilter) - Given a formatted log message as an NSString
-// and the level at which the message is to be logged, this class will decide
-// whether the given message should be logged or not. This is a flexible way
-// to filter out messages logged at a certain level, messages that contain
-// certain text, or filter nothing out at all. This gives the caller the
-// flexibility to dynamically enable debug logging in Release builds.
-//
-// This file also declares some classes to handle the common log writer, log
-// formatter, and log filter cases. Callers can also create their own writers,
-// formatters, and filters and they can even build them on top of the ones
-// declared here. Keep in mind that your custom writer/formatter/filter may be
-// called from multiple threads, so it must be thread-safe.
-
-#import <Foundation/Foundation.h>
-#import "GTMDefines.h"
-
-// Predeclaration of used protocols that are declared later in this file.
-@protocol GTMLogWriter, GTMLogFormatter, GTMLogFilter;
-
-// GTMLogger
-//
-// GTMLogger is the primary user-facing class for an object-oriented logging
-// system. It is built on the concept of log formatters (GTMLogFormatter), log
-// writers (GTMLogWriter), and log filters (GTMLogFilter). When a message is
-// sent to a GTMLogger to log a message, the message is formatted using the log
-// formatter, then the log filter is consulted to see if the message should be
-// logged, and if so, the message is sent to the log writer to be written out.
-//
-// GTMLogger is intended to be a flexible and thread-safe logging solution. Its
-// flexibility comes from the fact that GTMLogger instances can be customized
-// with user defined formatters, filters, and writers. And these writers,
-// filters, and formatters can be combined, stacked, and customized in arbitrary
-// ways to suit the needs at hand. For example, multiple writers can be used at
-// the same time, and a GTMLogger instance can even be used as another
-// GTMLogger's writer. This allows for arbitrarily deep logging trees.
-//
-// A standard GTMLogger uses a writer that sends messages to standard out, a
-// formatter that smacks a timestamp and a few other bits of interesting
-// information on the message, and a filter that filters out debug messages from
-// release builds. Using the standard log settings, a log message will look like
-// the following:
-//
-// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] foo=<Foo: 0x123>
-//
-// The output contains the date and time of the log message, the name of the
-// process followed by its process ID/thread ID, the log level at which the
-// message was logged (in the previous example the level was 1:
-// kGTMLoggerLevelDebug), and finally, the user-specified log message itself (in
-// this case, the log message was @"foo=%@", foo).
-//
-// Multiple instances of GTMLogger can be created, each configured their own
-// way. Though GTMLogger is not a singleton (in the GoF sense), it does provide
-// access to a shared (i.e., globally accessible) GTMLogger instance. This makes
-// it convenient for all code in a process to use the same GTMLogger instance.
-// The shared GTMLogger instance can also be configured in an arbitrary, and
-// these configuration changes will affect all code that logs through the shared
-// instance.
-
-//
-// Log Levels
-// ----------
-// GTMLogger has 3 different log levels: Debug, Info, and Error. GTMLogger
-// doesn't take any special action based on the log level; it simply forwards
-// this information on to formatters, filters, and writers, each of which may
-// optionally take action based on the level. Since log level filtering is
-// performed at runtime, log messages are typically not filtered out at compile
-// time. The exception to this rule is that calls to the GTMLoggerDebug() macro
-// *ARE* filtered out of non-DEBUG builds. This is to be backwards compatible
-// with behavior that many developers are currently used to. Note that this
-// means that GTMLoggerDebug(@"hi") will be compiled out of Release builds, but
-// [[GTMLogger sharedLogger] logDebug:@"hi"] will NOT be compiled out.
-//
-// Standard loggers are created with the GTMLogLevelFilter log filter, which
-// filters out certain log messages based on log level, and some other settings.
-//
-// In addition to the -logDebug:, -logInfo:, and -logError: methods defined on
-// GTMLogger itself, there are also C macros that make usage of the shared
-// GTMLogger instance very convenient. These macros are:
-//
-// GTMLoggerDebug(...)
-// GTMLoggerInfo(...)
-// GTMLoggerError(...)
-//
-// Again, a notable feature of these macros is that GTMLogDebug() calls *will be
-// compiled out of non-DEBUG builds*.
-//
-// Standard Loggers
-// ----------------
-// GTMLogger has the concept of "standard loggers". A standard logger is simply
-// a logger that is pre-configured with some standard/common writer, formatter,
-// and filter combination. Standard loggers are created using the creation
-// methods beginning with "standard". The alternative to a standard logger is a
-// regular logger, which will send messages to stdout, with no special
-// formatting, and no filtering.
-//
-// How do I use GTMLogger?
-// ----------------------
-// The typical way you will want to use GTMLogger is to simply use the
-// GTMLogger*() macros for logging from code. That way we can easily make
-// changes to the GTMLogger class and simply update the macros accordingly. Only
-// your application startup code (perhaps, somewhere in main()) should use the
-// GTMLogger class directly in order to configure the shared logger, which all
-// of the code using the macros will be using. Again, this is just the typical
-// situation.
-//
-// To be complete, there are cases where you may want to use GTMLogger directly,
-// or even create separate GTMLogger instances for some reason. That's fine,
-// too.
-//
-// Examples
-// --------
-// The following show some common GTMLogger use cases.
-//
-// 1. You want to log something as simply as possible. Also, this call will only
-// appear in debug builds. In non-DEBUG builds it will be completely removed.
-//
-// GTMLoggerDebug(@"foo = %@", foo);
-//
-// 2. The previous example is similar to the following. The major difference is
-// that the previous call (example 1) will be compiled out of Release builds
-// but this statement will not be compiled out.
-//
-// [[GTMLogger sharedLogger] logDebug:@"foo = %@", foo];
-//
-// 3. Send all logging output from the shared logger to a file. We do this by
-// creating an NSFileHandle for writing associated with a file, and setting
-// that file handle as the logger's writer.
-//
-// NSFileHandle *f = [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log"
-// create:YES];
-// [[GTMLogger sharedLogger] setWriter:f];
-// GTMLoggerError(@"hi"); // This will be sent to /tmp/f.log
-//
-// 4. Create a new GTMLogger that will log to a file. This example differs from
-// the previous one because here we create a new GTMLogger that is different
-// from the shared logger.
-//
-// GTMLogger *logger = [GTMLogger standardLoggerWithPath:@"/tmp/temp.log"];
-// [logger logInfo:@"hi temp log file"];
-//
-// 5. Create a logger that writes to stdout and does NOT do any formatting to
-// the log message. This might be useful, for example, when writing a help
-// screen for a command-line tool to standard output.
-//
-// GTMLogger *logger = [GTMLogger logger];
-// [logger logInfo:@"%@ version 0.1 usage", progName];
-//
-// 6. Send log output to stdout AND to a log file. The trick here is that
-// NSArrays function as composite log writers, which means when an array is
-// set as the log writer, it forwards all logging messages to all of its
-// contained GTMLogWriters.
-//
-// // Create array of GTMLogWriters
-// NSArray *writers = [NSArray arrayWithObjects:
-// [NSFileHandle fileHandleForWritingAtPath:@"/tmp/f.log" create:YES],
-// [NSFileHandle fileHandleWithStandardOutput], nil];
-//
-// GTMLogger *logger = [GTMLogger standardLogger];
-// [logger setWriter:writers];
-// [logger logInfo:@"hi"]; // Output goes to stdout and /tmp/f.log
-//
-// For futher details on log writers, formatters, and filters, see the
-// documentation below.
-//
-// NOTE: GTMLogger is application level logging. By default it does nothing
-// with _GTMDevLog/_GTMDevAssert (see GTMDefines.h). An application can choose
-// to bridge _GTMDevLog/_GTMDevAssert to GTMLogger by providing macro
-// definitions in its prefix header (see GTMDefines.h for how one would do
-// that).
-//
-@interface GTMLogger : NSObject {
- @private
- id<GTMLogWriter> writer_;
- id<GTMLogFormatter> formatter_;
- id<GTMLogFilter> filter_;
-}
-
-//
-// Accessors for the shared logger instance
-//
-
-// Returns a shared/global standard GTMLogger instance. Callers should typically
-// use this method to get a GTMLogger instance, unless they explicitly want
-// their own instance to configure for their own needs. This is the only method
-// that returns a shared instance; all the rest return new GTMLogger instances.
-+ (id)sharedLogger;
-
-// Sets the shared logger instance to |logger|. Future calls to +sharedLogger
-// will return |logger| instead.
-+ (void)setSharedLogger:(GTMLogger *)logger;
-
-//
-// Creation methods
-//
-
-// Returns a new autoreleased GTMLogger instance that will log to stdout, using
-// the GTMLogStandardFormatter, and the GTMLogLevelFilter filter.
-+ (id)standardLogger;
-
-// Same as +standardLogger, but logs to stderr.
-+ (id)standardLoggerWithStderr;
-
-// Same as +standardLogger but levels >= kGTMLoggerLevelError are routed to
-// stderr, everything else goes to stdout.
-+ (id)standardLoggerWithStdoutAndStderr;
-
-// Returns a new standard GTMLogger instance with a log writer that will
-// write to the file at |path|, and will use the GTMLogStandardFormatter and
-// GTMLogLevelFilter classes. If |path| does not exist, it will be created.
-+ (id)standardLoggerWithPath:(NSString *)path;
-
-// Returns an autoreleased GTMLogger instance that will use the specified
-// |writer|, |formatter|, and |filter|.
-+ (id)loggerWithWriter:(id<GTMLogWriter>)writer
- formatter:(id<GTMLogFormatter>)formatter
- filter:(id<GTMLogFilter>)filter;
-
-// Returns an autoreleased GTMLogger instance that logs to stdout, with the
-// basic formatter, and no filter. The returned logger differs from the logger
-// returned by +standardLogger because this one does not do any filtering and
-// does not do any special log formatting; this is the difference between a
-// "regular" logger and a "standard" logger.
-+ (id)logger;
-
-// Designated initializer. This method returns a GTMLogger initialized with the
-// specified |writer|, |formatter|, and |filter|. See the setter methods below
-// for what values will be used if nil is passed for a parameter.
-- (id)initWithWriter:(id<GTMLogWriter>)writer
- formatter:(id<GTMLogFormatter>)formatter
- filter:(id<GTMLogFilter>)filter;
-
-//
-// Logging methods
-//
-
-// Logs a message at the debug level (kGTMLoggerLevelDebug).
-- (void)logDebug:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2);
-// Logs a message at the info level (kGTMLoggerLevelInfo).
-- (void)logInfo:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2);
-// Logs a message at the error level (kGTMLoggerLevelError).
-- (void)logError:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2);
-// Logs a message at the assert level (kGTMLoggerLevelAssert).
-- (void)logAssert:(NSString *)fmt, ... NS_FORMAT_FUNCTION(1, 2);
-
-
-//
-// Accessors
-//
-
-// Accessor methods for the log writer. If the log writer is set to nil,
-// [NSFileHandle fileHandleWithStandardOutput] is used.
-- (id<GTMLogWriter>)writer;
-- (void)setWriter:(id<GTMLogWriter>)writer;
-
-// Accessor methods for the log formatter. If the log formatter is set to nil,
-// GTMLogBasicFormatter is used. This formatter will format log messages in a
-// plain printf style.
-- (id<GTMLogFormatter>)formatter;
-- (void)setFormatter:(id<GTMLogFormatter>)formatter;
-
-// Accessor methods for the log filter. If the log filter is set to nil,
-// GTMLogNoFilter is used, which allows all log messages through.
-- (id<GTMLogFilter>)filter;
-- (void)setFilter:(id<GTMLogFilter>)filter;
-
-@end // GTMLogger
-
-
-// Helper functions that are used by the convenience GTMLogger*() macros that
-// enable the logging of function names.
-@interface GTMLogger (GTMLoggerMacroHelpers)
-- (void)logFuncDebug:(const char *)func msg:(NSString *)fmt, ...
- NS_FORMAT_FUNCTION(2, 3);
-- (void)logFuncInfo:(const char *)func msg:(NSString *)fmt, ...
- NS_FORMAT_FUNCTION(2, 3);
-- (void)logFuncError:(const char *)func msg:(NSString *)fmt, ...
- NS_FORMAT_FUNCTION(2, 3);
-- (void)logFuncAssert:(const char *)func msg:(NSString *)fmt, ...
- NS_FORMAT_FUNCTION(2, 3);
-@end // GTMLoggerMacroHelpers
-
-
-// The convenience macros are only defined if they haven't already been defined.
-#ifndef GTMLoggerInfo
-
-// Convenience macros that log to the shared GTMLogger instance. These macros
-// are how users should typically log to GTMLogger. Notice that GTMLoggerDebug()
-// calls will be compiled out of non-Debug builds.
-#define GTMLoggerDebug(...) \
- [[GTMLogger sharedLogger] logFuncDebug:__func__ msg:__VA_ARGS__]
-#define GTMLoggerInfo(...) \
- [[GTMLogger sharedLogger] logFuncInfo:__func__ msg:__VA_ARGS__]
-#define GTMLoggerError(...) \
- [[GTMLogger sharedLogger] logFuncError:__func__ msg:__VA_ARGS__]
-#define GTMLoggerAssert(...) \
- [[GTMLogger sharedLogger] logFuncAssert:__func__ msg:__VA_ARGS__]
-
-// If we're not in a debug build, remove the GTMLoggerDebug statements. This
-// makes calls to GTMLoggerDebug "compile out" of Release builds
-#ifndef DEBUG
-#undef GTMLoggerDebug
-#define GTMLoggerDebug(...) do {} while(0)
-#endif
-
-#endif // !defined(GTMLoggerInfo)
-
-// Log levels.
-typedef enum {
- kGTMLoggerLevelUnknown,
- kGTMLoggerLevelDebug,
- kGTMLoggerLevelInfo,
- kGTMLoggerLevelError,
- kGTMLoggerLevelAssert,
-} GTMLoggerLevel;
-
-
-//
-// Log Writers
-//
-
-// Protocol to be implemented by a GTMLogWriter instance.
-@protocol GTMLogWriter <NSObject>
-// Writes the given log message to where the log writer is configured to write.
-- (void)logMessage:(NSString *)msg level:(GTMLoggerLevel)level;
-@end // GTMLogWriter
-
-
-// Simple category on NSFileHandle that makes NSFileHandles valid log writers.
-// This is convenient because something like, say, +fileHandleWithStandardError
-// now becomes a valid log writer. Log messages are written to the file handle
-// with a newline appended.
-@interface NSFileHandle (GTMFileHandleLogWriter) <GTMLogWriter>
-// Opens the file at |path| in append mode, and creates the file with |mode|
-// if it didn't previously exist.
-+ (id)fileHandleForLoggingAtPath:(NSString *)path mode:(mode_t)mode;
-@end // NSFileHandle
-
-
-// This category makes NSArray a GTMLogWriter that can be composed of other
-// GTMLogWriters. This is the classic Composite GoF design pattern. When the
-// GTMLogWriter -logMessage:level: message is sent to the array, the array
-// forwards the message to all of its elements that implement the GTMLogWriter
-// protocol.
-//
-// This is useful in situations where you would like to send log output to
-// multiple log writers at the same time. Simply create an NSArray of the log
-// writers you wish to use, then set the array as the "writer" for your
-// GTMLogger instance.
-@interface NSArray (GTMArrayCompositeLogWriter) <GTMLogWriter>
-@end // GTMArrayCompositeLogWriter
-
-
-// This category adapts the GTMLogger interface so that it can be used as a log
-// writer; it's an "adapter" in the GoF Adapter pattern sense.
-//
-// This is useful when you want to configure a logger to log to a specific
-// writer with a specific formatter and/or filter. But you want to also compose
-// that with a different log writer that may have its own formatter and/or
-// filter.
-@interface GTMLogger (GTMLoggerLogWriter) <GTMLogWriter>
-@end // GTMLoggerLogWriter
-
-
-//
-// Log Formatters
-//
-
-// Protocol to be implemented by a GTMLogFormatter instance.
-@protocol GTMLogFormatter <NSObject>
-// Returns a formatted string using the format specified in |fmt| and the va
-// args specified in |args|.
-- (NSString *)stringForFunc:(NSString *)func
- withFormat:(NSString *)fmt
- valist:(va_list)args
- level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0);
-@end // GTMLogFormatter
-
-
-// A basic log formatter that formats a string the same way that NSLog (or
-// printf) would. It does not do anything fancy, nor does it add any data of its
-// own.
-@interface GTMLogBasicFormatter : NSObject <GTMLogFormatter>
-
-// Helper method for prettying C99 __func__ and GCC __PRETTY_FUNCTION__
-- (NSString *)prettyNameForFunc:(NSString *)func;
-
-@end // GTMLogBasicFormatter
-
-
-// A log formatter that formats the log string like the basic formatter, but
-// also prepends a timestamp and some basic process info to the message, as
-// shown in the following sample output.
-// 2007-12-30 10:29:24.177 myapp[4588/0xa07d0f60] [lvl=1] log mesage here
-@interface GTMLogStandardFormatter : GTMLogBasicFormatter {
- @private
- NSDateFormatter *dateFormatter_; // yyyy-MM-dd HH:mm:ss.SSS
- NSString *pname_;
- pid_t pid_;
-}
-@end // GTMLogStandardFormatter
-
-
-//
-// Log Filters
-//
-
-// Protocol to be implemented by a GTMLogFilter instance.
-@protocol GTMLogFilter <NSObject>
-// Returns YES if |msg| at |level| should be logged; NO otherwise.
-- (BOOL)filterAllowsMessage:(NSString *)msg level:(GTMLoggerLevel)level;
-@end // GTMLogFilter
-
-
-// A log filter that filters messages at the kGTMLoggerLevelDebug level out of
-// non-debug builds. Messages at the kGTMLoggerLevelInfo level are also filtered
-// out of non-debug builds unless GTMVerboseLogging is set in the environment or
-// the processes's defaults. Messages at the kGTMLoggerLevelError level are
-// never filtered.
-@interface GTMLogLevelFilter : NSObject <GTMLogFilter> {
- @private
- BOOL verboseLoggingEnabled_;
- NSUserDefaults *userDefaults_;
-}
-@end // GTMLogLevelFilter
-
-// A simple log filter that does NOT filter anything out;
-// -filterAllowsMessage:level will always return YES. This can be a convenient
-// way to enable debug-level logging in release builds (if you so desire).
-@interface GTMLogNoFilter : NSObject <GTMLogFilter>
-@end // GTMLogNoFilter
-
-
-// Base class for custom level filters. Not for direct use, use the minimum
-// or maximum level subclasses below.
-@interface GTMLogAllowedLevelFilter : NSObject <GTMLogFilter> {
- @private
- NSIndexSet *allowedLevels_;
-}
-@end
-
-// A log filter that allows you to set a minimum log level. Messages below this
-// level will be filtered.
-@interface GTMLogMininumLevelFilter : GTMLogAllowedLevelFilter
-
-// Designated initializer, logs at levels < |level| will be filtered.
-- (id)initWithMinimumLevel:(GTMLoggerLevel)level;
-
-@end
-
-// A log filter that allows you to set a maximum log level. Messages whose level
-// exceeds this level will be filtered. This is really only useful if you have
-// a composite GTMLogger that is sending the other messages elsewhere.
-@interface GTMLogMaximumLevelFilter : GTMLogAllowedLevelFilter
-
-// Designated initializer, logs at levels > |level| will be filtered.
-- (id)initWithMaximumLevel:(GTMLoggerLevel)level;
-
-@end
-
-
-// For subclasses only
-@interface GTMLogger (PrivateMethods)
-
-- (void)logInternalFunc:(const char *)func
- format:(NSString *)fmt
- valist:(va_list)args
- level:(GTMLoggerLevel)level NS_FORMAT_FUNCTION(2, 0);
-
-@end
-
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMMethodCheck.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMMethodCheck.h
deleted file mode 100644
index 9fad81d8c..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMMethodCheck.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// GTMMethodCheck.h
-//
-// Copyright 2006-2016 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#import <Foundation/Foundation.h>
-#import <stdio.h>
-#import <sysexits.h>
-
-/// A macro for enforcing debug time checks to make sure all required methods are linked in
-//
-// When using categories, it can be very easy to forget to include the
-// implementation of a category.
-// Let's say you had a class foo that depended on method bar of class baz, and
-// method bar was implemented as a member of a category.
-// You could add the following code:
-//
-// GTM_METHOD_CHECK(baz, bar)
-//
-// and the code would check to make sure baz was implemented just before main
-// was called. This works for both dynamic libraries, and executables.
-//
-//
-// This is not compiled into release builds.
-
-#ifdef DEBUG
-
-// This is the "magic".
-// A) we need a multi layer define here so that the preprocessor expands
-// __LINE__ the way we want it. We need __LINE__ so that each of our
-// GTM_METHOD_CHECKs generates a unique function name.
-#define GTM_METHOD_CHECK(class, method) GTM_METHOD_CHECK_INNER(class, method, __LINE__)
-#define GTM_METHOD_CHECK_INNER(class, method, line) \
- GTM_METHOD_CHECK_INNER_INNER(class, method, line)
-
-// B) define a function that is called at startup to check that |class| has an
-// implementation for |method| (either a class method or an instance method).
-#define GTM_METHOD_CHECK_INNER_INNER(class, method, line) \
-__attribute__ ((constructor, visibility("hidden"))) \
- static void xxGTMMethodCheckMethod ## class ## line () { \
- @autoreleasepool { \
- if (![class instancesRespondToSelector:@selector(method)] \
- && ![class respondsToSelector:@selector(method)]) { \
- fprintf(stderr, "%s:%d: error: We need method '%s' to be linked in for class '%s'\n", \
- __FILE__, line, #method, #class); \
- exit(EX_SOFTWARE); \
- } \
- } \
-}
-
-#else // DEBUG
-
-// Do nothing in release.
-#define GTM_METHOD_CHECK(class, method)
-
-#endif // DEBUG
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSData+zlib.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSData+zlib.h
deleted file mode 100644
index dceadc444..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSData+zlib.h
+++ /dev/null
@@ -1,199 +0,0 @@
-//
-// GTMNSData+zlib.h
-//
-// Copyright 2007-2008 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#import <Foundation/Foundation.h>
-#import "GTMDefines.h"
-
-/// Helpers for dealing w/ zlib inflate/deflate calls.
-@interface NSData (GTMZLibAdditions)
-
-// NOTE: For 64bit, none of these apis handle input sizes >32bits, they will
-// return nil when given such data. To handle data of that size you really
-// should be streaming it rather then doing it all in memory.
-
-#pragma mark Gzip Compression
-
-/// Return an autoreleased NSData w/ the result of gzipping the bytes.
-//
-// Uses the default compression level.
-+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes
- length:(NSUInteger)length;
-+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes
- length:(NSUInteger)length
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of gzipping the payload of |data|.
-//
-// Uses the default compression level.
-+ (NSData *)gtm_dataByGzippingData:(NSData *)data __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByGzippingData:(NSData *)data
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of gzipping the bytes using |level| compression level.
-//
-// |level| can be 1-9, any other values will be clipped to that range.
-+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes
- length:(NSUInteger)length
- compressionLevel:(int)level __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByGzippingBytes:(const void *)bytes
- length:(NSUInteger)length
- compressionLevel:(int)level
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of gzipping the payload of |data| using |level| compression level.
-+ (NSData *)gtm_dataByGzippingData:(NSData *)data
- compressionLevel:(int)level __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByGzippingData:(NSData *)data
- compressionLevel:(int)level
- error:(NSError **)error;
-
-#pragma mark Zlib "Stream" Compression
-
-// NOTE: deflate is *NOT* gzip. deflate is a "zlib" stream. pick which one
-// you really want to create. (the inflate api will handle either)
-
-/// Return an autoreleased NSData w/ the result of deflating the bytes.
-//
-// Uses the default compression level.
-+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes
- length:(NSUInteger)length __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes
- length:(NSUInteger)length
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of deflating the payload of |data|.
-//
-// Uses the default compression level.
-+ (NSData *)gtm_dataByDeflatingData:(NSData *)data __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByDeflatingData:(NSData *)data
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of deflating the bytes using |level| compression level.
-//
-// |level| can be 1-9, any other values will be clipped to that range.
-+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes
- length:(NSUInteger)length
- compressionLevel:(int)level __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByDeflatingBytes:(const void *)bytes
- length:(NSUInteger)length
- compressionLevel:(int)level
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of deflating the payload of |data| using |level| compression level.
-+ (NSData *)gtm_dataByDeflatingData:(NSData *)data
- compressionLevel:(int)level __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByDeflatingData:(NSData *)data
- compressionLevel:(int)level
- error:(NSError **)error;
-
-#pragma mark Uncompress of Gzip or Zlib
-
-/// Return an autoreleased NSData w/ the result of decompressing the bytes.
-//
-// The bytes to decompress can be zlib or gzip payloads.
-+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes
- length:(NSUInteger)length __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByInflatingBytes:(const void *)bytes
- length:(NSUInteger)length
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of decompressing the payload of |data|.
-//
-// The data to decompress can be zlib or gzip payloads.
-+ (NSData *)gtm_dataByInflatingData:(NSData *)data __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByInflatingData:(NSData *)data
- error:(NSError **)error;
-
-#pragma mark "Raw" Compression Support
-
-// NOTE: raw deflate is *NOT* gzip or deflate. it does not include a header
-// of any form and should only be used within streams here an external crc/etc.
-// is done to validate the data. The RawInflate apis can be used on data
-// processed like this.
-
-/// Return an autoreleased NSData w/ the result of *raw* deflating the bytes.
-//
-// Uses the default compression level.
-// *No* header is added to the resulting data.
-+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes
- length:(NSUInteger)length __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes
- length:(NSUInteger)length
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of *raw* deflating the payload of |data|.
-//
-// Uses the default compression level.
-// *No* header is added to the resulting data.
-+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of *raw* deflating the bytes using |level| compression level.
-//
-// |level| can be 1-9, any other values will be clipped to that range.
-// *No* header is added to the resulting data.
-+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes
- length:(NSUInteger)length
- compressionLevel:(int)level __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByRawDeflatingBytes:(const void *)bytes
- length:(NSUInteger)length
- compressionLevel:(int)level
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of *raw* deflating the payload of |data| using |level| compression level.
-// *No* header is added to the resulting data.
-+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data
- compressionLevel:(int)level __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByRawDeflatingData:(NSData *)data
- compressionLevel:(int)level
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of *raw* decompressing the bytes.
-//
-// The data to decompress, it should *not* have any header (zlib nor gzip).
-+ (NSData *)gtm_dataByRawInflatingBytes:(const void *)bytes
- length:(NSUInteger)length __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByRawInflatingBytes:(const void *)bytes
- length:(NSUInteger)length
- error:(NSError **)error;
-
-/// Return an autoreleased NSData w/ the result of *raw* decompressing the payload of |data|.
-//
-// The data to decompress, it should *not* have any header (zlib nor gzip).
-+ (NSData *)gtm_dataByRawInflatingData:(NSData *)data __attribute__((deprecated("Use error variant")));
-+ (NSData *)gtm_dataByRawInflatingData:(NSData *)data
- error:(NSError **)error;
-
-@end
-
-FOUNDATION_EXPORT NSString *const GTMNSDataZlibErrorDomain;
-FOUNDATION_EXPORT NSString *const GTMNSDataZlibErrorKey; // NSNumber
-FOUNDATION_EXPORT NSString *const GTMNSDataZlibRemainingBytesKey; // NSNumber
-
-typedef NS_ENUM(NSInteger, GTMNSDataZlibError) {
- GTMNSDataZlibErrorGreaterThan32BitsToCompress = 1024,
- // An internal zlib error.
- // GTMNSDataZlibErrorKey will contain the error value.
- // NSLocalizedDescriptionKey may contain an error string from zlib.
- // Look in zlib.h for list of errors.
- GTMNSDataZlibErrorInternal,
- // There was left over data in the buffer that was not used.
- // GTMNSDataZlibRemainingBytesKey will contain number of remaining bytes.
- GTMNSDataZlibErrorDataRemaining
-};
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSDictionary+URLArguments.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSDictionary+URLArguments.h
deleted file mode 100644
index 734edeadb..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSDictionary+URLArguments.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// GTMNSDictionary+URLArguments.h
-//
-// Copyright 2006-2008 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#import <Foundation/Foundation.h>
-
-/// Utility for building a URL or POST argument string.
-@interface NSDictionary (GTMNSDictionaryURLArgumentsAdditions)
-
-/// Returns a dictionary of the decoded key-value pairs in a http arguments
-/// string of the form key1=value1&key2=value2&...&keyN=valueN.
-/// Keys and values will be unescaped automatically.
-/// Only the first value for a repeated key is returned.
-///
-/// NOTE: Apps targeting iOS 8 or OS X 10.10 and later should use
-/// NSURLComponents and NSURLQueryItem to create URLs with
-/// query arguments instead of using these category methods.
-+ (NSDictionary *)gtm_dictionaryWithHttpArgumentsString:(NSString *)argString;
-
-/// Gets a string representation of the dictionary in the form
-/// key1=value1&key2=value2&...&keyN=valueN, suitable for use as either
-/// URL arguments (after a '?') or POST body. Keys and values will be escaped
-/// automatically, so should be unescaped in the dictionary.
-- (NSString *)gtm_httpArgumentsString;
-
-@end
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSString+URLArguments.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSString+URLArguments.h
deleted file mode 100644
index 0cb7f3027..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMNSString+URLArguments.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// GTMNSString+URLArguments.h
-//
-// Copyright 2006-2008 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#import <Foundation/Foundation.h>
-
-/// Utilities for encoding and decoding URL arguments.
-@interface NSString (GTMNSStringURLArgumentsAdditions)
-
-/// Returns a string that is escaped properly to be a URL argument.
-///
-/// This differs from stringByAddingPercentEscapesUsingEncoding: in that it
-/// will escape all the reserved characters (per RFC 3986
-/// <http://www.ietf.org/rfc/rfc3986.txt>) which
-/// stringByAddingPercentEscapesUsingEncoding would leave.
-///
-/// This will also escape '%', so this should not be used on a string that has
-/// already been escaped unless double-escaping is the desired result.
-///
-/// NOTE: Apps targeting iOS 8 or OS X 10.10 and later should use
-/// NSURLComponents and NSURLQueryItem to create properly-escaped
-/// URLs instead of using these category methods.
-- (NSString*)gtm_stringByEscapingForURLArgument;
-
-/// Returns the unescaped version of a URL argument
-///
-/// This has the same behavior as stringByReplacingPercentEscapesUsingEncoding:,
-/// except that it will also convert '+' to space.
-- (NSString*)gtm_stringByUnescapingFromURLArgument;
-
-@end
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMStringEncoding.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMStringEncoding.h
deleted file mode 100644
index 24fa0bc75..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMStringEncoding.h
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// GTMStringEncoding.h
-//
-// Copyright 2010 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#import <Foundation/Foundation.h>
-#import "GTMDefines.h"
-
-// A generic class for arbitrary base-2 to 128 string encoding and decoding.
-@interface GTMStringEncoding : NSObject {
- @private
- NSData *charMapData_;
- char *charMap_;
- int reverseCharMap_[128];
- int shift_;
- int mask_;
- BOOL doPad_;
- char paddingChar_;
- int padLen_;
-}
-
-// Create a new, autoreleased GTMStringEncoding object with a standard encoding.
-+ (id)binaryStringEncoding;
-+ (id)hexStringEncoding;
-+ (id)rfc4648Base32StringEncoding;
-+ (id)rfc4648Base32HexStringEncoding;
-+ (id)crockfordBase32StringEncoding;
-+ (id)rfc4648Base64StringEncoding;
-+ (id)rfc4648Base64WebsafeStringEncoding;
-
-// Create a new, autoreleased GTMStringEncoding object with the given string,
-// as described below.
-+ (id)stringEncodingWithString:(NSString *)string;
-
-// Initialize a new GTMStringEncoding object with the string.
-//
-// The length of the string must be a power of 2, at least 2 and at most 128.
-// Only 7-bit ASCII characters are permitted in the string.
-//
-// These characters are the canonical set emitted during encoding.
-// If the characters have alternatives (e.g. case, easily transposed) then use
-// addDecodeSynonyms: to configure them.
-- (id)initWithString:(NSString *)string;
-
-// Add decoding synonyms as specified in the synonyms argument.
-//
-// It should be a sequence of one previously reverse mapped character,
-// followed by one or more non-reverse mapped character synonyms.
-// Only 7-bit ASCII characters are permitted in the string.
-//
-// e.g. If a GTMStringEncoder object has already been initialised with a set
-// of characters excluding I, L and O (to avoid confusion with digits) and you
-// want to accept them as digits you can call addDecodeSynonyms:@"0oO1iIlL".
-- (void)addDecodeSynonyms:(NSString *)synonyms;
-
-// A sequence of characters to ignore if they occur during encoding.
-// Only 7-bit ASCII characters are permitted in the string.
-- (void)ignoreCharacters:(NSString *)chars;
-
-// Indicates whether padding is performed during encoding.
-- (BOOL)doPad;
-- (void)setDoPad:(BOOL)doPad;
-
-// Sets the padding character to use during encoding.
-- (void)setPaddingChar:(char)c;
-
-// Encode a raw binary buffer to a 7-bit ASCII string.
-- (NSString *)encode:(NSData *)data __attribute__((deprecated("Use encode:error:")));
-- (NSString *)encodeString:(NSString *)string __attribute__((deprecated("Use encodeString:error:")));
-
-- (NSString *)encode:(NSData *)data error:(NSError **)error;
-- (NSString *)encodeString:(NSString *)string error:(NSError **)error;
-
-// Decode a 7-bit ASCII string to a raw binary buffer.
-- (NSData *)decode:(NSString *)string __attribute__((deprecated("Use decode:error:")));
-- (NSString *)stringByDecoding:(NSString *)string __attribute__((deprecated("Use stringByDecoding:error:")));
-
-- (NSData *)decode:(NSString *)string error:(NSError **)error;
-- (NSString *)stringByDecoding:(NSString *)string error:(NSError **)error;
-
-@end
-
-FOUNDATION_EXPORT NSString *const GTMStringEncodingErrorDomain;
-FOUNDATION_EXPORT NSString *const GTMStringEncodingBadCharacterIndexKey; // NSNumber
-
-typedef NS_ENUM(NSInteger, GTMStringEncodingError) {
- // Unable to convert a buffer to NSASCIIStringEncoding.
- GTMStringEncodingErrorUnableToConverToAscii = 1024,
- // Unable to convert a buffer to NSUTF8StringEncoding.
- GTMStringEncodingErrorUnableToConverToUTF8,
- // Encountered a bad character.
- // GTMStringEncodingBadCharacterIndexKey will have the index of the character.
- GTMStringEncodingErrorUnknownCharacter,
- // The data had a padding character in the middle of the data. Padding characters
- // can only be at the end.
- GTMStringEncodingErrorExpectedPadding,
- // There is unexpected data at the end of the data that could not be decoded.
- GTMStringEncodingErrorIncompleteTrailingData,
-};
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMTypeCasting.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMTypeCasting.h
deleted file mode 100644
index 0c5899fe4..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMTypeCasting.h
+++ /dev/null
@@ -1,71 +0,0 @@
-//
-// GTMTypeCasting.h
-//
-// Copyright 2010 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations under
-// the License.
-//
-
-#import <Foundation/Foundation.h>
-#import "GTMDefines.h"
-
-// These are some basic macros for making down-casting safer in Objective C.
-// They are loosely based on the same cast types with similar names in C++.
-// A typical usage would look like this:
-//
-// Bar* b = [[Bar alloc] init];
-// Foo* a = GTM_STATIC_CAST(Foo, b);
-//
-// Note that it's GTM_STATIC_CAST(Foo, b) and not GTM_STATIC_CAST(Foo*, b).
-//
-// GTM_STATIC_CAST runs only in debug mode, and will assert if and only if:
-// - object is non nil
-// - [object isKindOfClass:[cls class]] returns nil
-//
-// otherwise it returns object.
-//
-// GTM_DYNAMIC_CAST runs in both debug and release and will return nil if
-// - object is nil
-// - [object isKindOfClass:[cls class]] returns nil
-//
-// otherwise it returns object.
-//
-
-// Support functions for dealing with casting.
-GTM_INLINE id GTMDynamicCastSupport(Class cls, id object) {
- _GTMDevAssert(cls, @"Nil Class");
- return [object isKindOfClass:cls] ? object : nil;
-}
-
-GTM_INLINE id GTMStaticCastSupport(Class cls, id object) {
- id value = nil;
- if (object) {
- value = GTMDynamicCastSupport(cls, object);
- _GTMDevAssert(value, @"Could not cast %@ to class %@", object, cls);
- }
- return value;
-}
-
-#ifndef GTM_STATIC_CAST
- #ifdef DEBUG
- #define GTM_STATIC_CAST(type, object) \
- ((type *) GTMStaticCastSupport([type class], object))
- #else
- #define GTM_STATIC_CAST(type, object) ((type *) (object))
- #endif
-#endif
-
-#ifndef GTM_DYNAMIC_CAST
- #define GTM_DYNAMIC_CAST(type, object) \
- ((type *) GTMDynamicCastSupport([type class], object))
-#endif
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMURLBuilder.h b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMURLBuilder.h
deleted file mode 100644
index f333ec44a..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Headers/GTMURLBuilder.h
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// GTMURLBuilder.h
-//
-// Copyright 2012 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License"); you may not
-// use this file except in compliance with the License. You may obtain a copy
-// of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-// License for the specific language governing permissions and limitations
-// under the License.
-//
-
-//
-// Class for creating URLs. It handles URL encoding of parameters.
-//
-// Usage example:
-//
-// GTMURLBuilder *URLBuilder =
-// [GTMURLBuilder builderWithString:@"http://www.google.com"];
-// [URLBuilder setValue:@"abc" forParameter:@"q"];
-// NSURL *URL = [URLBuilder URL];
-//
-// NOTE: Apps targeting iOS 8 or OS X 10.10 and later should use
-// NSURLComponents and NSURLQueryItem to create URLs with
-// query arguments instead of using this class.
-
-
-#import <Foundation/Foundation.h>
-#import "GTMDefines.h"
-
-#if (!TARGET_OS_IPHONE && defined(MAC_OS_X_VERSION_10_10) && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10) \
-|| (TARGET_OS_IPHONE && defined(__IPHONE_8_0) && __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0)
-__deprecated_msg("GTMURLBuilder is obsolete; update your app to use NSURLComponents queryItems property instead.")
-#endif
-@interface GTMURLBuilder : NSObject {
- @private
- NSMutableDictionary *params_;
-}
-
-@property(nonatomic, readonly) NSString *baseURLString;
-
-// |URLString| is expected to be a valid URL with already escaped parameter
-// values.
-+ (GTMURLBuilder *)builderWithString:(NSString *)URLString;
-+ (GTMURLBuilder *)builderWithURL:(NSURL *)URL;
-
-// |URLString| The base URL to which parameters will be appended.
-// If the URL already contains parameters, they should already be encoded.
-- (id)initWithString:(NSString *)URLString;
-- (void)setValue:(NSString *)value forParameter:(NSString *)parameter;
-- (void)setIntegerValue:(NSInteger)value forParameter:(NSString *)parameter;
-- (NSString *)valueForParameter:(NSString *)parameter;
-// Returns 0 if there is no value for |parameter| or if the value cannot
-// be parsed into an NSInteger. Use valueForParameter if you want to make
-// sure that the value is set before attempting the parsing.
-- (NSInteger)integerValueForParameter:(NSString *)parameter;
-- (void)removeParameter:(NSString *)parameter;
-- (void)setParameters:(NSDictionary *)parameters;
-- (NSDictionary *)parameters;
-- (NSURL *)URL;
-- (NSString *)URLString;
-
-// Case-sensitive comparison of the URL. Also protocol and host are compared
-// as case-sensitive strings. The order of URL parameters is ignored.
-- (BOOL)isEqual:(GTMURLBuilder *)URLBuilder;
-
-@end
diff --git a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Modules/module.modulemap b/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Modules/module.modulemap
deleted file mode 100644
index e8ef72b37..000000000
--- a/Libraries external/Firebase/Analytics/GoogleToolboxForMac.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,6 +0,0 @@
-framework module GoogleToolboxForMac {
- umbrella header "GoogleToolboxForMac.h"
- export *
- module * { export *}
- link "z"
-}
diff --git a/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb.h b/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb.h
deleted file mode 100644
index bf05a63c7..000000000
--- a/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb.h
+++ /dev/null
@@ -1,583 +0,0 @@
-/* Common parts of the nanopb library. Most of these are quite low-level
- * stuff. For the high-level interface, see pb_encode.h and pb_decode.h.
- */
-
-#ifndef PB_H_INCLUDED
-#define PB_H_INCLUDED
-
-/*****************************************************************
- * Nanopb compilation time options. You can change these here by *
- * uncommenting the lines, or on the compiler command line. *
- *****************************************************************/
-
-/* Enable support for dynamically allocated fields */
-/* #define PB_ENABLE_MALLOC 1 */
-
-/* Define this if your CPU / compiler combination does not support
- * unaligned memory access to packed structures. */
-/* #define PB_NO_PACKED_STRUCTS 1 */
-
-/* Increase the number of required fields that are tracked.
- * A compiler warning will tell if you need this. */
-/* #define PB_MAX_REQUIRED_FIELDS 256 */
-
-/* Add support for tag numbers > 255 and fields larger than 255 bytes. */
-/* #define PB_FIELD_16BIT 1 */
-
-/* Add support for tag numbers > 65536 and fields larger than 65536 bytes. */
-/* #define PB_FIELD_32BIT 1 */
-
-/* Disable support for error messages in order to save some code space. */
-/* #define PB_NO_ERRMSG 1 */
-
-/* Disable support for custom streams (support only memory buffers). */
-/* #define PB_BUFFER_ONLY 1 */
-
-/* Switch back to the old-style callback function signature.
- * This was the default until nanopb-0.2.1. */
-/* #define PB_OLD_CALLBACK_STYLE */
-
-
-/******************************************************************
- * You usually don't need to change anything below this line. *
- * Feel free to look around and use the defined macros, though. *
- ******************************************************************/
-
-
-/* Version of the nanopb library. Just in case you want to check it in
- * your own program. */
-#define NANOPB_VERSION nanopb-0.3.8
-
-/* Include all the system headers needed by nanopb. You will need the
- * definitions of the following:
- * - strlen, memcpy, memset functions
- * - [u]int_least8_t, uint_fast8_t, [u]int_least16_t, [u]int32_t, [u]int64_t
- * - size_t
- * - bool
- *
- * If you don't have the standard header files, you can instead provide
- * a custom header that defines or includes all this. In that case,
- * define PB_SYSTEM_HEADER to the path of this file.
- */
-#ifdef PB_SYSTEM_HEADER
-#include PB_SYSTEM_HEADER
-#else
-#include <stdint.h>
-#include <stddef.h>
-#include <stdbool.h>
-#include <string.h>
-
-#ifdef PB_ENABLE_MALLOC
-#include <stdlib.h>
-#endif
-#endif
-
-/* Macro for defining packed structures (compiler dependent).
- * This just reduces memory requirements, but is not required.
- */
-#if defined(PB_NO_PACKED_STRUCTS)
- /* Disable struct packing */
-# define PB_PACKED_STRUCT_START
-# define PB_PACKED_STRUCT_END
-# define pb_packed
-#elif defined(__GNUC__) || defined(__clang__)
- /* For GCC and clang */
-# define PB_PACKED_STRUCT_START
-# define PB_PACKED_STRUCT_END
-# define pb_packed __attribute__((packed))
-#elif defined(__ICCARM__) || defined(__CC_ARM)
- /* For IAR ARM and Keil MDK-ARM compilers */
-# define PB_PACKED_STRUCT_START _Pragma("pack(push, 1)")
-# define PB_PACKED_STRUCT_END _Pragma("pack(pop)")
-# define pb_packed
-#elif defined(_MSC_VER) && (_MSC_VER >= 1500)
- /* For Microsoft Visual C++ */
-# define PB_PACKED_STRUCT_START __pragma(pack(push, 1))
-# define PB_PACKED_STRUCT_END __pragma(pack(pop))
-# define pb_packed
-#else
- /* Unknown compiler */
-# define PB_PACKED_STRUCT_START
-# define PB_PACKED_STRUCT_END
-# define pb_packed
-#endif
-
-/* Handly macro for suppressing unreferenced-parameter compiler warnings. */
-#ifndef PB_UNUSED
-#define PB_UNUSED(x) (void)(x)
-#endif
-
-/* Compile-time assertion, used for checking compatible compilation options.
- * If this does not work properly on your compiler, use
- * #define PB_NO_STATIC_ASSERT to disable it.
- *
- * But before doing that, check carefully the error message / place where it
- * comes from to see if the error has a real cause. Unfortunately the error
- * message is not always very clear to read, but you can see the reason better
- * in the place where the PB_STATIC_ASSERT macro was called.
- */
-#ifndef PB_NO_STATIC_ASSERT
-#ifndef PB_STATIC_ASSERT
-#define PB_STATIC_ASSERT(COND,MSG) typedef char PB_STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1];
-#define PB_STATIC_ASSERT_MSG(MSG, LINE, COUNTER) PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER)
-#define PB_STATIC_ASSERT_MSG_(MSG, LINE, COUNTER) pb_static_assertion_##MSG##LINE##COUNTER
-#endif
-#else
-#define PB_STATIC_ASSERT(COND,MSG)
-#endif
-
-/* Number of required fields to keep track of. */
-#ifndef PB_MAX_REQUIRED_FIELDS
-#define PB_MAX_REQUIRED_FIELDS 64
-#endif
-
-#if PB_MAX_REQUIRED_FIELDS < 64
-#error You should not lower PB_MAX_REQUIRED_FIELDS from the default value (64).
-#endif
-
-/* List of possible field types. These are used in the autogenerated code.
- * Least-significant 4 bits tell the scalar type
- * Most-significant 4 bits specify repeated/required/packed etc.
- */
-
-typedef uint_least8_t pb_type_t;
-
-/**** Field data types ****/
-
-/* Numeric types */
-#define PB_LTYPE_VARINT 0x00 /* int32, int64, enum, bool */
-#define PB_LTYPE_UVARINT 0x01 /* uint32, uint64 */
-#define PB_LTYPE_SVARINT 0x02 /* sint32, sint64 */
-#define PB_LTYPE_FIXED32 0x03 /* fixed32, sfixed32, float */
-#define PB_LTYPE_FIXED64 0x04 /* fixed64, sfixed64, double */
-
-/* Marker for last packable field type. */
-#define PB_LTYPE_LAST_PACKABLE 0x04
-
-/* Byte array with pre-allocated buffer.
- * data_size is the length of the allocated PB_BYTES_ARRAY structure. */
-#define PB_LTYPE_BYTES 0x05
-
-/* String with pre-allocated buffer.
- * data_size is the maximum length. */
-#define PB_LTYPE_STRING 0x06
-
-/* Submessage
- * submsg_fields is pointer to field descriptions */
-#define PB_LTYPE_SUBMESSAGE 0x07
-
-/* Extension pseudo-field
- * The field contains a pointer to pb_extension_t */
-#define PB_LTYPE_EXTENSION 0x08
-
-/* Byte array with inline, pre-allocated byffer.
- * data_size is the length of the inline, allocated buffer.
- * This differs from PB_LTYPE_BYTES by defining the element as
- * pb_byte_t[data_size] rather than pb_bytes_array_t. */
-#define PB_LTYPE_FIXED_LENGTH_BYTES 0x09
-
-/* Number of declared LTYPES */
-#define PB_LTYPES_COUNT 0x0A
-#define PB_LTYPE_MASK 0x0F
-
-/**** Field repetition rules ****/
-
-#define PB_HTYPE_REQUIRED 0x00
-#define PB_HTYPE_OPTIONAL 0x10
-#define PB_HTYPE_REPEATED 0x20
-#define PB_HTYPE_ONEOF 0x30
-#define PB_HTYPE_MASK 0x30
-
-/**** Field allocation types ****/
-
-#define PB_ATYPE_STATIC 0x00
-#define PB_ATYPE_POINTER 0x80
-#define PB_ATYPE_CALLBACK 0x40
-#define PB_ATYPE_MASK 0xC0
-
-#define PB_ATYPE(x) ((x) & PB_ATYPE_MASK)
-#define PB_HTYPE(x) ((x) & PB_HTYPE_MASK)
-#define PB_LTYPE(x) ((x) & PB_LTYPE_MASK)
-
-/* Data type used for storing sizes of struct fields
- * and array counts.
- */
-#if defined(PB_FIELD_32BIT)
- typedef uint32_t pb_size_t;
- typedef int32_t pb_ssize_t;
-#elif defined(PB_FIELD_16BIT)
- typedef uint_least16_t pb_size_t;
- typedef int_least16_t pb_ssize_t;
-#else
- typedef uint_least8_t pb_size_t;
- typedef int_least8_t pb_ssize_t;
-#endif
-#define PB_SIZE_MAX ((pb_size_t)-1)
-
-/* Data type for storing encoded data and other byte streams.
- * This typedef exists to support platforms where uint8_t does not exist.
- * You can regard it as equivalent on uint8_t on other platforms.
- */
-typedef uint_least8_t pb_byte_t;
-
-/* This structure is used in auto-generated constants
- * to specify struct fields.
- * You can change field sizes if you need structures
- * larger than 256 bytes or field tags larger than 256.
- * The compiler should complain if your .proto has such
- * structures. Fix that by defining PB_FIELD_16BIT or
- * PB_FIELD_32BIT.
- */
-PB_PACKED_STRUCT_START
-typedef struct pb_field_s pb_field_t;
-struct pb_field_s {
- pb_size_t tag;
- pb_type_t type;
- pb_size_t data_offset; /* Offset of field data, relative to previous field. */
- pb_ssize_t size_offset; /* Offset of array size or has-boolean, relative to data */
- pb_size_t data_size; /* Data size in bytes for a single item */
- pb_size_t array_size; /* Maximum number of entries in array */
-
- /* Field definitions for submessage
- * OR default value for all other non-array, non-callback types
- * If null, then field will zeroed. */
- const void *ptr;
-} pb_packed;
-PB_PACKED_STRUCT_END
-
-/* Make sure that the standard integer types are of the expected sizes.
- * Otherwise fixed32/fixed64 fields can break.
- *
- * If you get errors here, it probably means that your stdint.h is not
- * correct for your platform.
- */
-PB_STATIC_ASSERT(sizeof(int64_t) == 2 * sizeof(int32_t), INT64_T_WRONG_SIZE)
-PB_STATIC_ASSERT(sizeof(uint64_t) == 2 * sizeof(uint32_t), UINT64_T_WRONG_SIZE)
-
-/* This structure is used for 'bytes' arrays.
- * It has the number of bytes in the beginning, and after that an array.
- * Note that actual structs used will have a different length of bytes array.
- */
-#define PB_BYTES_ARRAY_T(n) struct { pb_size_t size; pb_byte_t bytes[n]; }
-#define PB_BYTES_ARRAY_T_ALLOCSIZE(n) ((size_t)n + offsetof(pb_bytes_array_t, bytes))
-
-struct pb_bytes_array_s {
- pb_size_t size;
- pb_byte_t bytes[1];
-};
-typedef struct pb_bytes_array_s pb_bytes_array_t;
-
-/* This structure is used for giving the callback function.
- * It is stored in the message structure and filled in by the method that
- * calls pb_decode.
- *
- * The decoding callback will be given a limited-length stream
- * If the wire type was string, the length is the length of the string.
- * If the wire type was a varint/fixed32/fixed64, the length is the length
- * of the actual value.
- * The function may be called multiple times (especially for repeated types,
- * but also otherwise if the message happens to contain the field multiple
- * times.)
- *
- * The encoding callback will receive the actual output stream.
- * It should write all the data in one call, including the field tag and
- * wire type. It can write multiple fields.
- *
- * The callback can be null if you want to skip a field.
- */
-typedef struct pb_istream_s pb_istream_t;
-typedef struct pb_ostream_s pb_ostream_t;
-typedef struct pb_callback_s pb_callback_t;
-struct pb_callback_s {
-#ifdef PB_OLD_CALLBACK_STYLE
- /* Deprecated since nanopb-0.2.1 */
- union {
- bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void *arg);
- bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, const void *arg);
- } funcs;
-#else
- /* New function signature, which allows modifying arg contents in callback. */
- union {
- bool (*decode)(pb_istream_t *stream, const pb_field_t *field, void **arg);
- bool (*encode)(pb_ostream_t *stream, const pb_field_t *field, void * const *arg);
- } funcs;
-#endif
-
- /* Free arg for use by callback */
- void *arg;
-};
-
-/* Wire types. Library user needs these only in encoder callbacks. */
-typedef enum {
- PB_WT_VARINT = 0,
- PB_WT_64BIT = 1,
- PB_WT_STRING = 2,
- PB_WT_32BIT = 5
-} pb_wire_type_t;
-
-/* Structure for defining the handling of unknown/extension fields.
- * Usually the pb_extension_type_t structure is automatically generated,
- * while the pb_extension_t structure is created by the user. However,
- * if you want to catch all unknown fields, you can also create a custom
- * pb_extension_type_t with your own callback.
- */
-typedef struct pb_extension_type_s pb_extension_type_t;
-typedef struct pb_extension_s pb_extension_t;
-struct pb_extension_type_s {
- /* Called for each unknown field in the message.
- * If you handle the field, read off all of its data and return true.
- * If you do not handle the field, do not read anything and return true.
- * If you run into an error, return false.
- * Set to NULL for default handler.
- */
- bool (*decode)(pb_istream_t *stream, pb_extension_t *extension,
- uint32_t tag, pb_wire_type_t wire_type);
-
- /* Called once after all regular fields have been encoded.
- * If you have something to write, do so and return true.
- * If you do not have anything to write, just return true.
- * If you run into an error, return false.
- * Set to NULL for default handler.
- */
- bool (*encode)(pb_ostream_t *stream, const pb_extension_t *extension);
-
- /* Free field for use by the callback. */
- const void *arg;
-};
-
-struct pb_extension_s {
- /* Type describing the extension field. Usually you'll initialize
- * this to a pointer to the automatically generated structure. */
- const pb_extension_type_t *type;
-
- /* Destination for the decoded data. This must match the datatype
- * of the extension field. */
- void *dest;
-
- /* Pointer to the next extension handler, or NULL.
- * If this extension does not match a field, the next handler is
- * automatically called. */
- pb_extension_t *next;
-
- /* The decoder sets this to true if the extension was found.
- * Ignored for encoding. */
- bool found;
-};
-
-/* Memory allocation functions to use. You can define pb_realloc and
- * pb_free to custom functions if you want. */
-#ifdef PB_ENABLE_MALLOC
-# ifndef pb_realloc
-# define pb_realloc(ptr, size) realloc(ptr, size)
-# endif
-# ifndef pb_free
-# define pb_free(ptr) free(ptr)
-# endif
-#endif
-
-/* This is used to inform about need to regenerate .pb.h/.pb.c files. */
-#define PB_PROTO_HEADER_VERSION 30
-
-/* These macros are used to declare pb_field_t's in the constant array. */
-/* Size of a structure member, in bytes. */
-#define pb_membersize(st, m) (sizeof ((st*)0)->m)
-/* Number of entries in an array. */
-#define pb_arraysize(st, m) (pb_membersize(st, m) / pb_membersize(st, m[0]))
-/* Delta from start of one member to the start of another member. */
-#define pb_delta(st, m1, m2) ((int)offsetof(st, m1) - (int)offsetof(st, m2))
-/* Marks the end of the field list */
-#define PB_LAST_FIELD {0,(pb_type_t) 0,0,0,0,0,0}
-
-/* Macros for filling in the data_offset field */
-/* data_offset for first field in a message */
-#define PB_DATAOFFSET_FIRST(st, m1, m2) (offsetof(st, m1))
-/* data_offset for subsequent fields */
-#define PB_DATAOFFSET_OTHER(st, m1, m2) (offsetof(st, m1) - offsetof(st, m2) - pb_membersize(st, m2))
-/* data offset for subsequent fields inside an union (oneof) */
-#define PB_DATAOFFSET_UNION(st, m1, m2) (PB_SIZE_MAX)
-/* Choose first/other based on m1 == m2 (deprecated, remains for backwards compatibility) */
-#define PB_DATAOFFSET_CHOOSE(st, m1, m2) (int)(offsetof(st, m1) == offsetof(st, m2) \
- ? PB_DATAOFFSET_FIRST(st, m1, m2) \
- : PB_DATAOFFSET_OTHER(st, m1, m2))
-
-/* Required fields are the simplest. They just have delta (padding) from
- * previous field end, and the size of the field. Pointer is used for
- * submessages and default values.
- */
-#define PB_REQUIRED_STATIC(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \
- fd, 0, pb_membersize(st, m), 0, ptr}
-
-/* Optional fields add the delta to the has_ variable. */
-#define PB_OPTIONAL_STATIC(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \
- fd, \
- pb_delta(st, has_ ## m, m), \
- pb_membersize(st, m), 0, ptr}
-
-#define PB_SINGULAR_STATIC(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_STATIC | PB_HTYPE_OPTIONAL | ltype, \
- fd, 0, pb_membersize(st, m), 0, ptr}
-
-/* Repeated fields have a _count field and also the maximum number of entries. */
-#define PB_REPEATED_STATIC(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_STATIC | PB_HTYPE_REPEATED | ltype, \
- fd, \
- pb_delta(st, m ## _count, m), \
- pb_membersize(st, m[0]), \
- pb_arraysize(st, m), ptr}
-
-/* Allocated fields carry the size of the actual data, not the pointer */
-#define PB_REQUIRED_POINTER(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_POINTER | PB_HTYPE_REQUIRED | ltype, \
- fd, 0, pb_membersize(st, m[0]), 0, ptr}
-
-/* Optional fields don't need a has_ variable, as information would be redundant */
-#define PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \
- fd, 0, pb_membersize(st, m[0]), 0, ptr}
-
-/* Same as optional fields*/
-#define PB_SINGULAR_POINTER(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_POINTER | PB_HTYPE_OPTIONAL | ltype, \
- fd, 0, pb_membersize(st, m[0]), 0, ptr}
-
-/* Repeated fields have a _count field and a pointer to array of pointers */
-#define PB_REPEATED_POINTER(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_POINTER | PB_HTYPE_REPEATED | ltype, \
- fd, pb_delta(st, m ## _count, m), \
- pb_membersize(st, m[0]), 0, ptr}
-
-/* Callbacks are much like required fields except with special datatype. */
-#define PB_REQUIRED_CALLBACK(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REQUIRED | ltype, \
- fd, 0, pb_membersize(st, m), 0, ptr}
-
-#define PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \
- fd, 0, pb_membersize(st, m), 0, ptr}
-
-#define PB_SINGULAR_CALLBACK(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \
- fd, 0, pb_membersize(st, m), 0, ptr}
-
-#define PB_REPEATED_CALLBACK(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_CALLBACK | PB_HTYPE_REPEATED | ltype, \
- fd, 0, pb_membersize(st, m), 0, ptr}
-
-/* Optional extensions don't have the has_ field, as that would be redundant.
- * Furthermore, the combination of OPTIONAL without has_ field is used
- * for indicating proto3 style fields. Extensions exist in proto2 mode only,
- * so they should be encoded according to proto2 rules. To avoid the conflict,
- * extensions are marked as REQUIRED instead.
- */
-#define PB_OPTEXT_STATIC(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_STATIC | PB_HTYPE_REQUIRED | ltype, \
- 0, \
- 0, \
- pb_membersize(st, m), 0, ptr}
-
-#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \
- PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr)
-
-#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \
- PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr)
-
-/* The mapping from protobuf types to LTYPEs is done using these macros. */
-#define PB_LTYPE_MAP_BOOL PB_LTYPE_VARINT
-#define PB_LTYPE_MAP_BYTES PB_LTYPE_BYTES
-#define PB_LTYPE_MAP_DOUBLE PB_LTYPE_FIXED64
-#define PB_LTYPE_MAP_ENUM PB_LTYPE_VARINT
-#define PB_LTYPE_MAP_UENUM PB_LTYPE_UVARINT
-#define PB_LTYPE_MAP_FIXED32 PB_LTYPE_FIXED32
-#define PB_LTYPE_MAP_FIXED64 PB_LTYPE_FIXED64
-#define PB_LTYPE_MAP_FLOAT PB_LTYPE_FIXED32
-#define PB_LTYPE_MAP_INT32 PB_LTYPE_VARINT
-#define PB_LTYPE_MAP_INT64 PB_LTYPE_VARINT
-#define PB_LTYPE_MAP_MESSAGE PB_LTYPE_SUBMESSAGE
-#define PB_LTYPE_MAP_SFIXED32 PB_LTYPE_FIXED32
-#define PB_LTYPE_MAP_SFIXED64 PB_LTYPE_FIXED64
-#define PB_LTYPE_MAP_SINT32 PB_LTYPE_SVARINT
-#define PB_LTYPE_MAP_SINT64 PB_LTYPE_SVARINT
-#define PB_LTYPE_MAP_STRING PB_LTYPE_STRING
-#define PB_LTYPE_MAP_UINT32 PB_LTYPE_UVARINT
-#define PB_LTYPE_MAP_UINT64 PB_LTYPE_UVARINT
-#define PB_LTYPE_MAP_EXTENSION PB_LTYPE_EXTENSION
-#define PB_LTYPE_MAP_FIXED_LENGTH_BYTES PB_LTYPE_FIXED_LENGTH_BYTES
-
-/* This is the actual macro used in field descriptions.
- * It takes these arguments:
- * - Field tag number
- * - Field type: BOOL, BYTES, DOUBLE, ENUM, UENUM, FIXED32, FIXED64,
- * FLOAT, INT32, INT64, MESSAGE, SFIXED32, SFIXED64
- * SINT32, SINT64, STRING, UINT32, UINT64 or EXTENSION
- * - Field rules: REQUIRED, OPTIONAL or REPEATED
- * - Allocation: STATIC, CALLBACK or POINTER
- * - Placement: FIRST or OTHER, depending on if this is the first field in structure.
- * - Message name
- * - Field name
- * - Previous field name (or field name again for first field)
- * - Pointer to default value or submsg fields.
- */
-
-#define PB_FIELD(tag, type, rules, allocation, placement, message, field, prevfield, ptr) \
- PB_ ## rules ## _ ## allocation(tag, message, field, \
- PB_DATAOFFSET_ ## placement(message, field, prevfield), \
- PB_LTYPE_MAP_ ## type, ptr)
-
-/* Field description for oneof fields. This requires taking into account the
- * union name also, that's why a separate set of macros is needed.
- */
-#define PB_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \
- fd, pb_delta(st, which_ ## u, u.m), \
- pb_membersize(st, u.m), 0, ptr}
-
-#define PB_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \
- fd, pb_delta(st, which_ ## u, u.m), \
- pb_membersize(st, u.m[0]), 0, ptr}
-
-#define PB_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \
- PB_ONEOF_ ## allocation(union_name, tag, message, field, \
- PB_DATAOFFSET_ ## placement(message, union_name.field, prevfield), \
- PB_LTYPE_MAP_ ## type, ptr)
-
-#define PB_ANONYMOUS_ONEOF_STATIC(u, tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_STATIC | PB_HTYPE_ONEOF | ltype, \
- fd, pb_delta(st, which_ ## u, m), \
- pb_membersize(st, m), 0, ptr}
-
-#define PB_ANONYMOUS_ONEOF_POINTER(u, tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_POINTER | PB_HTYPE_ONEOF | ltype, \
- fd, pb_delta(st, which_ ## u, m), \
- pb_membersize(st, m[0]), 0, ptr}
-
-#define PB_ANONYMOUS_ONEOF_FIELD(union_name, tag, type, rules, allocation, placement, message, field, prevfield, ptr) \
- PB_ANONYMOUS_ONEOF_ ## allocation(union_name, tag, message, field, \
- PB_DATAOFFSET_ ## placement(message, field, prevfield), \
- PB_LTYPE_MAP_ ## type, ptr)
-
-/* These macros are used for giving out error messages.
- * They are mostly a debugging aid; the main error information
- * is the true/false return value from functions.
- * Some code space can be saved by disabling the error
- * messages if not used.
- *
- * PB_SET_ERROR() sets the error message if none has been set yet.
- * msg must be a constant string literal.
- * PB_GET_ERROR() always returns a pointer to a string.
- * PB_RETURN_ERROR() sets the error and returns false from current
- * function.
- */
-#ifdef PB_NO_ERRMSG
-#define PB_SET_ERROR(stream, msg) PB_UNUSED(stream)
-#define PB_GET_ERROR(stream) "(errmsg disabled)"
-#else
-#define PB_SET_ERROR(stream, msg) (stream->errmsg = (stream)->errmsg ? (stream)->errmsg : (msg))
-#define PB_GET_ERROR(stream) ((stream)->errmsg ? (stream)->errmsg : "(none)")
-#endif
-
-#define PB_RETURN_ERROR(stream, msg) return PB_SET_ERROR(stream, msg), false
-
-#endif
diff --git a/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_common.h b/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_common.h
deleted file mode 100644
index 60b3d3749..000000000
--- a/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_common.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* pb_common.h: Common support functions for pb_encode.c and pb_decode.c.
- * These functions are rarely needed by applications directly.
- */
-
-#ifndef PB_COMMON_H_INCLUDED
-#define PB_COMMON_H_INCLUDED
-
-#include "pb.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Iterator for pb_field_t list */
-struct pb_field_iter_s {
- const pb_field_t *start; /* Start of the pb_field_t array */
- const pb_field_t *pos; /* Current position of the iterator */
- unsigned required_field_index; /* Zero-based index that counts only the required fields */
- void *dest_struct; /* Pointer to start of the structure */
- void *pData; /* Pointer to current field value */
- void *pSize; /* Pointer to count/has field */
-};
-typedef struct pb_field_iter_s pb_field_iter_t;
-
-/* Initialize the field iterator structure to beginning.
- * Returns false if the message type is empty. */
-bool pb_field_iter_begin(pb_field_iter_t *iter, const pb_field_t *fields, void *dest_struct);
-
-/* Advance the iterator to the next field.
- * Returns false when the iterator wraps back to the first field. */
-bool pb_field_iter_next(pb_field_iter_t *iter);
-
-/* Advance the iterator until it points at a field with the given tag.
- * Returns false if no such field exists. */
-bool pb_field_iter_find(pb_field_iter_t *iter, uint32_t tag);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
-
diff --git a/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_decode.h b/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_decode.h
deleted file mode 100644
index a426bdd70..000000000
--- a/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_decode.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* pb_decode.h: Functions to decode protocol buffers. Depends on pb_decode.c.
- * The main function is pb_decode. You also need an input stream, and the
- * field descriptions created by nanopb_generator.py.
- */
-
-#ifndef PB_DECODE_H_INCLUDED
-#define PB_DECODE_H_INCLUDED
-
-#include "pb.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Structure for defining custom input streams. You will need to provide
- * a callback function to read the bytes from your storage, which can be
- * for example a file or a network socket.
- *
- * The callback must conform to these rules:
- *
- * 1) Return false on IO errors. This will cause decoding to abort.
- * 2) You can use state to store your own data (e.g. buffer pointer),
- * and rely on pb_read to verify that no-body reads past bytes_left.
- * 3) Your callback may be used with substreams, in which case bytes_left
- * is different than from the main stream. Don't use bytes_left to compute
- * any pointers.
- */
-struct pb_istream_s
-{
-#ifdef PB_BUFFER_ONLY
- /* Callback pointer is not used in buffer-only configuration.
- * Having an int pointer here allows binary compatibility but
- * gives an error if someone tries to assign callback function.
- */
- int *callback;
-#else
- bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count);
-#endif
-
- void *state; /* Free field for use by callback implementation */
- size_t bytes_left;
-
-#ifndef PB_NO_ERRMSG
- const char *errmsg;
-#endif
-};
-
-/***************************
- * Main decoding functions *
- ***************************/
-
-/* Decode a single protocol buffers message from input stream into a C structure.
- * Returns true on success, false on any failure.
- * The actual struct pointed to by dest must match the description in fields.
- * Callback fields of the destination structure must be initialized by caller.
- * All other fields will be initialized by this function.
- *
- * Example usage:
- * MyMessage msg = {};
- * uint8_t buffer[64];
- * pb_istream_t stream;
- *
- * // ... read some data into buffer ...
- *
- * stream = pb_istream_from_buffer(buffer, count);
- * pb_decode(&stream, MyMessage_fields, &msg);
- */
-bool pb_decode(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct);
-
-/* Same as pb_decode, except does not initialize the destination structure
- * to default values. This is slightly faster if you need no default values
- * and just do memset(struct, 0, sizeof(struct)) yourself.
- *
- * This can also be used for 'merging' two messages, i.e. update only the
- * fields that exist in the new message.
- *
- * Note: If this function returns with an error, it will not release any
- * dynamically allocated fields. You will need to call pb_release() yourself.
- */
-bool pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct);
-
-/* Same as pb_decode, except expects the stream to start with the message size
- * encoded as varint. Corresponds to parseDelimitedFrom() in Google's
- * protobuf API.
- */
-bool pb_decode_delimited(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct);
-
-#ifdef PB_ENABLE_MALLOC
-/* Release any allocated pointer fields. If you use dynamic allocation, you should
- * call this for any successfully decoded message when you are done with it. If
- * pb_decode() returns with an error, the message is already released.
- */
-void pb_release(const pb_field_t fields[], void *dest_struct);
-#endif
-
-
-/**************************************
- * Functions for manipulating streams *
- **************************************/
-
-/* Create an input stream for reading from a memory buffer.
- *
- * Alternatively, you can use a custom stream that reads directly from e.g.
- * a file or a network socket.
- */
-pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t bufsize);
-
-/* Function to read from a pb_istream_t. You can use this if you need to
- * read some custom header data, or to read data in field callbacks.
- */
-bool pb_read(pb_istream_t *stream, pb_byte_t *buf, size_t count);
-
-
-/************************************************
- * Helper functions for writing field callbacks *
- ************************************************/
-
-/* Decode the tag for the next field in the stream. Gives the wire type and
- * field tag. At end of the message, returns false and sets eof to true. */
-bool pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof);
-
-/* Skip the field payload data, given the wire type. */
-bool pb_skip_field(pb_istream_t *stream, pb_wire_type_t wire_type);
-
-/* Decode an integer in the varint format. This works for bool, enum, int32,
- * int64, uint32 and uint64 field types. */
-bool pb_decode_varint(pb_istream_t *stream, uint64_t *dest);
-
-/* Decode an integer in the varint format. This works for bool, enum, int32,
- * and uint32 field types. */
-bool pb_decode_varint32(pb_istream_t *stream, uint32_t *dest);
-
-/* Decode an integer in the zig-zagged svarint format. This works for sint32
- * and sint64. */
-bool pb_decode_svarint(pb_istream_t *stream, int64_t *dest);
-
-/* Decode a fixed32, sfixed32 or float value. You need to pass a pointer to
- * a 4-byte wide C variable. */
-bool pb_decode_fixed32(pb_istream_t *stream, void *dest);
-
-/* Decode a fixed64, sfixed64 or double value. You need to pass a pointer to
- * a 8-byte wide C variable. */
-bool pb_decode_fixed64(pb_istream_t *stream, void *dest);
-
-/* Make a limited-length substream for reading a PB_WT_STRING field. */
-bool pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream);
-bool pb_close_string_substream(pb_istream_t *stream, pb_istream_t *substream);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_encode.h b/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_encode.h
deleted file mode 100644
index d9909fb01..000000000
--- a/Libraries external/Firebase/Analytics/nanopb.framework/Headers/pb_encode.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/* pb_encode.h: Functions to encode protocol buffers. Depends on pb_encode.c.
- * The main function is pb_encode. You also need an output stream, and the
- * field descriptions created by nanopb_generator.py.
- */
-
-#ifndef PB_ENCODE_H_INCLUDED
-#define PB_ENCODE_H_INCLUDED
-
-#include "pb.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Structure for defining custom output streams. You will need to provide
- * a callback function to write the bytes to your storage, which can be
- * for example a file or a network socket.
- *
- * The callback must conform to these rules:
- *
- * 1) Return false on IO errors. This will cause encoding to abort.
- * 2) You can use state to store your own data (e.g. buffer pointer).
- * 3) pb_write will update bytes_written after your callback runs.
- * 4) Substreams will modify max_size and bytes_written. Don't use them
- * to calculate any pointers.
- */
-struct pb_ostream_s
-{
-#ifdef PB_BUFFER_ONLY
- /* Callback pointer is not used in buffer-only configuration.
- * Having an int pointer here allows binary compatibility but
- * gives an error if someone tries to assign callback function.
- * Also, NULL pointer marks a 'sizing stream' that does not
- * write anything.
- */
- int *callback;
-#else
- bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
-#endif
- void *state; /* Free field for use by callback implementation. */
- size_t max_size; /* Limit number of output bytes written (or use SIZE_MAX). */
- size_t bytes_written; /* Number of bytes written so far. */
-
-#ifndef PB_NO_ERRMSG
- const char *errmsg;
-#endif
-};
-
-/***************************
- * Main encoding functions *
- ***************************/
-
-/* Encode a single protocol buffers message from C structure into a stream.
- * Returns true on success, false on any failure.
- * The actual struct pointed to by src_struct must match the description in fields.
- * All required fields in the struct are assumed to have been filled in.
- *
- * Example usage:
- * MyMessage msg = {};
- * uint8_t buffer[64];
- * pb_ostream_t stream;
- *
- * msg.field1 = 42;
- * stream = pb_ostream_from_buffer(buffer, sizeof(buffer));
- * pb_encode(&stream, MyMessage_fields, &msg);
- */
-bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct);
-
-/* Same as pb_encode, but prepends the length of the message as a varint.
- * Corresponds to writeDelimitedTo() in Google's protobuf API.
- */
-bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct);
-
-/* Encode the message to get the size of the encoded data, but do not store
- * the data. */
-bool pb_get_encoded_size(size_t *size, const pb_field_t fields[], const void *src_struct);
-
-/**************************************
- * Functions for manipulating streams *
- **************************************/
-
-/* Create an output stream for writing into a memory buffer.
- * The number of bytes written can be found in stream.bytes_written after
- * encoding the message.
- *
- * Alternatively, you can use a custom stream that writes directly to e.g.
- * a file or a network socket.
- */
-pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize);
-
-/* Pseudo-stream for measuring the size of a message without actually storing
- * the encoded data.
- *
- * Example usage:
- * MyMessage msg = {};
- * pb_ostream_t stream = PB_OSTREAM_SIZING;
- * pb_encode(&stream, MyMessage_fields, &msg);
- * printf("Message size is %d\n", stream.bytes_written);
- */
-#ifndef PB_NO_ERRMSG
-#define PB_OSTREAM_SIZING {0,0,0,0,0}
-#else
-#define PB_OSTREAM_SIZING {0,0,0,0}
-#endif
-
-/* Function to write into a pb_ostream_t stream. You can use this if you need
- * to append or prepend some custom headers to the message.
- */
-bool pb_write(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
-
-
-/************************************************
- * Helper functions for writing field callbacks *
- ************************************************/
-
-/* Encode field header based on type and field number defined in the field
- * structure. Call this from the callback before writing out field contents. */
-bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field);
-
-/* Encode field header by manually specifing wire type. You need to use this
- * if you want to write out packed arrays from a callback field. */
-bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number);
-
-/* Encode an integer in the varint format.
- * This works for bool, enum, int32, int64, uint32 and uint64 field types. */
-bool pb_encode_varint(pb_ostream_t *stream, uint64_t value);
-
-/* Encode an integer in the zig-zagged svarint format.
- * This works for sint32 and sint64. */
-bool pb_encode_svarint(pb_ostream_t *stream, int64_t value);
-
-/* Encode a string or bytes type field. For strings, pass strlen(s) as size. */
-bool pb_encode_string(pb_ostream_t *stream, const pb_byte_t *buffer, size_t size);
-
-/* Encode a fixed32, sfixed32 or float value.
- * You need to pass a pointer to a 4-byte wide C variable. */
-bool pb_encode_fixed32(pb_ostream_t *stream, const void *value);
-
-/* Encode a fixed64, sfixed64 or double value.
- * You need to pass a pointer to a 8-byte wide C variable. */
-bool pb_encode_fixed64(pb_ostream_t *stream, const void *value);
-
-/* Encode a submessage field.
- * You need to pass the pb_field_t array and pointer to struct, just like
- * with pb_encode(). This internally encodes the submessage twice, first to
- * calculate message size and then to actually write it out.
- */
-bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct);
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#endif
diff --git a/Libraries external/Firebase/Analytics/nanopb.framework/Modules/module.modulemap b/Libraries external/Firebase/Analytics/nanopb.framework/Modules/module.modulemap
deleted file mode 100644
index 91c3a63de..000000000
--- a/Libraries external/Firebase/Analytics/nanopb.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,5 +0,0 @@
-framework module nanopb {
- umbrella header "nanopb.h"
- export *
- module * { export *}
-}
diff --git a/Libraries external/Firebase/Analytics/nanopb.framework/nanopb b/Libraries external/Firebase/Analytics/nanopb.framework/nanopb
deleted file mode 100644
index 9a39b3088..000000000
--- a/Libraries external/Firebase/Analytics/nanopb.framework/nanopb
+++ /dev/null
Binary files differ
diff --git a/Libraries external/Firebase/Firebase.h b/Libraries external/Firebase/Firebase.h
deleted file mode 100644
index 8defb6158..000000000
--- a/Libraries external/Firebase/Firebase.h
+++ /dev/null
@@ -1,101 +0,0 @@
-#import <FirebaseCore/FirebaseCore.h>
-
-#if !defined(__has_include)
- #error "Firebase.h won't import anything if your compiler doesn't support __has_include. Please \
- import the headers individually."
-#else
- #if __has_include(<FirebaseAnalytics/FirebaseAnalytics.h>)
- #import <FirebaseAnalytics/FirebaseAnalytics.h>
- #else
- #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING
- #warning "FirebaseAnalytics.framework is not included in your target. Please add \
-`Firebase/Core` to your Podfile or add FirebaseAnalytics.framework to your project to ensure \
-Firebase services work as intended."
- #endif // #ifndef FIREBASE_ANALYTICS_SUPPRESS_WARNING
- #endif
-
- #if __has_include(<FirebaseAuth/FirebaseAuth.h>)
- #import <FirebaseAuth/FirebaseAuth.h>
- #endif
-
- #if __has_include(<FirebaseCrash/FirebaseCrash.h>)
- #import <FirebaseCrash/FirebaseCrash.h>
- #endif
-
- #if __has_include(<FirebaseDatabase/FirebaseDatabase.h>)
- #import <FirebaseDatabase/FirebaseDatabase.h>
- #endif
-
- #if __has_include(<FirebaseDynamicLinks/FirebaseDynamicLinks.h>)
- #import <FirebaseDynamicLinks/FirebaseDynamicLinks.h>
- #endif
-
- #if __has_include(<FirebaseFirestore/FirebaseFirestore.h>)
- #import <FirebaseFirestore/FirebaseFirestore.h>
- #endif
-
- #if __has_include(<FirebaseFunctions/FirebaseFunctions.h>)
- #import <FirebaseFunctions/FirebaseFunctions.h>
- #endif
-
- #if __has_include(<FirebaseInstanceID/FirebaseInstanceID.h>)
- #import <FirebaseInstanceID/FirebaseInstanceID.h>
- #endif
-
- #if __has_include(<FirebaseInvites/FirebaseInvites.h>)
- #import <FirebaseInvites/FirebaseInvites.h>
- #endif
-
- #if __has_include(<FirebaseMessaging/FirebaseMessaging.h>)
- #import <FirebaseMessaging/FirebaseMessaging.h>
- #endif
-
- #if __has_include(<FirebaseMLModelInterpreter/FirebaseMLModelInterpreter.h>)
- #import <FirebaseMLModelInterpreter/FirebaseMLModelInterpreter.h>
- #endif
-
- #if __has_include(<FirebaseMLVision/FirebaseMLVision.h>)
- #import <FirebaseMLVision/FirebaseMLVision.h>
- #endif
-
- #if __has_include(<FirebaseMLVisionBarcodeModel/FirebaseMLVisionBarcodeModel.h>)
- #import <FirebaseMLVisionBarcodeModel/FirebaseMLVisionBarcodeModel.h>
- #endif
-
- #if __has_include(<FirebaseMLVisionFaceModel/FirebaseMLVisionFaceModel.h>)
- #import <FirebaseMLVisionFaceModel/FirebaseMLVisionFaceModel.h>
- #endif
-
- #if __has_include(<FirebaseMLVisionLabelModel/FirebaseMLVisionLabelModel.h>)
- #import <FirebaseMLVisionLabelModel/FirebaseMLVisionLabelModel.h>
- #endif
-
- #if __has_include(<FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>)
- #import <FirebaseMLVisionTextModel/FirebaseMLVisionTextModel.h>
- #endif
-
- #if __has_include(<FirebasePerformance/FirebasePerformance.h>)
- #import <FirebasePerformance/FirebasePerformance.h>
- #endif
-
- #if __has_include(<FirebaseRemoteConfig/FirebaseRemoteConfig.h>)
- #import <FirebaseRemoteConfig/FirebaseRemoteConfig.h>
- #endif
-
- #if __has_include(<FirebaseStorage/FirebaseStorage.h>)
- #import <FirebaseStorage/FirebaseStorage.h>
- #endif
-
- #if __has_include(<GoogleMobileAds/GoogleMobileAds.h>)
- #import <GoogleMobileAds/GoogleMobileAds.h>
- #endif
-
- #if __has_include(<Fabric/Fabric.h>)
- #import <Fabric/Fabric.h>
- #endif
-
- #if __has_include(<Crashlytics/Crashlytics.h>)
- #import <Crashlytics/Crashlytics.h>
- #endif
-
-#endif // defined(__has_include)
diff --git a/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging b/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging
deleted file mode 100644
index 2b27f178f..000000000
--- a/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/FirebaseMessaging
+++ /dev/null
Binary files differ
diff --git a/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h b/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h
deleted file mode 100644
index e58a216c2..000000000
--- a/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Headers/FIRMessaging.h
+++ /dev/null
@@ -1,527 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * @related FIRMessaging
- *
- * The completion handler invoked when the registration token returns.
- * If the call fails we return the appropriate `error code`, described by
- * `FIRMessagingError`.
- *
- * @param FCMToken The valid registration token returned by FCM.
- * @param error The error describing why a token request failed. The error code
- * will match a value from the FIRMessagingError enumeration.
- */
-typedef void(^FIRMessagingFCMTokenFetchCompletion)(NSString * _Nullable FCMToken,
- NSError * _Nullable error)
- NS_SWIFT_NAME(MessagingFCMTokenFetchCompletion);
-
-
-/**
- * @related FIRMessaging
- *
- * The completion handler invoked when the registration token deletion request is
- * completed. If the call fails we return the appropriate `error code`, described
- * by `FIRMessagingError`.
- *
- * @param error The error describing why a token deletion failed. The error code
- * will match a value from the FIRMessagingError enumeration.
- */
-typedef void(^FIRMessagingDeleteFCMTokenCompletion)(NSError * _Nullable error)
- NS_SWIFT_NAME(MessagingDeleteFCMTokenCompletion);
-
-/**
- * Callback to invoke once the HTTP call to FIRMessaging backend for updating
- * subscription finishes.
- *
- * @param error The error which occurred while updating the subscription topic
- * on the FIRMessaging server. This will be nil in case the operation
- * was successful, or if the operation was cancelled.
- */
-typedef void (^FIRMessagingTopicOperationCompletion)(NSError *_Nullable error);
-
-/**
- * The completion handler invoked once the data connection with FIRMessaging is
- * established. The data connection is used to send a continous stream of
- * data and all the FIRMessaging data notifications arrive through this connection.
- * Once the connection is established we invoke the callback with `nil` error.
- * Correspondingly if we get an error while trying to establish a connection
- * we invoke the handler with an appropriate error object and do an
- * exponential backoff to try and connect again unless successful.
- *
- * @param error The error object if any describing why the data connection
- * to FIRMessaging failed.
- */
-typedef void(^FIRMessagingConnectCompletion)(NSError * __nullable error)
- NS_SWIFT_NAME(MessagingConnectCompletion)
- __deprecated_msg("Please listen for the FIRMessagingConnectionStateChangedNotification "
- "NSNotification instead.");
-
-#if defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-/**
- * Notification sent when the upstream message has been delivered
- * successfully to the server. The notification object will be the messageID
- * of the successfully delivered message.
- */
-FOUNDATION_EXPORT const NSNotificationName FIRMessagingSendSuccessNotification
- NS_SWIFT_NAME(MessagingSendSuccess);
-
-/**
- * Notification sent when the upstream message was failed to be sent to the
- * server. The notification object will be the messageID of the failed
- * message. The userInfo dictionary will contain the relevant error
- * information for the failure.
- */
-FOUNDATION_EXPORT const NSNotificationName FIRMessagingSendErrorNotification
- NS_SWIFT_NAME(MessagingSendError);
-
-/**
- * Notification sent when the Firebase messaging server deletes pending
- * messages due to exceeded storage limits. This may occur, for example, when
- * the device cannot be reached for an extended period of time.
- *
- * It is recommended to retrieve any missing messages directly from the
- * server.
- */
-FOUNDATION_EXPORT const NSNotificationName FIRMessagingMessagesDeletedNotification
- NS_SWIFT_NAME(MessagingMessagesDeleted);
-
-/**
- * Notification sent when Firebase Messaging establishes or disconnects from
- * an FCM socket connection. You can query the connection state in this
- * notification by checking the `isDirectChannelEstablished` property of FIRMessaging.
- */
-FOUNDATION_EXPORT const NSNotificationName FIRMessagingConnectionStateChangedNotification
- NS_SWIFT_NAME(MessagingConnectionStateChanged);
-
-/**
- * Notification sent when the FCM registration token has been refreshed. Please use the
- * FIRMessaging delegate method `messaging:didReceiveRegistrationToken:` to receive current and
- * updated tokens.
- */
-FOUNDATION_EXPORT const NSNotificationName
- FIRMessagingRegistrationTokenRefreshedNotification
- NS_SWIFT_NAME(MessagingRegistrationTokenRefreshed);
-#else
-/**
- * Notification sent when the upstream message has been delivered
- * successfully to the server. The notification object will be the messageID
- * of the successfully delivered message.
- */
-FOUNDATION_EXPORT NSString *const FIRMessagingSendSuccessNotification
- NS_SWIFT_NAME(MessagingSendSuccessNotification);
-
-/**
- * Notification sent when the upstream message was failed to be sent to the
- * server. The notification object will be the messageID of the failed
- * message. The userInfo dictionary will contain the relevant error
- * information for the failure.
- */
-FOUNDATION_EXPORT NSString *const FIRMessagingSendErrorNotification
- NS_SWIFT_NAME(MessagingSendErrorNotification);
-
-/**
- * Notification sent when the Firebase messaging server deletes pending
- * messages due to exceeded storage limits. This may occur, for example, when
- * the device cannot be reached for an extended period of time.
- *
- * It is recommended to retrieve any missing messages directly from the
- * server.
- */
-FOUNDATION_EXPORT NSString *const FIRMessagingMessagesDeletedNotification
- NS_SWIFT_NAME(MessagingMessagesDeletedNotification);
-
-/**
- * Notification sent when Firebase Messaging establishes or disconnects from
- * an FCM socket connection. You can query the connection state in this
- * notification by checking the `isDirectChannelEstablished` property of FIRMessaging.
- */
-FOUNDATION_EXPORT NSString *const FIRMessagingConnectionStateChangedNotification
- NS_SWIFT_NAME(MessagingConnectionStateChangedNotification);
-
-/**
- * Notification sent when the FCM registration token has been refreshed. Please use the
- * FIRMessaging delegate method `messaging:didReceiveRegistrationToken:` to receive current and
- * updated tokens.
- */
-FOUNDATION_EXPORT NSString *const FIRMessagingRegistrationTokenRefreshedNotification
- NS_SWIFT_NAME(MessagingRegistrationTokenRefreshedNotification);
-#endif // defined(__IPHONE_10_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
-
-/**
- * @enum FIRMessagingError
- */
-typedef NS_ENUM(NSUInteger, FIRMessagingError) {
- /// Unknown error.
- FIRMessagingErrorUnknown = 0,
-
- /// FIRMessaging couldn't validate request from this client.
- FIRMessagingErrorAuthentication = 1,
-
- /// InstanceID service cannot be accessed.
- FIRMessagingErrorNoAccess = 2,
-
- /// Request to InstanceID backend timed out.
- FIRMessagingErrorTimeout = 3,
-
- /// No network available to reach the servers.
- FIRMessagingErrorNetwork = 4,
-
- /// Another similar operation in progress, bailing this one.
- FIRMessagingErrorOperationInProgress = 5,
-
- /// Some parameters of the request were invalid.
- FIRMessagingErrorInvalidRequest = 7,
-} NS_SWIFT_NAME(MessagingError);
-
-/// Status for the downstream message received by the app.
-typedef NS_ENUM(NSInteger, FIRMessagingMessageStatus) {
- /// Unknown status.
- FIRMessagingMessageStatusUnknown,
- /// New downstream message received by the app.
- FIRMessagingMessageStatusNew,
-} NS_SWIFT_NAME(MessagingMessageStatus);
-
-/**
- * The APNS token type for the app. If the token type is set to `UNKNOWN`
- * Firebase Messaging will implicitly try to figure out what the actual token type
- * is from the provisioning profile.
- * Unless you really need to specify the type, you should use the `APNSToken`
- * property instead.
- */
-typedef NS_ENUM(NSInteger, FIRMessagingAPNSTokenType) {
- /// Unknown token type.
- FIRMessagingAPNSTokenTypeUnknown,
- /// Sandbox token type.
- FIRMessagingAPNSTokenTypeSandbox,
- /// Production token type.
- FIRMessagingAPNSTokenTypeProd,
-} NS_SWIFT_NAME(MessagingAPNSTokenType);
-
-/// Information about a downstream message received by the app.
-NS_SWIFT_NAME(MessagingMessageInfo)
-@interface FIRMessagingMessageInfo : NSObject
-
-/// The status of the downstream message
-@property(nonatomic, readonly, assign) FIRMessagingMessageStatus status;
-
-@end
-
-/**
- * A remote data message received by the app via FCM (not just the APNs interface).
- *
- * This is only for devices running iOS 10 or above. To support devices running iOS 9 or below, use
- * the local and remote notifications handlers defined in UIApplicationDelegate protocol.
- */
-NS_SWIFT_NAME(MessagingRemoteMessage)
-@interface FIRMessagingRemoteMessage : NSObject
-
-/// The downstream message received by the application.
-@property(nonatomic, readonly, strong) NSDictionary *appData;
-@end
-
-@class FIRMessaging;
-/**
- * A protocol to handle token update or data message delivery from FCM.
- *
- */
-NS_SWIFT_NAME(MessagingDelegate)
-@protocol FIRMessagingDelegate <NSObject>
-
-@optional
-/// This method will be called once a token is available, or has been refreshed. Typically it
-/// will be called once per app start, but may be called more often, if token is invalidated or
-/// updated. In this method, you should perform operations such as:
-///
-/// * Uploading the FCM token to your application server, so targeted notifications can be sent.
-///
-/// * Subscribing to any topics.
-- (void)messaging:(FIRMessaging *)messaging
- didReceiveRegistrationToken:(NSString *)fcmToken
- NS_SWIFT_NAME(messaging(_:didReceiveRegistrationToken:));
-
-/// This method is called on iOS 10 devices to handle data messages received via FCM through its
-/// direct channel (not via APNS). For iOS 9 and below, the FCM data message is delivered via the
-/// UIApplicationDelegate's -application:didReceiveRemoteNotification: method.
-- (void)messaging:(FIRMessaging *)messaging
- didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage
- NS_SWIFT_NAME(messaging(_:didReceive:))
- __IOS_AVAILABLE(10.0);
-
-@end
-
-/**
- * Firebase Messaging lets you reliably deliver messages at no cost.
- *
- * To send or receive messages, the app must get a
- * registration token from FIRInstanceID. This token authorizes an
- * app server to send messages to an app instance.
- *
- * In order to receive FIRMessaging messages, declare `application:didReceiveRemoteNotification:`.
- */
-NS_SWIFT_NAME(Messaging)
-@interface FIRMessaging : NSObject
-
-/**
- * Delegate to handle FCM token refreshes, and remote data messages received via FCM for devices
- * running iOS 10 or above.
- */
-@property(nonatomic, weak, nullable) id<FIRMessagingDelegate> delegate;
-
-/**
- * When set to `YES`, Firebase Messaging will automatically establish a socket-based, direct
- * channel to the FCM server. Enable this only if you are sending upstream messages or
- * receiving non-APNS, data-only messages in foregrounded apps.
- * Default is `NO`.
- */
-@property(nonatomic) BOOL shouldEstablishDirectChannel;
-
-/**
- * Returns `YES` if the direct channel to the FCM server is active, and `NO` otherwise.
- */
-@property(nonatomic, readonly) BOOL isDirectChannelEstablished;
-
-/**
- * FIRMessaging
- *
- * @return An instance of FIRMessaging.
- */
-+ (instancetype)messaging NS_SWIFT_NAME(messaging());
-
-/**
- * Unavailable. Use +messaging instead.
- */
-- (instancetype)init __attribute__((unavailable("Use +messaging instead.")));
-
-#pragma mark - APNS
-
-/**
- * This property is used to set the APNS Token received by the application delegate.
- *
- * FIRMessaging uses method swizzling to ensure that the APNS token is set
- * automatically. However, if you have disabled swizzling by setting
- * `FirebaseAppDelegateProxyEnabled` to `NO` in your app's
- * Info.plist, you should manually set the APNS token in your application
- * delegate's `-application:didRegisterForRemoteNotificationsWithDeviceToken:`
- * method.
- *
- * If you would like to set the type of the APNS token, rather than relying on
- * automatic detection, see: `-setAPNSToken:type:`.
- */
-@property(nonatomic, copy, nullable) NSData *APNSToken NS_SWIFT_NAME(apnsToken);
-
-/**
- * Set APNS token for the application. This APNS token will be used to register
- * with Firebase Messaging using `FCMToken` or
- * `tokenWithAuthorizedEntity:scope:options:handler`.
- *
- * @param apnsToken The APNS token for the application.
- * @param type The type of APNS token. Debug builds should use
- * FIRMessagingAPNSTokenTypeSandbox. Alternatively, you can supply
- * FIRMessagingAPNSTokenTypeUnknown to have the type automatically
- * detected based on your provisioning profile.
- */
-- (void)setAPNSToken:(NSData *)apnsToken type:(FIRMessagingAPNSTokenType)type;
-
-#pragma mark - FCM Tokens
-
-/**
- * Is Firebase Messaging token auto generation enabled? If this flag is disabled,
- * Firebase Messaging will not generate token automatically for message delivery.
- *
- * If this flag is disabled, Firebase Messaging does not generate new tokens automatically for
- * message delivery. If this flag is enabled, FCM generates a registration token on application
- * start when there is no existing valid token. FCM also generates a new token when an existing
- * token is deleted.
- *
- * This setting is persisted, and is applied on future
- * invocations of your application. Once explicitly set, it overrides any
- * settings in your Info.plist.
- *
- * By default, FCM automatic initialization is enabled. If you need to change the
- * default (for example, because you want to prompt the user before getting token)
- * set FirebaseMessagingAutoInitEnabled to false in your application's Info.plist.
- */
-@property(nonatomic, assign, getter=isAutoInitEnabled) BOOL autoInitEnabled;
-
-/**
- * The FCM token is used to identify this device so that FCM can send notifications to it.
- * It is associated with your APNS token when the APNS token is supplied, so that sending
- * messages to the FCM token will be delivered over APNS.
- *
- * The FCM token is sometimes refreshed automatically. In your FIRMessaging delegate, the
- * delegate method `messaging:didReceiveRegistrationToken:` will be called once a token is
- * available, or has been refreshed. Typically it should be called once per app start, but
- * may be called more often, if token is invalidated or updated.
- *
- * Once you have an FCM token, you should send it to your application server, so it can use
- * the FCM token to send notifications to your device.
- */
-@property(nonatomic, readonly, nullable) NSString *FCMToken NS_SWIFT_NAME(fcmToken);
-
-
-/**
- * Retrieves an FCM registration token for a particular Sender ID. This can be used to allow
- * multiple senders to send notifications to the same device. By providing a different Sender
- * ID than your default when fetching a token, you can create a new FCM token which you can
- * give to a different sender. Both tokens will deliver notifications to your device, and you
- * can revoke a token when you need to.
- *
- * This registration token is not cached by FIRMessaging. FIRMessaging should have an APNS
- * token set before calling this to ensure that notifications can be delivered via APNS using
- * this FCM token. You may re-retrieve the FCM token once you have the APNS token set, to
- * associate it with the FCM token. The default FCM token is automatically associated with
- * the APNS token, if the APNS token data is available.
- *
- * @param senderID The Sender ID for a particular Firebase project.
- * @param completion The completion handler to handle the token request.
- */
-- (void)retrieveFCMTokenForSenderID:(NSString *)senderID
- completion:(FIRMessagingFCMTokenFetchCompletion)completion
- NS_SWIFT_NAME(retrieveFCMToken(forSenderID:completion:));
-
-
-/**
- * Invalidates an FCM token for a particular Sender ID. That Sender ID cannot no longer send
- * notifications to that FCM token.
- *
- * @param senderID The senderID for a particular Firebase project.
- * @param completion The completion handler to handle the token deletion.
- */
-- (void)deleteFCMTokenForSenderID:(NSString *)senderID
- completion:(FIRMessagingDeleteFCMTokenCompletion)completion
- NS_SWIFT_NAME(deleteFCMToken(forSenderID:completion:));
-
-
-#pragma mark - Connect
-
-/**
- * Create a FIRMessaging data connection which will be used to send the data notifications
- * sent by your server. It will also be used to send ACKS and other messages based
- * on the FIRMessaging ACKS and other messages based on the FIRMessaging protocol.
- *
- *
- * @param handler The handler to be invoked once the connection is established.
- * If the connection fails we invoke the handler with an
- * appropriate error code letting you know why it failed. At
- * the same time, FIRMessaging performs exponential backoff to retry
- * establishing a connection and invoke the handler when successful.
- */
-- (void)connectWithCompletion:(FIRMessagingConnectCompletion)handler
- NS_SWIFT_NAME(connect(handler:))
- __deprecated_msg("Please use the shouldEstablishDirectChannel property instead.");
-
-/**
- * Disconnect the current FIRMessaging data connection. This stops any attempts to
- * connect to FIRMessaging. Calling this on an already disconnected client is a no-op.
- *
- * Call this before `teardown` when your app is going to the background.
- * Since the FIRMessaging connection won't be allowed to live when in the background, it is
- * prudent to close the connection.
- */
-- (void)disconnect
- __deprecated_msg("Please use the shouldEstablishDirectChannel property instead.");
-
-#pragma mark - Topics
-
-/**
- * Asynchronously subscribes to a topic.
- *
- * @param topic The name of the topic, for example, @"sports".
- */
-- (void)subscribeToTopic:(NSString *)topic NS_SWIFT_NAME(subscribe(toTopic:));
-
-/**
- * Asynchronously subscribe to the provided topic, retrying on failure.
- *
- * @param topic The topic name to subscribe to, for example, @"sports".
- * @param completion The completion that is invoked once the subscribe call ends.
- * In case of success, nil error is returned. Otherwise, an
- * appropriate error object is returned.
- */
-- (void)subscribeToTopic:(nonnull NSString *)topic
- completion:(nullable FIRMessagingTopicOperationCompletion)completion;
-
-/**
- * Asynchronously unsubscribe from a topic.
- *
- * @param topic The name of the topic, for example @"sports".
- */
-- (void)unsubscribeFromTopic:(NSString *)topic NS_SWIFT_NAME(unsubscribe(fromTopic:));
-
-/**
- * Asynchronously unsubscribe from the provided topic, retrying on failure.
- *
- * @param topic The topic name to unsubscribe from, for example @"sports".
- * @param completion The completion that is invoked once the unsubscribe call ends.
- * In case of success, nil error is returned. Otherwise, an
- * appropriate error object is returned.
- */
-- (void)unsubscribeFromTopic:(nonnull NSString *)topic
- completion:(nullable FIRMessagingTopicOperationCompletion)completion;
-
-#pragma mark - Upstream
-
-/**
- * Sends an upstream ("device to cloud") message.
- *
- * The message is queued if we don't have an active connection.
- * You can only use the upstream feature if your FCM implementation
- * uses the XMPP server protocol.
- *
- * @param message Key/Value pairs to be sent. Values must be String, any
- * other type will be ignored.
- * @param receiver A string identifying the receiver of the message. For FCM
- * project IDs the value is `SENDER_ID@gcm.googleapis.com`.
- * @param messageID The ID of the message. This is generated by the application. It
- * must be unique for each message generated by this application.
- * It allows error callbacks and debugging, to uniquely identify
- * each message.
- * @param ttl The time to live for the message. In case we aren't able to
- * send the message before the TTL expires we will send you a
- * callback. If 0, we'll attempt to send immediately and return
- * an error if we're not connected. Otherwise, the message will
- * be queued. As for server-side messages, we don't return an error
- * if the message has been dropped because of TTL; this can happen
- * on the server side, and it would require extra communication.
- */
-- (void)sendMessage:(NSDictionary *)message
- to:(NSString *)receiver
- withMessageID:(NSString *)messageID
- timeToLive:(int64_t)ttl;
-
-#pragma mark - Analytics
-
-/**
- * Use this to track message delivery and analytics for messages, typically
- * when you receive a notification in `application:didReceiveRemoteNotification:`.
- * However, you only need to call this if you set the `FirebaseAppDelegateProxyEnabled`
- * flag to `NO` in your Info.plist. If `FirebaseAppDelegateProxyEnabled` is either missing
- * or set to `YES` in your Info.plist, the library will call this automatically.
- *
- * @param message The downstream message received by the application.
- *
- * @return Information about the downstream message.
- */
-- (FIRMessagingMessageInfo *)appDidReceiveMessage:(NSDictionary *)message;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h b/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h
deleted file mode 100755
index ef081c90f..000000000
--- a/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Headers/FirebaseMessaging.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright 2017 Google
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import "FIRMessaging.h"
diff --git a/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap b/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap
deleted file mode 100644
index 14c966d22..000000000
--- a/Libraries external/Firebase/Messaging/FirebaseMessaging.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,7 +0,0 @@
-framework module FirebaseMessaging {
- umbrella header "FirebaseMessaging.h"
- export *
- module * { export *}
- link framework "SystemConfiguration"
- link "sqlite3"
-}
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Any.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Any.pbobjc.h
deleted file mode 100644
index ad261898e..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Any.pbobjc.h
+++ /dev/null
@@ -1,182 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/any.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - GPBAnyRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBAnyRoot : GPBRootObject
-@end
-
-#pragma mark - GPBAny
-
-typedef GPB_ENUM(GPBAny_FieldNumber) {
- GPBAny_FieldNumber_TypeURL = 1,
- GPBAny_FieldNumber_Value = 2,
-};
-
-/**
- * `Any` contains an arbitrary serialized protocol buffer message along with a
- * URL that describes the type of the serialized message.
- *
- * Protobuf library provides support to pack/unpack Any values in the form
- * of utility functions or additional generated methods of the Any type.
- *
- * Example 1: Pack and unpack a message in C++.
- *
- * Foo foo = ...;
- * Any any;
- * any.PackFrom(foo);
- * ...
- * if (any.UnpackTo(&foo)) {
- * ...
- * }
- *
- * Example 2: Pack and unpack a message in Java.
- *
- * Foo foo = ...;
- * Any any = Any.pack(foo);
- * ...
- * if (any.is(Foo.class)) {
- * foo = any.unpack(Foo.class);
- * }
- *
- * Example 3: Pack and unpack a message in Python.
- *
- * foo = Foo(...)
- * any = Any()
- * any.Pack(foo)
- * ...
- * if any.Is(Foo.DESCRIPTOR):
- * any.Unpack(foo)
- * ...
- *
- * Example 4: Pack and unpack a message in Go
- *
- * foo := &pb.Foo{...}
- * any, err := ptypes.MarshalAny(foo)
- * ...
- * foo := &pb.Foo{}
- * if err := ptypes.UnmarshalAny(any, foo); err != nil {
- * ...
- * }
- *
- * The pack methods provided by protobuf library will by default use
- * 'type.googleapis.com/full.type.name' as the type URL and the unpack
- * methods only use the fully qualified type name after the last '/'
- * in the type URL, for example "foo.bar.com/x/y.z" will yield type
- * name "y.z".
- *
- *
- * JSON
- * ====
- * The JSON representation of an `Any` value uses the regular
- * representation of the deserialized, embedded message, with an
- * additional field `\@type` which contains the type URL. Example:
- *
- * package google.profile;
- * message Person {
- * string first_name = 1;
- * string last_name = 2;
- * }
- *
- * {
- * "\@type": "type.googleapis.com/google.profile.Person",
- * "firstName": <string>,
- * "lastName": <string>
- * }
- *
- * If the embedded message type is well-known and has a custom JSON
- * representation, that representation will be embedded adding a field
- * `value` which holds the custom JSON in addition to the `\@type`
- * field. Example (for message [google.protobuf.Duration][]):
- *
- * {
- * "\@type": "type.googleapis.com/google.protobuf.Duration",
- * "value": "1.212s"
- * }
- **/
-@interface GPBAny : GPBMessage
-
-/**
- * A URL/resource name that uniquely identifies the type of the serialized
- * protocol buffer message. The last segment of the URL's path must represent
- * the fully qualified name of the type (as in
- * `path/google.protobuf.Duration`). The name should be in a canonical form
- * (e.g., leading "." is not accepted).
- *
- * In practice, teams usually precompile into the binary all types that they
- * expect it to use in the context of Any. However, for URLs which use the
- * scheme `http`, `https`, or no scheme, one can optionally set up a type
- * server that maps type URLs to message definitions as follows:
- *
- * * If no scheme is provided, `https` is assumed.
- * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
- * value in binary format, or produce an error.
- * * Applications are allowed to cache lookup results based on the
- * URL, or have them precompiled into a binary to avoid any
- * lookup. Therefore, binary compatibility needs to be preserved
- * on changes to types. (Use versioned type names to manage
- * breaking changes.)
- *
- * Note: this functionality is not currently available in the official
- * protobuf release, and it is not used for type URLs beginning with
- * type.googleapis.com.
- *
- * Schemes other than `http`, `https` (or the empty scheme) might be
- * used with implementation specific semantics.
- **/
-@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
-
-/** Must be a valid serialized protocol buffer of the above specified type. */
-@property(nonatomic, readwrite, copy, null_resettable) NSData *value;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Api.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Api.pbobjc.h
deleted file mode 100644
index c93f3f15d..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Api.pbobjc.h
+++ /dev/null
@@ -1,311 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/api.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-@class GPBMethod;
-@class GPBMixin;
-@class GPBOption;
-@class GPBSourceContext;
-GPB_ENUM_FWD_DECLARE(GPBSyntax);
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - GPBApiRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBApiRoot : GPBRootObject
-@end
-
-#pragma mark - GPBApi
-
-typedef GPB_ENUM(GPBApi_FieldNumber) {
- GPBApi_FieldNumber_Name = 1,
- GPBApi_FieldNumber_MethodsArray = 2,
- GPBApi_FieldNumber_OptionsArray = 3,
- GPBApi_FieldNumber_Version = 4,
- GPBApi_FieldNumber_SourceContext = 5,
- GPBApi_FieldNumber_MixinsArray = 6,
- GPBApi_FieldNumber_Syntax = 7,
-};
-
-/**
- * Api is a light-weight descriptor for an API Interface.
- *
- * Interfaces are also described as "protocol buffer services" in some contexts,
- * such as by the "service" keyword in a .proto file, but they are different
- * from API Services, which represent a concrete implementation of an interface
- * as opposed to simply a description of methods and bindings. They are also
- * sometimes simply referred to as "APIs" in other contexts, such as the name of
- * this message itself. See https://cloud.google.com/apis/design/glossary for
- * detailed terminology.
- **/
-@interface GPBApi : GPBMessage
-
-/**
- * The fully qualified name of this interface, including package name
- * followed by the interface's simple name.
- **/
-@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-
-/** The methods of this interface, in unspecified order. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethod*> *methodsArray;
-/** The number of items in @c methodsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger methodsArray_Count;
-
-/** Any metadata attached to the interface. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
-/** The number of items in @c optionsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger optionsArray_Count;
-
-/**
- * A version string for this interface. If specified, must have the form
- * `major-version.minor-version`, as in `1.10`. If the minor version is
- * omitted, it defaults to zero. If the entire version field is empty, the
- * major version is derived from the package name, as outlined below. If the
- * field is not empty, the version in the package name will be verified to be
- * consistent with what is provided here.
- *
- * The versioning schema uses [semantic
- * versioning](http://semver.org) where the major version number
- * indicates a breaking change and the minor version an additive,
- * non-breaking change. Both version numbers are signals to users
- * what to expect from different versions, and should be carefully
- * chosen based on the product plan.
- *
- * The major version is also reflected in the package name of the
- * interface, which must end in `v<major-version>`, as in
- * `google.feature.v1`. For major versions 0 and 1, the suffix can
- * be omitted. Zero major versions must only be used for
- * experimental, non-GA interfaces.
- **/
-@property(nonatomic, readwrite, copy, null_resettable) NSString *version;
-
-/**
- * Source context for the protocol buffer service represented by this
- * message.
- **/
-@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
-/** Test to see if @c sourceContext has been set. */
-@property(nonatomic, readwrite) BOOL hasSourceContext;
-
-/** Included interfaces. See [Mixin][]. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
-/** The number of items in @c mixinsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger mixinsArray_Count;
-
-/** The source syntax of the service. */
-@property(nonatomic, readwrite) enum GPBSyntax syntax;
-
-@end
-
-/**
- * Fetches the raw value of a @c GPBApi's @c syntax property, even
- * if the value was not defined by the enum at the time the code was generated.
- **/
-int32_t GPBApi_Syntax_RawValue(GPBApi *message);
-/**
- * Sets the raw value of an @c GPBApi's @c syntax property, allowing
- * it to be set to a value that was not defined by the enum at the time the code
- * was generated.
- **/
-void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
-
-#pragma mark - GPBMethod
-
-typedef GPB_ENUM(GPBMethod_FieldNumber) {
- GPBMethod_FieldNumber_Name = 1,
- GPBMethod_FieldNumber_RequestTypeURL = 2,
- GPBMethod_FieldNumber_RequestStreaming = 3,
- GPBMethod_FieldNumber_ResponseTypeURL = 4,
- GPBMethod_FieldNumber_ResponseStreaming = 5,
- GPBMethod_FieldNumber_OptionsArray = 6,
- GPBMethod_FieldNumber_Syntax = 7,
-};
-
-/**
- * Method represents a method of an API interface.
- **/
-@interface GPBMethod : GPBMessage
-
-/** The simple name of this method. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-
-/** A URL of the input message type. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
-
-/** If true, the request is streamed. */
-@property(nonatomic, readwrite) BOOL requestStreaming;
-
-/** The URL of the output message type. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
-
-/** If true, the response is streamed. */
-@property(nonatomic, readwrite) BOOL responseStreaming;
-
-/** Any metadata attached to the method. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
-/** The number of items in @c optionsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger optionsArray_Count;
-
-/** The source syntax of this method. */
-@property(nonatomic, readwrite) enum GPBSyntax syntax;
-
-@end
-
-/**
- * Fetches the raw value of a @c GPBMethod's @c syntax property, even
- * if the value was not defined by the enum at the time the code was generated.
- **/
-int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
-/**
- * Sets the raw value of an @c GPBMethod's @c syntax property, allowing
- * it to be set to a value that was not defined by the enum at the time the code
- * was generated.
- **/
-void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
-
-#pragma mark - GPBMixin
-
-typedef GPB_ENUM(GPBMixin_FieldNumber) {
- GPBMixin_FieldNumber_Name = 1,
- GPBMixin_FieldNumber_Root = 2,
-};
-
-/**
- * Declares an API Interface to be included in this interface. The including
- * interface must redeclare all the methods from the included interface, but
- * documentation and options are inherited as follows:
- *
- * - If after comment and whitespace stripping, the documentation
- * string of the redeclared method is empty, it will be inherited
- * from the original method.
- *
- * - Each annotation belonging to the service config (http,
- * visibility) which is not set in the redeclared method will be
- * inherited.
- *
- * - If an http annotation is inherited, the path pattern will be
- * modified as follows. Any version prefix will be replaced by the
- * version of the including interface plus the [root][] path if
- * specified.
- *
- * Example of a simple mixin:
- *
- * package google.acl.v1;
- * service AccessControl {
- * // Get the underlying ACL object.
- * rpc GetAcl(GetAclRequest) returns (Acl) {
- * option (google.api.http).get = "/v1/{resource=**}:getAcl";
- * }
- * }
- *
- * package google.storage.v2;
- * service Storage {
- * rpc GetAcl(GetAclRequest) returns (Acl);
- *
- * // Get a data record.
- * rpc GetData(GetDataRequest) returns (Data) {
- * option (google.api.http).get = "/v2/{resource=**}";
- * }
- * }
- *
- * Example of a mixin configuration:
- *
- * apis:
- * - name: google.storage.v2.Storage
- * mixins:
- * - name: google.acl.v1.AccessControl
- *
- * The mixin construct implies that all methods in `AccessControl` are
- * also declared with same name and request/response types in
- * `Storage`. A documentation generator or annotation processor will
- * see the effective `Storage.GetAcl` method after inherting
- * documentation and annotations as follows:
- *
- * service Storage {
- * // Get the underlying ACL object.
- * rpc GetAcl(GetAclRequest) returns (Acl) {
- * option (google.api.http).get = "/v2/{resource=**}:getAcl";
- * }
- * ...
- * }
- *
- * Note how the version in the path pattern changed from `v1` to `v2`.
- *
- * If the `root` field in the mixin is specified, it should be a
- * relative path under which inherited HTTP paths are placed. Example:
- *
- * apis:
- * - name: google.storage.v2.Storage
- * mixins:
- * - name: google.acl.v1.AccessControl
- * root: acls
- *
- * This implies the following inherited HTTP annotation:
- *
- * service Storage {
- * // Get the underlying ACL object.
- * rpc GetAcl(GetAclRequest) returns (Acl) {
- * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
- * }
- * ...
- * }
- **/
-@interface GPBMixin : GPBMessage
-
-/** The fully qualified name of the interface which is included. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-
-/**
- * If non-empty specifies a path under which inherited HTTP paths
- * are rooted.
- **/
-@property(nonatomic, readwrite, copy, null_resettable) NSString *root;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Duration.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Duration.pbobjc.h
deleted file mode 100644
index 3e3675907..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Duration.pbobjc.h
+++ /dev/null
@@ -1,145 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/duration.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - GPBDurationRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBDurationRoot : GPBRootObject
-@end
-
-#pragma mark - GPBDuration
-
-typedef GPB_ENUM(GPBDuration_FieldNumber) {
- GPBDuration_FieldNumber_Seconds = 1,
- GPBDuration_FieldNumber_Nanos = 2,
-};
-
-/**
- * A Duration represents a signed, fixed-length span of time represented
- * as a count of seconds and fractions of seconds at nanosecond
- * resolution. It is independent of any calendar and concepts like "day"
- * or "month". It is related to Timestamp in that the difference between
- * two Timestamp values is a Duration and it can be added or subtracted
- * from a Timestamp. Range is approximately +-10,000 years.
- *
- * # Examples
- *
- * Example 1: Compute Duration from two Timestamps in pseudo code.
- *
- * Timestamp start = ...;
- * Timestamp end = ...;
- * Duration duration = ...;
- *
- * duration.seconds = end.seconds - start.seconds;
- * duration.nanos = end.nanos - start.nanos;
- *
- * if (duration.seconds < 0 && duration.nanos > 0) {
- * duration.seconds += 1;
- * duration.nanos -= 1000000000;
- * } else if (durations.seconds > 0 && duration.nanos < 0) {
- * duration.seconds -= 1;
- * duration.nanos += 1000000000;
- * }
- *
- * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
- *
- * Timestamp start = ...;
- * Duration duration = ...;
- * Timestamp end = ...;
- *
- * end.seconds = start.seconds + duration.seconds;
- * end.nanos = start.nanos + duration.nanos;
- *
- * if (end.nanos < 0) {
- * end.seconds -= 1;
- * end.nanos += 1000000000;
- * } else if (end.nanos >= 1000000000) {
- * end.seconds += 1;
- * end.nanos -= 1000000000;
- * }
- *
- * Example 3: Compute Duration from datetime.timedelta in Python.
- *
- * td = datetime.timedelta(days=3, minutes=10)
- * duration = Duration()
- * duration.FromTimedelta(td)
- *
- * # JSON Mapping
- *
- * In JSON format, the Duration type is encoded as a string rather than an
- * object, where the string ends in the suffix "s" (indicating seconds) and
- * is preceded by the number of seconds, with nanoseconds expressed as
- * fractional seconds. For example, 3 seconds with 0 nanoseconds should be
- * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
- * be expressed in JSON format as "3.000000001s", and 3 seconds and 1
- * microsecond should be expressed in JSON format as "3.000001s".
- **/
-@interface GPBDuration : GPBMessage
-
-/**
- * Signed seconds of the span of time. Must be from -315,576,000,000
- * to +315,576,000,000 inclusive. Note: these bounds are computed from:
- * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
- **/
-@property(nonatomic, readwrite) int64_t seconds;
-
-/**
- * Signed fractions of a second at nanosecond resolution of the span
- * of time. Durations less than one second are represented with a 0
- * `seconds` field and a positive or negative `nanos` field. For durations
- * of one second or more, a non-zero value for the `nanos` field must be
- * of the same sign as the `seconds` field. Must be from -999,999,999
- * to +999,999,999 inclusive.
- **/
-@property(nonatomic, readwrite) int32_t nanos;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Empty.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Empty.pbobjc.h
deleted file mode 100644
index fdc247ae4..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Empty.pbobjc.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/empty.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - GPBEmptyRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBEmptyRoot : GPBRootObject
-@end
-
-#pragma mark - GPBEmpty
-
-/**
- * A generic empty message that you can re-use to avoid defining duplicated
- * empty messages in your APIs. A typical example is to use it as the request
- * or the response type of an API method. For instance:
- *
- * service Foo {
- * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
- * }
- *
- * The JSON representation for `Empty` is empty JSON object `{}`.
- **/
-@interface GPBEmpty : GPBMessage
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/FieldMask.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/FieldMask.pbobjc.h
deleted file mode 100644
index 73296d574..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/FieldMask.pbobjc.h
+++ /dev/null
@@ -1,281 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/field_mask.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - GPBFieldMaskRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBFieldMaskRoot : GPBRootObject
-@end
-
-#pragma mark - GPBFieldMask
-
-typedef GPB_ENUM(GPBFieldMask_FieldNumber) {
- GPBFieldMask_FieldNumber_PathsArray = 1,
-};
-
-/**
- * `FieldMask` represents a set of symbolic field paths, for example:
- *
- * paths: "f.a"
- * paths: "f.b.d"
- *
- * Here `f` represents a field in some root message, `a` and `b`
- * fields in the message found in `f`, and `d` a field found in the
- * message in `f.b`.
- *
- * Field masks are used to specify a subset of fields that should be
- * returned by a get operation or modified by an update operation.
- * Field masks also have a custom JSON encoding (see below).
- *
- * # Field Masks in Projections
- *
- * When used in the context of a projection, a response message or
- * sub-message is filtered by the API to only contain those fields as
- * specified in the mask. For example, if the mask in the previous
- * example is applied to a response message as follows:
- *
- * f {
- * a : 22
- * b {
- * d : 1
- * x : 2
- * }
- * y : 13
- * }
- * z: 8
- *
- * The result will not contain specific values for fields x,y and z
- * (their value will be set to the default, and omitted in proto text
- * output):
- *
- *
- * f {
- * a : 22
- * b {
- * d : 1
- * }
- * }
- *
- * A repeated field is not allowed except at the last position of a
- * paths string.
- *
- * If a FieldMask object is not present in a get operation, the
- * operation applies to all fields (as if a FieldMask of all fields
- * had been specified).
- *
- * Note that a field mask does not necessarily apply to the
- * top-level response message. In case of a REST get operation, the
- * field mask applies directly to the response, but in case of a REST
- * list operation, the mask instead applies to each individual message
- * in the returned resource list. In case of a REST custom method,
- * other definitions may be used. Where the mask applies will be
- * clearly documented together with its declaration in the API. In
- * any case, the effect on the returned resource/resources is required
- * behavior for APIs.
- *
- * # Field Masks in Update Operations
- *
- * A field mask in update operations specifies which fields of the
- * targeted resource are going to be updated. The API is required
- * to only change the values of the fields as specified in the mask
- * and leave the others untouched. If a resource is passed in to
- * describe the updated values, the API ignores the values of all
- * fields not covered by the mask.
- *
- * If a repeated field is specified for an update operation, the existing
- * repeated values in the target resource will be overwritten by the new values.
- * Note that a repeated field is only allowed in the last position of a `paths`
- * string.
- *
- * If a sub-message is specified in the last position of the field mask for an
- * update operation, then the existing sub-message in the target resource is
- * overwritten. Given the target message:
- *
- * f {
- * b {
- * d : 1
- * x : 2
- * }
- * c : 1
- * }
- *
- * And an update message:
- *
- * f {
- * b {
- * d : 10
- * }
- * }
- *
- * then if the field mask is:
- *
- * paths: "f.b"
- *
- * then the result will be:
- *
- * f {
- * b {
- * d : 10
- * }
- * c : 1
- * }
- *
- * However, if the update mask was:
- *
- * paths: "f.b.d"
- *
- * then the result would be:
- *
- * f {
- * b {
- * d : 10
- * x : 2
- * }
- * c : 1
- * }
- *
- * In order to reset a field's value to the default, the field must
- * be in the mask and set to the default value in the provided resource.
- * Hence, in order to reset all fields of a resource, provide a default
- * instance of the resource and set all fields in the mask, or do
- * not provide a mask as described below.
- *
- * If a field mask is not present on update, the operation applies to
- * all fields (as if a field mask of all fields has been specified).
- * Note that in the presence of schema evolution, this may mean that
- * fields the client does not know and has therefore not filled into
- * the request will be reset to their default. If this is unwanted
- * behavior, a specific service may require a client to always specify
- * a field mask, producing an error if not.
- *
- * As with get operations, the location of the resource which
- * describes the updated values in the request message depends on the
- * operation kind. In any case, the effect of the field mask is
- * required to be honored by the API.
- *
- * ## Considerations for HTTP REST
- *
- * The HTTP kind of an update operation which uses a field mask must
- * be set to PATCH instead of PUT in order to satisfy HTTP semantics
- * (PUT must only be used for full updates).
- *
- * # JSON Encoding of Field Masks
- *
- * In JSON, a field mask is encoded as a single string where paths are
- * separated by a comma. Fields name in each path are converted
- * to/from lower-camel naming conventions.
- *
- * As an example, consider the following message declarations:
- *
- * message Profile {
- * User user = 1;
- * Photo photo = 2;
- * }
- * message User {
- * string display_name = 1;
- * string address = 2;
- * }
- *
- * In proto a field mask for `Profile` may look as such:
- *
- * mask {
- * paths: "user.display_name"
- * paths: "photo"
- * }
- *
- * In JSON, the same mask is represented as below:
- *
- * {
- * mask: "user.displayName,photo"
- * }
- *
- * # Field Masks and Oneof Fields
- *
- * Field masks treat fields in oneofs just as regular fields. Consider the
- * following message:
- *
- * message SampleMessage {
- * oneof test_oneof {
- * string name = 4;
- * SubMessage sub_message = 9;
- * }
- * }
- *
- * The field mask can be:
- *
- * mask {
- * paths: "name"
- * }
- *
- * Or:
- *
- * mask {
- * paths: "sub_message"
- * }
- *
- * Note that oneof type names ("test_oneof" in this case) cannot be used in
- * paths.
- *
- * ## Field Mask Verification
- *
- * The implementation of any API method which has a FieldMask type field in the
- * request should verify the included field paths, and return an
- * `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
- **/
-@interface GPBFieldMask : GPBMessage
-
-/** The set of field mask paths. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *pathsArray;
-/** The number of items in @c pathsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger pathsArray_Count;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBArray.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBArray.h
deleted file mode 100644
index 638b2882d..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBArray.h
+++ /dev/null
@@ -1,1967 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2015 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBRuntimeTypes.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-//%PDDM-EXPAND DECLARE_ARRAYS()
-// This block of code is generated, do not edit it directly.
-
-#pragma mark - Int32
-
-/**
- * Class used for repeated fields of int32_t values. This performs better than
- * boxing into NSNumbers in NSArrays.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32Array : NSObject <NSCopying>
-
-/** The number of elements contained in the array. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * @return A newly instanced and empty GPBInt32Array.
- **/
-+ (instancetype)array;
-
-/**
- * Creates and initializes a GPBInt32Array with the single element given.
- *
- * @param value The value to be placed in the array.
- *
- * @return A newly instanced GPBInt32Array with value in it.
- **/
-+ (instancetype)arrayWithValue:(int32_t)value;
-
-/**
- * Creates and initializes a GPBInt32Array with the contents of the given
- * array.
- *
- * @param array Array with the contents to be put into the new array.
- *
- * @return A newly instanced GPBInt32Array with the contents of array.
- **/
-+ (instancetype)arrayWithValueArray:(GPBInt32Array *)array;
-
-/**
- * Creates and initializes a GPBInt32Array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly instanced GPBInt32Array with a capacity of count.
- **/
-+ (instancetype)arrayWithCapacity:(NSUInteger)count;
-
-/**
- * @return A newly initialized and empty GPBInt32Array.
- **/
-- (instancetype)init NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param values An array with the values to put inside this array.
- * @param count The number of elements to copy into the array.
- *
- * @return A newly initialized GPBInt32Array with a copy of the values.
- **/
-- (instancetype)initWithValues:(const int32_t [__nullable])values
- count:(NSUInteger)count;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param array An array with the values to put inside this array.
- *
- * @return A newly initialized GPBInt32Array with a copy of the values.
- **/
-- (instancetype)initWithValueArray:(GPBInt32Array *)array;
-
-/**
- * Initializes the array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly initialized GPBInt32Array with a capacity of count.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)count;
-
-/**
- * Gets the value at the given index.
- *
- * @param index The index of the value to get.
- *
- * @return The value at the given index.
- **/
-- (int32_t)valueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Adds a value to this array.
- *
- * @param value The value to add to this array.
- **/
-- (void)addValue:(int32_t)value;
-
-/**
- * Adds values to this array.
- *
- * @param values The values to add to this array.
- * @param count The number of elements to add.
- **/
-- (void)addValues:(const int32_t [__nullable])values count:(NSUInteger)count;
-
-/**
- * Adds the values from the given array to this array.
- *
- * @param array The array containing the elements to add to this array.
- **/
-- (void)addValuesFromArray:(GPBInt32Array *)array;
-
-/**
- * Inserts a value into the given position.
- *
- * @param value The value to add to this array.
- * @param index The index into which to insert the value.
- **/
-- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the value at the given index with the given value.
- *
- * @param index The index for which to replace the value.
- * @param value The value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value;
-
-/**
- * Removes the value at the given index.
- *
- * @param index The index of the value to remove.
- **/
-- (void)removeValueAtIndex:(NSUInteger)index;
-
-/**
- * Removes all the values from this array.
- **/
-- (void)removeAll;
-
-/**
- * Exchanges the values between the given indexes.
- *
- * @param idx1 The index of the first element to exchange.
- * @param idx2 The index of the second element to exchange.
- **/
-- (void)exchangeValueAtIndex:(NSUInteger)idx1
- withValueAtIndex:(NSUInteger)idx2;
-
-@end
-
-#pragma mark - UInt32
-
-/**
- * Class used for repeated fields of uint32_t values. This performs better than
- * boxing into NSNumbers in NSArrays.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32Array : NSObject <NSCopying>
-
-/** The number of elements contained in the array. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * @return A newly instanced and empty GPBUInt32Array.
- **/
-+ (instancetype)array;
-
-/**
- * Creates and initializes a GPBUInt32Array with the single element given.
- *
- * @param value The value to be placed in the array.
- *
- * @return A newly instanced GPBUInt32Array with value in it.
- **/
-+ (instancetype)arrayWithValue:(uint32_t)value;
-
-/**
- * Creates and initializes a GPBUInt32Array with the contents of the given
- * array.
- *
- * @param array Array with the contents to be put into the new array.
- *
- * @return A newly instanced GPBUInt32Array with the contents of array.
- **/
-+ (instancetype)arrayWithValueArray:(GPBUInt32Array *)array;
-
-/**
- * Creates and initializes a GPBUInt32Array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly instanced GPBUInt32Array with a capacity of count.
- **/
-+ (instancetype)arrayWithCapacity:(NSUInteger)count;
-
-/**
- * @return A newly initialized and empty GPBUInt32Array.
- **/
-- (instancetype)init NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param values An array with the values to put inside this array.
- * @param count The number of elements to copy into the array.
- *
- * @return A newly initialized GPBUInt32Array with a copy of the values.
- **/
-- (instancetype)initWithValues:(const uint32_t [__nullable])values
- count:(NSUInteger)count;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param array An array with the values to put inside this array.
- *
- * @return A newly initialized GPBUInt32Array with a copy of the values.
- **/
-- (instancetype)initWithValueArray:(GPBUInt32Array *)array;
-
-/**
- * Initializes the array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly initialized GPBUInt32Array with a capacity of count.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)count;
-
-/**
- * Gets the value at the given index.
- *
- * @param index The index of the value to get.
- *
- * @return The value at the given index.
- **/
-- (uint32_t)valueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(uint32_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Adds a value to this array.
- *
- * @param value The value to add to this array.
- **/
-- (void)addValue:(uint32_t)value;
-
-/**
- * Adds values to this array.
- *
- * @param values The values to add to this array.
- * @param count The number of elements to add.
- **/
-- (void)addValues:(const uint32_t [__nullable])values count:(NSUInteger)count;
-
-/**
- * Adds the values from the given array to this array.
- *
- * @param array The array containing the elements to add to this array.
- **/
-- (void)addValuesFromArray:(GPBUInt32Array *)array;
-
-/**
- * Inserts a value into the given position.
- *
- * @param value The value to add to this array.
- * @param index The index into which to insert the value.
- **/
-- (void)insertValue:(uint32_t)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the value at the given index with the given value.
- *
- * @param index The index for which to replace the value.
- * @param value The value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint32_t)value;
-
-/**
- * Removes the value at the given index.
- *
- * @param index The index of the value to remove.
- **/
-- (void)removeValueAtIndex:(NSUInteger)index;
-
-/**
- * Removes all the values from this array.
- **/
-- (void)removeAll;
-
-/**
- * Exchanges the values between the given indexes.
- *
- * @param idx1 The index of the first element to exchange.
- * @param idx2 The index of the second element to exchange.
- **/
-- (void)exchangeValueAtIndex:(NSUInteger)idx1
- withValueAtIndex:(NSUInteger)idx2;
-
-@end
-
-#pragma mark - Int64
-
-/**
- * Class used for repeated fields of int64_t values. This performs better than
- * boxing into NSNumbers in NSArrays.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64Array : NSObject <NSCopying>
-
-/** The number of elements contained in the array. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * @return A newly instanced and empty GPBInt64Array.
- **/
-+ (instancetype)array;
-
-/**
- * Creates and initializes a GPBInt64Array with the single element given.
- *
- * @param value The value to be placed in the array.
- *
- * @return A newly instanced GPBInt64Array with value in it.
- **/
-+ (instancetype)arrayWithValue:(int64_t)value;
-
-/**
- * Creates and initializes a GPBInt64Array with the contents of the given
- * array.
- *
- * @param array Array with the contents to be put into the new array.
- *
- * @return A newly instanced GPBInt64Array with the contents of array.
- **/
-+ (instancetype)arrayWithValueArray:(GPBInt64Array *)array;
-
-/**
- * Creates and initializes a GPBInt64Array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly instanced GPBInt64Array with a capacity of count.
- **/
-+ (instancetype)arrayWithCapacity:(NSUInteger)count;
-
-/**
- * @return A newly initialized and empty GPBInt64Array.
- **/
-- (instancetype)init NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param values An array with the values to put inside this array.
- * @param count The number of elements to copy into the array.
- *
- * @return A newly initialized GPBInt64Array with a copy of the values.
- **/
-- (instancetype)initWithValues:(const int64_t [__nullable])values
- count:(NSUInteger)count;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param array An array with the values to put inside this array.
- *
- * @return A newly initialized GPBInt64Array with a copy of the values.
- **/
-- (instancetype)initWithValueArray:(GPBInt64Array *)array;
-
-/**
- * Initializes the array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly initialized GPBInt64Array with a capacity of count.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)count;
-
-/**
- * Gets the value at the given index.
- *
- * @param index The index of the value to get.
- *
- * @return The value at the given index.
- **/
-- (int64_t)valueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(int64_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Adds a value to this array.
- *
- * @param value The value to add to this array.
- **/
-- (void)addValue:(int64_t)value;
-
-/**
- * Adds values to this array.
- *
- * @param values The values to add to this array.
- * @param count The number of elements to add.
- **/
-- (void)addValues:(const int64_t [__nullable])values count:(NSUInteger)count;
-
-/**
- * Adds the values from the given array to this array.
- *
- * @param array The array containing the elements to add to this array.
- **/
-- (void)addValuesFromArray:(GPBInt64Array *)array;
-
-/**
- * Inserts a value into the given position.
- *
- * @param value The value to add to this array.
- * @param index The index into which to insert the value.
- **/
-- (void)insertValue:(int64_t)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the value at the given index with the given value.
- *
- * @param index The index for which to replace the value.
- * @param value The value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int64_t)value;
-
-/**
- * Removes the value at the given index.
- *
- * @param index The index of the value to remove.
- **/
-- (void)removeValueAtIndex:(NSUInteger)index;
-
-/**
- * Removes all the values from this array.
- **/
-- (void)removeAll;
-
-/**
- * Exchanges the values between the given indexes.
- *
- * @param idx1 The index of the first element to exchange.
- * @param idx2 The index of the second element to exchange.
- **/
-- (void)exchangeValueAtIndex:(NSUInteger)idx1
- withValueAtIndex:(NSUInteger)idx2;
-
-@end
-
-#pragma mark - UInt64
-
-/**
- * Class used for repeated fields of uint64_t values. This performs better than
- * boxing into NSNumbers in NSArrays.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64Array : NSObject <NSCopying>
-
-/** The number of elements contained in the array. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * @return A newly instanced and empty GPBUInt64Array.
- **/
-+ (instancetype)array;
-
-/**
- * Creates and initializes a GPBUInt64Array with the single element given.
- *
- * @param value The value to be placed in the array.
- *
- * @return A newly instanced GPBUInt64Array with value in it.
- **/
-+ (instancetype)arrayWithValue:(uint64_t)value;
-
-/**
- * Creates and initializes a GPBUInt64Array with the contents of the given
- * array.
- *
- * @param array Array with the contents to be put into the new array.
- *
- * @return A newly instanced GPBUInt64Array with the contents of array.
- **/
-+ (instancetype)arrayWithValueArray:(GPBUInt64Array *)array;
-
-/**
- * Creates and initializes a GPBUInt64Array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly instanced GPBUInt64Array with a capacity of count.
- **/
-+ (instancetype)arrayWithCapacity:(NSUInteger)count;
-
-/**
- * @return A newly initialized and empty GPBUInt64Array.
- **/
-- (instancetype)init NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param values An array with the values to put inside this array.
- * @param count The number of elements to copy into the array.
- *
- * @return A newly initialized GPBUInt64Array with a copy of the values.
- **/
-- (instancetype)initWithValues:(const uint64_t [__nullable])values
- count:(NSUInteger)count;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param array An array with the values to put inside this array.
- *
- * @return A newly initialized GPBUInt64Array with a copy of the values.
- **/
-- (instancetype)initWithValueArray:(GPBUInt64Array *)array;
-
-/**
- * Initializes the array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly initialized GPBUInt64Array with a capacity of count.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)count;
-
-/**
- * Gets the value at the given index.
- *
- * @param index The index of the value to get.
- *
- * @return The value at the given index.
- **/
-- (uint64_t)valueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(uint64_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Adds a value to this array.
- *
- * @param value The value to add to this array.
- **/
-- (void)addValue:(uint64_t)value;
-
-/**
- * Adds values to this array.
- *
- * @param values The values to add to this array.
- * @param count The number of elements to add.
- **/
-- (void)addValues:(const uint64_t [__nullable])values count:(NSUInteger)count;
-
-/**
- * Adds the values from the given array to this array.
- *
- * @param array The array containing the elements to add to this array.
- **/
-- (void)addValuesFromArray:(GPBUInt64Array *)array;
-
-/**
- * Inserts a value into the given position.
- *
- * @param value The value to add to this array.
- * @param index The index into which to insert the value.
- **/
-- (void)insertValue:(uint64_t)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the value at the given index with the given value.
- *
- * @param index The index for which to replace the value.
- * @param value The value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withValue:(uint64_t)value;
-
-/**
- * Removes the value at the given index.
- *
- * @param index The index of the value to remove.
- **/
-- (void)removeValueAtIndex:(NSUInteger)index;
-
-/**
- * Removes all the values from this array.
- **/
-- (void)removeAll;
-
-/**
- * Exchanges the values between the given indexes.
- *
- * @param idx1 The index of the first element to exchange.
- * @param idx2 The index of the second element to exchange.
- **/
-- (void)exchangeValueAtIndex:(NSUInteger)idx1
- withValueAtIndex:(NSUInteger)idx2;
-
-@end
-
-#pragma mark - Float
-
-/**
- * Class used for repeated fields of float values. This performs better than
- * boxing into NSNumbers in NSArrays.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBFloatArray : NSObject <NSCopying>
-
-/** The number of elements contained in the array. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * @return A newly instanced and empty GPBFloatArray.
- **/
-+ (instancetype)array;
-
-/**
- * Creates and initializes a GPBFloatArray with the single element given.
- *
- * @param value The value to be placed in the array.
- *
- * @return A newly instanced GPBFloatArray with value in it.
- **/
-+ (instancetype)arrayWithValue:(float)value;
-
-/**
- * Creates and initializes a GPBFloatArray with the contents of the given
- * array.
- *
- * @param array Array with the contents to be put into the new array.
- *
- * @return A newly instanced GPBFloatArray with the contents of array.
- **/
-+ (instancetype)arrayWithValueArray:(GPBFloatArray *)array;
-
-/**
- * Creates and initializes a GPBFloatArray with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly instanced GPBFloatArray with a capacity of count.
- **/
-+ (instancetype)arrayWithCapacity:(NSUInteger)count;
-
-/**
- * @return A newly initialized and empty GPBFloatArray.
- **/
-- (instancetype)init NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param values An array with the values to put inside this array.
- * @param count The number of elements to copy into the array.
- *
- * @return A newly initialized GPBFloatArray with a copy of the values.
- **/
-- (instancetype)initWithValues:(const float [__nullable])values
- count:(NSUInteger)count;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param array An array with the values to put inside this array.
- *
- * @return A newly initialized GPBFloatArray with a copy of the values.
- **/
-- (instancetype)initWithValueArray:(GPBFloatArray *)array;
-
-/**
- * Initializes the array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly initialized GPBFloatArray with a capacity of count.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)count;
-
-/**
- * Gets the value at the given index.
- *
- * @param index The index of the value to get.
- *
- * @return The value at the given index.
- **/
-- (float)valueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(float value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Adds a value to this array.
- *
- * @param value The value to add to this array.
- **/
-- (void)addValue:(float)value;
-
-/**
- * Adds values to this array.
- *
- * @param values The values to add to this array.
- * @param count The number of elements to add.
- **/
-- (void)addValues:(const float [__nullable])values count:(NSUInteger)count;
-
-/**
- * Adds the values from the given array to this array.
- *
- * @param array The array containing the elements to add to this array.
- **/
-- (void)addValuesFromArray:(GPBFloatArray *)array;
-
-/**
- * Inserts a value into the given position.
- *
- * @param value The value to add to this array.
- * @param index The index into which to insert the value.
- **/
-- (void)insertValue:(float)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the value at the given index with the given value.
- *
- * @param index The index for which to replace the value.
- * @param value The value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withValue:(float)value;
-
-/**
- * Removes the value at the given index.
- *
- * @param index The index of the value to remove.
- **/
-- (void)removeValueAtIndex:(NSUInteger)index;
-
-/**
- * Removes all the values from this array.
- **/
-- (void)removeAll;
-
-/**
- * Exchanges the values between the given indexes.
- *
- * @param idx1 The index of the first element to exchange.
- * @param idx2 The index of the second element to exchange.
- **/
-- (void)exchangeValueAtIndex:(NSUInteger)idx1
- withValueAtIndex:(NSUInteger)idx2;
-
-@end
-
-#pragma mark - Double
-
-/**
- * Class used for repeated fields of double values. This performs better than
- * boxing into NSNumbers in NSArrays.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBDoubleArray : NSObject <NSCopying>
-
-/** The number of elements contained in the array. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * @return A newly instanced and empty GPBDoubleArray.
- **/
-+ (instancetype)array;
-
-/**
- * Creates and initializes a GPBDoubleArray with the single element given.
- *
- * @param value The value to be placed in the array.
- *
- * @return A newly instanced GPBDoubleArray with value in it.
- **/
-+ (instancetype)arrayWithValue:(double)value;
-
-/**
- * Creates and initializes a GPBDoubleArray with the contents of the given
- * array.
- *
- * @param array Array with the contents to be put into the new array.
- *
- * @return A newly instanced GPBDoubleArray with the contents of array.
- **/
-+ (instancetype)arrayWithValueArray:(GPBDoubleArray *)array;
-
-/**
- * Creates and initializes a GPBDoubleArray with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly instanced GPBDoubleArray with a capacity of count.
- **/
-+ (instancetype)arrayWithCapacity:(NSUInteger)count;
-
-/**
- * @return A newly initialized and empty GPBDoubleArray.
- **/
-- (instancetype)init NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param values An array with the values to put inside this array.
- * @param count The number of elements to copy into the array.
- *
- * @return A newly initialized GPBDoubleArray with a copy of the values.
- **/
-- (instancetype)initWithValues:(const double [__nullable])values
- count:(NSUInteger)count;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param array An array with the values to put inside this array.
- *
- * @return A newly initialized GPBDoubleArray with a copy of the values.
- **/
-- (instancetype)initWithValueArray:(GPBDoubleArray *)array;
-
-/**
- * Initializes the array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly initialized GPBDoubleArray with a capacity of count.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)count;
-
-/**
- * Gets the value at the given index.
- *
- * @param index The index of the value to get.
- *
- * @return The value at the given index.
- **/
-- (double)valueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(double value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Adds a value to this array.
- *
- * @param value The value to add to this array.
- **/
-- (void)addValue:(double)value;
-
-/**
- * Adds values to this array.
- *
- * @param values The values to add to this array.
- * @param count The number of elements to add.
- **/
-- (void)addValues:(const double [__nullable])values count:(NSUInteger)count;
-
-/**
- * Adds the values from the given array to this array.
- *
- * @param array The array containing the elements to add to this array.
- **/
-- (void)addValuesFromArray:(GPBDoubleArray *)array;
-
-/**
- * Inserts a value into the given position.
- *
- * @param value The value to add to this array.
- * @param index The index into which to insert the value.
- **/
-- (void)insertValue:(double)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the value at the given index with the given value.
- *
- * @param index The index for which to replace the value.
- * @param value The value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withValue:(double)value;
-
-/**
- * Removes the value at the given index.
- *
- * @param index The index of the value to remove.
- **/
-- (void)removeValueAtIndex:(NSUInteger)index;
-
-/**
- * Removes all the values from this array.
- **/
-- (void)removeAll;
-
-/**
- * Exchanges the values between the given indexes.
- *
- * @param idx1 The index of the first element to exchange.
- * @param idx2 The index of the second element to exchange.
- **/
-- (void)exchangeValueAtIndex:(NSUInteger)idx1
- withValueAtIndex:(NSUInteger)idx2;
-
-@end
-
-#pragma mark - Bool
-
-/**
- * Class used for repeated fields of BOOL values. This performs better than
- * boxing into NSNumbers in NSArrays.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolArray : NSObject <NSCopying>
-
-/** The number of elements contained in the array. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * @return A newly instanced and empty GPBBoolArray.
- **/
-+ (instancetype)array;
-
-/**
- * Creates and initializes a GPBBoolArray with the single element given.
- *
- * @param value The value to be placed in the array.
- *
- * @return A newly instanced GPBBoolArray with value in it.
- **/
-+ (instancetype)arrayWithValue:(BOOL)value;
-
-/**
- * Creates and initializes a GPBBoolArray with the contents of the given
- * array.
- *
- * @param array Array with the contents to be put into the new array.
- *
- * @return A newly instanced GPBBoolArray with the contents of array.
- **/
-+ (instancetype)arrayWithValueArray:(GPBBoolArray *)array;
-
-/**
- * Creates and initializes a GPBBoolArray with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly instanced GPBBoolArray with a capacity of count.
- **/
-+ (instancetype)arrayWithCapacity:(NSUInteger)count;
-
-/**
- * @return A newly initialized and empty GPBBoolArray.
- **/
-- (instancetype)init NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param values An array with the values to put inside this array.
- * @param count The number of elements to copy into the array.
- *
- * @return A newly initialized GPBBoolArray with a copy of the values.
- **/
-- (instancetype)initWithValues:(const BOOL [__nullable])values
- count:(NSUInteger)count;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param array An array with the values to put inside this array.
- *
- * @return A newly initialized GPBBoolArray with a copy of the values.
- **/
-- (instancetype)initWithValueArray:(GPBBoolArray *)array;
-
-/**
- * Initializes the array with the given capacity.
- *
- * @param count The capacity needed for the array.
- *
- * @return A newly initialized GPBBoolArray with a capacity of count.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)count;
-
-/**
- * Gets the value at the given index.
- *
- * @param index The index of the value to get.
- *
- * @return The value at the given index.
- **/
-- (BOOL)valueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(BOOL value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Adds a value to this array.
- *
- * @param value The value to add to this array.
- **/
-- (void)addValue:(BOOL)value;
-
-/**
- * Adds values to this array.
- *
- * @param values The values to add to this array.
- * @param count The number of elements to add.
- **/
-- (void)addValues:(const BOOL [__nullable])values count:(NSUInteger)count;
-
-/**
- * Adds the values from the given array to this array.
- *
- * @param array The array containing the elements to add to this array.
- **/
-- (void)addValuesFromArray:(GPBBoolArray *)array;
-
-/**
- * Inserts a value into the given position.
- *
- * @param value The value to add to this array.
- * @param index The index into which to insert the value.
- **/
-- (void)insertValue:(BOOL)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the value at the given index with the given value.
- *
- * @param index The index for which to replace the value.
- * @param value The value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withValue:(BOOL)value;
-
-/**
- * Removes the value at the given index.
- *
- * @param index The index of the value to remove.
- **/
-- (void)removeValueAtIndex:(NSUInteger)index;
-
-/**
- * Removes all the values from this array.
- **/
-- (void)removeAll;
-
-/**
- * Exchanges the values between the given indexes.
- *
- * @param idx1 The index of the first element to exchange.
- * @param idx2 The index of the second element to exchange.
- **/
-- (void)exchangeValueAtIndex:(NSUInteger)idx1
- withValueAtIndex:(NSUInteger)idx2;
-
-@end
-
-#pragma mark - Enum
-
-/**
- * This class is used for repeated fields of int32_t values. This performs
- * better than boxing into NSNumbers in NSArrays.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBEnumArray : NSObject <NSCopying>
-
-/** The number of elements contained in the array. */
-@property(nonatomic, readonly) NSUInteger count;
-/** The validation function to check if the enums are valid. */
-@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-
-/**
- * @return A newly instanced and empty GPBEnumArray.
- **/
-+ (instancetype)array;
-
-/**
- * Creates and initializes a GPBEnumArray with the enum validation function
- * given.
- *
- * @param func The enum validation function for the array.
- *
- * @return A newly instanced GPBEnumArray.
- **/
-+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-
-/**
- * Creates and initializes a GPBEnumArray with the enum validation function
- * given and the single raw value given.
- *
- * @param func The enum validation function for the array.
- * @param value The raw value to add to this array.
- *
- * @return A newly instanced GPBEnumArray.
- **/
-+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func
- rawValue:(int32_t)value;
-
-/**
- * Creates and initializes a GPBEnumArray that adds the elements from the
- * given array.
- *
- * @param array Array containing the values to add to the new array.
- *
- * @return A newly instanced GPBEnumArray.
- **/
-+ (instancetype)arrayWithValueArray:(GPBEnumArray *)array;
-
-/**
- * Creates and initializes a GPBEnumArray with the given enum validation
- * function and with the givencapacity.
- *
- * @param func The enum validation function for the array.
- * @param count The capacity needed for the array.
- *
- * @return A newly instanced GPBEnumArray with a capacity of count.
- **/
-+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func
- capacity:(NSUInteger)count;
-
-/**
- * Initializes the array with the given enum validation function.
- *
- * @param func The enum validation function for the array.
- *
- * @return A newly initialized GPBEnumArray with a copy of the values.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param func The enum validation function for the array.
- * @param values An array with the values to put inside this array.
- * @param count The number of elements to copy into the array.
- *
- * @return A newly initialized GPBEnumArray with a copy of the values.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- rawValues:(const int32_t [__nullable])values
- count:(NSUInteger)count;
-
-/**
- * Initializes the array, copying the given values.
- *
- * @param array An array with the values to put inside this array.
- *
- * @return A newly initialized GPBEnumArray with a copy of the values.
- **/
-- (instancetype)initWithValueArray:(GPBEnumArray *)array;
-
-/**
- * Initializes the array with the given capacity.
- *
- * @param func The enum validation function for the array.
- * @param count The capacity needed for the array.
- *
- * @return A newly initialized GPBEnumArray with a capacity of count.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- capacity:(NSUInteger)count;
-
-// These will return kGPBUnrecognizedEnumeratorValue if the value at index is not a
-// valid enumerator as defined by validationFunc. If the actual value is
-// desired, use "raw" version of the method.
-
-/**
- * Gets the value at the given index.
- *
- * @param index The index of the value to get.
- *
- * @return The value at the given index.
- **/
-- (int32_t)valueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block;
-
-// These methods bypass the validationFunc to provide access to values that were not
-// known at the time the binary was compiled.
-
-/**
- * Gets the raw enum value at the given index.
- *
- * @param index The index of the raw enum value to get.
- *
- * @return The raw enum value at the given index.
- **/
-- (int32_t)rawValueAtIndex:(NSUInteger)index;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateRawValuesWithBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block;
-
-/**
- * Enumerates the values on this array with the given block.
- *
- * @param opts Options to control the enumeration.
- * @param block The block to enumerate with.
- * **value**: The current value being enumerated.
- * **idx**: The index of the current value.
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts
- usingBlock:(void (^)(int32_t value, NSUInteger idx, BOOL *stop))block;
-
-// If value is not a valid enumerator as defined by validationFunc, these
-// methods will assert in debug, and will log in release and assign the value
-// to the default value. Use the rawValue methods below to assign non enumerator
-// values.
-
-/**
- * Adds a value to this array.
- *
- * @param value The value to add to this array.
- **/
-- (void)addValue:(int32_t)value;
-
-/**
- * Adds values to this array.
- *
- * @param values The values to add to this array.
- * @param count The number of elements to add.
- **/
-- (void)addValues:(const int32_t [__nullable])values count:(NSUInteger)count;
-
-
-/**
- * Inserts a value into the given position.
- *
- * @param value The value to add to this array.
- * @param index The index into which to insert the value.
- **/
-- (void)insertValue:(int32_t)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the value at the given index with the given value.
- *
- * @param index The index for which to replace the value.
- * @param value The value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withValue:(int32_t)value;
-
-// These methods bypass the validationFunc to provide setting of values that were not
-// known at the time the binary was compiled.
-
-/**
- * Adds a raw enum value to this array.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param value The raw enum value to add to the array.
- **/
-- (void)addRawValue:(int32_t)value;
-
-/**
- * Adds raw enum values to this array.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param array Array containing the raw enum values to add to this array.
- **/
-- (void)addRawValuesFromArray:(GPBEnumArray *)array;
-
-/**
- * Adds raw enum values to this array.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param values Array containing the raw enum values to add to this array.
- * @param count The number of raw values to add.
- **/
-- (void)addRawValues:(const int32_t [__nullable])values count:(NSUInteger)count;
-
-/**
- * Inserts a raw enum value at the given index.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param value Raw enum value to add.
- * @param index The index into which to insert the value.
- **/
-- (void)insertRawValue:(int32_t)value atIndex:(NSUInteger)index;
-
-/**
- * Replaces the raw enum value at the given index with the given value.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param index The index for which to replace the value.
- * @param value The raw enum value to replace with.
- **/
-- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(int32_t)value;
-
-// No validation applies to these methods.
-
-/**
- * Removes the value at the given index.
- *
- * @param index The index of the value to remove.
- **/
-- (void)removeValueAtIndex:(NSUInteger)index;
-
-/**
- * Removes all the values from this array.
- **/
-- (void)removeAll;
-
-/**
- * Exchanges the values between the given indexes.
- *
- * @param idx1 The index of the first element to exchange.
- * @param idx2 The index of the second element to exchange.
- **/
-- (void)exchangeValueAtIndex:(NSUInteger)idx1
- withValueAtIndex:(NSUInteger)idx2;
-
-@end
-
-//%PDDM-EXPAND-END DECLARE_ARRAYS()
-
-NS_ASSUME_NONNULL_END
-
-//%PDDM-DEFINE DECLARE_ARRAYS()
-//%ARRAY_INTERFACE_SIMPLE(Int32, int32_t)
-//%ARRAY_INTERFACE_SIMPLE(UInt32, uint32_t)
-//%ARRAY_INTERFACE_SIMPLE(Int64, int64_t)
-//%ARRAY_INTERFACE_SIMPLE(UInt64, uint64_t)
-//%ARRAY_INTERFACE_SIMPLE(Float, float)
-//%ARRAY_INTERFACE_SIMPLE(Double, double)
-//%ARRAY_INTERFACE_SIMPLE(Bool, BOOL)
-//%ARRAY_INTERFACE_ENUM(Enum, int32_t)
-
-//
-// The common case (everything but Enum)
-//
-
-//%PDDM-DEFINE ARRAY_INTERFACE_SIMPLE(NAME, TYPE)
-//%#pragma mark - NAME
-//%
-//%/**
-//% * Class used for repeated fields of ##TYPE## values. This performs better than
-//% * boxing into NSNumbers in NSArrays.
-//% *
-//% * @note This class is not meant to be subclassed.
-//% **/
-//%@interface GPB##NAME##Array : NSObject <NSCopying>
-//%
-//%/** The number of elements contained in the array. */
-//%@property(nonatomic, readonly) NSUInteger count;
-//%
-//%/**
-//% * @return A newly instanced and empty GPB##NAME##Array.
-//% **/
-//%+ (instancetype)array;
-//%
-//%/**
-//% * Creates and initializes a GPB##NAME##Array with the single element given.
-//% *
-//% * @param value The value to be placed in the array.
-//% *
-//% * @return A newly instanced GPB##NAME##Array with value in it.
-//% **/
-//%+ (instancetype)arrayWithValue:(TYPE)value;
-//%
-//%/**
-//% * Creates and initializes a GPB##NAME##Array with the contents of the given
-//% * array.
-//% *
-//% * @param array Array with the contents to be put into the new array.
-//% *
-//% * @return A newly instanced GPB##NAME##Array with the contents of array.
-//% **/
-//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array;
-//%
-//%/**
-//% * Creates and initializes a GPB##NAME##Array with the given capacity.
-//% *
-//% * @param count The capacity needed for the array.
-//% *
-//% * @return A newly instanced GPB##NAME##Array with a capacity of count.
-//% **/
-//%+ (instancetype)arrayWithCapacity:(NSUInteger)count;
-//%
-//%/**
-//% * @return A newly initialized and empty GPB##NAME##Array.
-//% **/
-//%- (instancetype)init NS_DESIGNATED_INITIALIZER;
-//%
-//%/**
-//% * Initializes the array, copying the given values.
-//% *
-//% * @param values An array with the values to put inside this array.
-//% * @param count The number of elements to copy into the array.
-//% *
-//% * @return A newly initialized GPB##NAME##Array with a copy of the values.
-//% **/
-//%- (instancetype)initWithValues:(const TYPE [__nullable])values
-//% count:(NSUInteger)count;
-//%
-//%/**
-//% * Initializes the array, copying the given values.
-//% *
-//% * @param array An array with the values to put inside this array.
-//% *
-//% * @return A newly initialized GPB##NAME##Array with a copy of the values.
-//% **/
-//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array;
-//%
-//%/**
-//% * Initializes the array with the given capacity.
-//% *
-//% * @param count The capacity needed for the array.
-//% *
-//% * @return A newly initialized GPB##NAME##Array with a capacity of count.
-//% **/
-//%- (instancetype)initWithCapacity:(NSUInteger)count;
-//%
-//%ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, Basic)
-//%
-//%ARRAY_MUTABLE_INTERFACE(NAME, TYPE, Basic)
-//%
-//%@end
-//%
-
-//
-// Macros specific to Enums (to tweak their interface).
-//
-
-//%PDDM-DEFINE ARRAY_INTERFACE_ENUM(NAME, TYPE)
-//%#pragma mark - NAME
-//%
-//%/**
-//% * This class is used for repeated fields of ##TYPE## values. This performs
-//% * better than boxing into NSNumbers in NSArrays.
-//% *
-//% * @note This class is not meant to be subclassed.
-//% **/
-//%@interface GPB##NAME##Array : NSObject <NSCopying>
-//%
-//%/** The number of elements contained in the array. */
-//%@property(nonatomic, readonly) NSUInteger count;
-//%/** The validation function to check if the enums are valid. */
-//%@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-//%
-//%/**
-//% * @return A newly instanced and empty GPB##NAME##Array.
-//% **/
-//%+ (instancetype)array;
-//%
-//%/**
-//% * Creates and initializes a GPB##NAME##Array with the enum validation function
-//% * given.
-//% *
-//% * @param func The enum validation function for the array.
-//% *
-//% * @return A newly instanced GPB##NAME##Array.
-//% **/
-//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-//%
-//%/**
-//% * Creates and initializes a GPB##NAME##Array with the enum validation function
-//% * given and the single raw value given.
-//% *
-//% * @param func The enum validation function for the array.
-//% * @param value The raw value to add to this array.
-//% *
-//% * @return A newly instanced GPB##NAME##Array.
-//% **/
-//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func
-//% rawValue:(TYPE)value;
-//%
-//%/**
-//% * Creates and initializes a GPB##NAME##Array that adds the elements from the
-//% * given array.
-//% *
-//% * @param array Array containing the values to add to the new array.
-//% *
-//% * @return A newly instanced GPB##NAME##Array.
-//% **/
-//%+ (instancetype)arrayWithValueArray:(GPB##NAME##Array *)array;
-//%
-//%/**
-//% * Creates and initializes a GPB##NAME##Array with the given enum validation
-//% * function and with the givencapacity.
-//% *
-//% * @param func The enum validation function for the array.
-//% * @param count The capacity needed for the array.
-//% *
-//% * @return A newly instanced GPB##NAME##Array with a capacity of count.
-//% **/
-//%+ (instancetype)arrayWithValidationFunction:(nullable GPBEnumValidationFunc)func
-//% capacity:(NSUInteger)count;
-//%
-//%/**
-//% * Initializes the array with the given enum validation function.
-//% *
-//% * @param func The enum validation function for the array.
-//% *
-//% * @return A newly initialized GPB##NAME##Array with a copy of the values.
-//% **/
-//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
-//% NS_DESIGNATED_INITIALIZER;
-//%
-//%/**
-//% * Initializes the array, copying the given values.
-//% *
-//% * @param func The enum validation function for the array.
-//% * @param values An array with the values to put inside this array.
-//% * @param count The number of elements to copy into the array.
-//% *
-//% * @return A newly initialized GPB##NAME##Array with a copy of the values.
-//% **/
-//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
-//% rawValues:(const TYPE [__nullable])values
-//% count:(NSUInteger)count;
-//%
-//%/**
-//% * Initializes the array, copying the given values.
-//% *
-//% * @param array An array with the values to put inside this array.
-//% *
-//% * @return A newly initialized GPB##NAME##Array with a copy of the values.
-//% **/
-//%- (instancetype)initWithValueArray:(GPB##NAME##Array *)array;
-//%
-//%/**
-//% * Initializes the array with the given capacity.
-//% *
-//% * @param func The enum validation function for the array.
-//% * @param count The capacity needed for the array.
-//% *
-//% * @return A newly initialized GPB##NAME##Array with a capacity of count.
-//% **/
-//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
-//% capacity:(NSUInteger)count;
-//%
-//%// These will return kGPBUnrecognizedEnumeratorValue if the value at index is not a
-//%// valid enumerator as defined by validationFunc. If the actual value is
-//%// desired, use "raw" version of the method.
-//%
-//%ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, NAME)
-//%
-//%// These methods bypass the validationFunc to provide access to values that were not
-//%// known at the time the binary was compiled.
-//%
-//%/**
-//% * Gets the raw enum value at the given index.
-//% *
-//% * @param index The index of the raw enum value to get.
-//% *
-//% * @return The raw enum value at the given index.
-//% **/
-//%- (TYPE)rawValueAtIndex:(NSUInteger)index;
-//%
-//%/**
-//% * Enumerates the values on this array with the given block.
-//% *
-//% * @param block The block to enumerate with.
-//% * **value**: The current value being enumerated.
-//% * **idx**: The index of the current value.
-//% * **stop**: A pointer to a boolean that when set stops the enumeration.
-//% **/
-//%- (void)enumerateRawValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block;
-//%
-//%/**
-//% * Enumerates the values on this array with the given block.
-//% *
-//% * @param opts Options to control the enumeration.
-//% * @param block The block to enumerate with.
-//% * **value**: The current value being enumerated.
-//% * **idx**: The index of the current value.
-//% * **stop**: A pointer to a boolean that when set stops the enumeration.
-//% **/
-//%- (void)enumerateRawValuesWithOptions:(NSEnumerationOptions)opts
-//% usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block;
-//%
-//%// If value is not a valid enumerator as defined by validationFunc, these
-//%// methods will assert in debug, and will log in release and assign the value
-//%// to the default value. Use the rawValue methods below to assign non enumerator
-//%// values.
-//%
-//%ARRAY_MUTABLE_INTERFACE(NAME, TYPE, NAME)
-//%
-//%@end
-//%
-
-//%PDDM-DEFINE ARRAY_IMMUTABLE_INTERFACE(NAME, TYPE, HELPER_NAME)
-//%/**
-//% * Gets the value at the given index.
-//% *
-//% * @param index The index of the value to get.
-//% *
-//% * @return The value at the given index.
-//% **/
-//%- (TYPE)valueAtIndex:(NSUInteger)index;
-//%
-//%/**
-//% * Enumerates the values on this array with the given block.
-//% *
-//% * @param block The block to enumerate with.
-//% * **value**: The current value being enumerated.
-//% * **idx**: The index of the current value.
-//% * **stop**: A pointer to a boolean that when set stops the enumeration.
-//% **/
-//%- (void)enumerateValuesWithBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block;
-//%
-//%/**
-//% * Enumerates the values on this array with the given block.
-//% *
-//% * @param opts Options to control the enumeration.
-//% * @param block The block to enumerate with.
-//% * **value**: The current value being enumerated.
-//% * **idx**: The index of the current value.
-//% * **stop**: A pointer to a boolean that when set stops the enumeration.
-//% **/
-//%- (void)enumerateValuesWithOptions:(NSEnumerationOptions)opts
-//% usingBlock:(void (^)(TYPE value, NSUInteger idx, BOOL *stop))block;
-
-//%PDDM-DEFINE ARRAY_MUTABLE_INTERFACE(NAME, TYPE, HELPER_NAME)
-//%/**
-//% * Adds a value to this array.
-//% *
-//% * @param value The value to add to this array.
-//% **/
-//%- (void)addValue:(TYPE)value;
-//%
-//%/**
-//% * Adds values to this array.
-//% *
-//% * @param values The values to add to this array.
-//% * @param count The number of elements to add.
-//% **/
-//%- (void)addValues:(const TYPE [__nullable])values count:(NSUInteger)count;
-//%
-//%ARRAY_EXTRA_MUTABLE_METHODS1_##HELPER_NAME(NAME, TYPE)
-//%/**
-//% * Inserts a value into the given position.
-//% *
-//% * @param value The value to add to this array.
-//% * @param index The index into which to insert the value.
-//% **/
-//%- (void)insertValue:(TYPE)value atIndex:(NSUInteger)index;
-//%
-//%/**
-//% * Replaces the value at the given index with the given value.
-//% *
-//% * @param index The index for which to replace the value.
-//% * @param value The value to replace with.
-//% **/
-//%- (void)replaceValueAtIndex:(NSUInteger)index withValue:(TYPE)value;
-//%ARRAY_EXTRA_MUTABLE_METHODS2_##HELPER_NAME(NAME, TYPE)
-//%/**
-//% * Removes the value at the given index.
-//% *
-//% * @param index The index of the value to remove.
-//% **/
-//%- (void)removeValueAtIndex:(NSUInteger)index;
-//%
-//%/**
-//% * Removes all the values from this array.
-//% **/
-//%- (void)removeAll;
-//%
-//%/**
-//% * Exchanges the values between the given indexes.
-//% *
-//% * @param idx1 The index of the first element to exchange.
-//% * @param idx2 The index of the second element to exchange.
-//% **/
-//%- (void)exchangeValueAtIndex:(NSUInteger)idx1
-//% withValueAtIndex:(NSUInteger)idx2;
-
-//
-// These are hooks invoked by the above to do insert as needed.
-//
-
-//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS1_Basic(NAME, TYPE)
-//%/**
-//% * Adds the values from the given array to this array.
-//% *
-//% * @param array The array containing the elements to add to this array.
-//% **/
-//%- (void)addValuesFromArray:(GPB##NAME##Array *)array;
-//%
-//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS2_Basic(NAME, TYPE)
-// Empty
-//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS1_Enum(NAME, TYPE)
-// Empty
-//%PDDM-DEFINE ARRAY_EXTRA_MUTABLE_METHODS2_Enum(NAME, TYPE)
-//%
-//%// These methods bypass the validationFunc to provide setting of values that were not
-//%// known at the time the binary was compiled.
-//%
-//%/**
-//% * Adds a raw enum value to this array.
-//% *
-//% * @note This method bypass the validationFunc to enable the setting of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param value The raw enum value to add to the array.
-//% **/
-//%- (void)addRawValue:(TYPE)value;
-//%
-//%/**
-//% * Adds raw enum values to this array.
-//% *
-//% * @note This method bypass the validationFunc to enable the setting of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param array Array containing the raw enum values to add to this array.
-//% **/
-//%- (void)addRawValuesFromArray:(GPB##NAME##Array *)array;
-//%
-//%/**
-//% * Adds raw enum values to this array.
-//% *
-//% * @note This method bypass the validationFunc to enable the setting of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param values Array containing the raw enum values to add to this array.
-//% * @param count The number of raw values to add.
-//% **/
-//%- (void)addRawValues:(const TYPE [__nullable])values count:(NSUInteger)count;
-//%
-//%/**
-//% * Inserts a raw enum value at the given index.
-//% *
-//% * @note This method bypass the validationFunc to enable the setting of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param value Raw enum value to add.
-//% * @param index The index into which to insert the value.
-//% **/
-//%- (void)insertRawValue:(TYPE)value atIndex:(NSUInteger)index;
-//%
-//%/**
-//% * Replaces the raw enum value at the given index with the given value.
-//% *
-//% * @note This method bypass the validationFunc to enable the setting of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param index The index for which to replace the value.
-//% * @param value The raw enum value to replace with.
-//% **/
-//%- (void)replaceValueAtIndex:(NSUInteger)index withRawValue:(TYPE)value;
-//%
-//%// No validation applies to these methods.
-//%
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBArray_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBArray_PackagePrivate.h
deleted file mode 100644
index 35a453813..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBArray_PackagePrivate.h
+++ /dev/null
@@ -1,130 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2015 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import "GPBArray.h"
-
-@class GPBMessage;
-
-//%PDDM-DEFINE DECLARE_ARRAY_EXTRAS()
-//%ARRAY_INTERFACE_EXTRAS(Int32, int32_t)
-//%ARRAY_INTERFACE_EXTRAS(UInt32, uint32_t)
-//%ARRAY_INTERFACE_EXTRAS(Int64, int64_t)
-//%ARRAY_INTERFACE_EXTRAS(UInt64, uint64_t)
-//%ARRAY_INTERFACE_EXTRAS(Float, float)
-//%ARRAY_INTERFACE_EXTRAS(Double, double)
-//%ARRAY_INTERFACE_EXTRAS(Bool, BOOL)
-//%ARRAY_INTERFACE_EXTRAS(Enum, int32_t)
-
-//%PDDM-DEFINE ARRAY_INTERFACE_EXTRAS(NAME, TYPE)
-//%#pragma mark - NAME
-//%
-//%@interface GPB##NAME##Array () {
-//% @package
-//% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-//%}
-//%@end
-//%
-
-//%PDDM-EXPAND DECLARE_ARRAY_EXTRAS()
-// This block of code is generated, do not edit it directly.
-
-#pragma mark - Int32
-
-@interface GPBInt32Array () {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-#pragma mark - UInt32
-
-@interface GPBUInt32Array () {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-#pragma mark - Int64
-
-@interface GPBInt64Array () {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-#pragma mark - UInt64
-
-@interface GPBUInt64Array () {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-#pragma mark - Float
-
-@interface GPBFloatArray () {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-#pragma mark - Double
-
-@interface GPBDoubleArray () {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-#pragma mark - Bool
-
-@interface GPBBoolArray () {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-#pragma mark - Enum
-
-@interface GPBEnumArray () {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-//%PDDM-EXPAND-END DECLARE_ARRAY_EXTRAS()
-
-#pragma mark - NSArray Subclass
-
-@interface GPBAutocreatedArray : NSMutableArray {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBBootstrap.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBBootstrap.h
deleted file mode 100644
index ed53ae7cb..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBBootstrap.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-/**
- * The Objective C runtime has complete enough info that most protos don’t end
- * up using this, so leaving it on is no cost or very little cost. If you
- * happen to see it causing bloat, this is the way to disable it. If you do
- * need to disable it, try only disabling it for Release builds as having
- * full TextFormat can be useful for debugging.
- **/
-#ifndef GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
-#define GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS 0
-#endif
-
-// Used in the generated code to give sizes to enums. int32_t was chosen based
-// on the fact that Protocol Buffers enums are limited to this range.
-#if !__has_feature(objc_fixed_enum)
- #error All supported Xcode versions should support objc_fixed_enum.
-#endif
-
-// If the headers are imported into Objective-C++, we can run into an issue
-// where the defintion of NS_ENUM (really CF_ENUM) changes based on the C++
-// standard that is in effect. If it isn't C++11 or higher, the definition
-// doesn't allow us to forward declare. We work around this one case by
-// providing a local definition. The default case has to use NS_ENUM for the
-// magic that is Swift bridging of enums.
-#if (defined(__cplusplus) && __cplusplus && __cplusplus < 201103L)
- #define GPB_ENUM(X) enum X : int32_t X; enum X : int32_t
-#else
- #define GPB_ENUM(X) NS_ENUM(int32_t, X)
-#endif
-
-/**
- * GPB_ENUM_FWD_DECLARE is used for forward declaring enums, for example:
- *
- * ```
- * GPB_ENUM_FWD_DECLARE(Foo_Enum)
- *
- * @interface BarClass : NSObject
- * @property (nonatomic) enum Foo_Enum value;
- * - (void)bazMethod:(enum Foo_Enum):value;
- * @end
- * ```
- **/
-#define GPB_ENUM_FWD_DECLARE(X) enum X : int32_t
-
-/**
- * Based upon CF_INLINE. Forces inlining in non DEBUG builds.
- **/
-#if !defined(DEBUG)
-#define GPB_INLINE static __inline__ __attribute__((always_inline))
-#else
-#define GPB_INLINE static __inline__
-#endif
-
-/**
- * For use in public headers that might need to deal with ARC.
- **/
-#ifndef GPB_UNSAFE_UNRETAINED
-#if __has_feature(objc_arc)
-#define GPB_UNSAFE_UNRETAINED __unsafe_unretained
-#else
-#define GPB_UNSAFE_UNRETAINED
-#endif
-#endif
-
-// If property name starts with init we need to annotate it to get past ARC.
-// http://stackoverflow.com/questions/18723226/how-do-i-annotate-an-objective-c-property-with-an-objc-method-family/18723227#18723227
-//
-// Meant to be used internally by generated code.
-#define GPB_METHOD_FAMILY_NONE __attribute__((objc_method_family(none)))
-
-// ----------------------------------------------------------------------------
-// These version numbers are all internal to the ObjC Protobuf runtime; they
-// are used to ensure compatibility between the generated sources and the
-// headers being compiled against and/or the version of sources being run
-// against.
-//
-// They are all #defines so the values are captured into every .o file they
-// are used in and to allow comparisons in the preprocessor.
-
-// Current library runtime version.
-// - Gets bumped when the runtime makes changes to the interfaces between the
-// generated code and runtime (things added/removed, etc).
-#define GOOGLE_PROTOBUF_OBJC_VERSION 30002
-
-// Minimum runtime version supported for compiling/running against.
-// - Gets changed when support for the older generated code is dropped.
-#define GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION 30001
-
-
-// This is a legacy constant now frozen in time for old generated code. If
-// GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION ever gets moved above 30001 then
-// this should also change to break code compiled with an old runtime that
-// can't be supported any more.
-#define GOOGLE_PROTOBUF_OBJC_GEN_VERSION 30001
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedInputStream.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedInputStream.h
deleted file mode 100644
index fbe5009c9..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedInputStream.h
+++ /dev/null
@@ -1,253 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-@class GPBMessage;
-@class GPBExtensionRegistry;
-
-NS_ASSUME_NONNULL_BEGIN
-
-CF_EXTERN_C_BEGIN
-
-/**
- * @c GPBCodedInputStream exception name. Exceptions raised from
- * @c GPBCodedInputStream contain an underlying error in the userInfo dictionary
- * under the GPBCodedInputStreamUnderlyingErrorKey key.
- **/
-extern NSString *const GPBCodedInputStreamException;
-
-/** The key under which the underlying NSError from the exception is stored. */
-extern NSString *const GPBCodedInputStreamUnderlyingErrorKey;
-
-/** NSError domain used for @c GPBCodedInputStream errors. */
-extern NSString *const GPBCodedInputStreamErrorDomain;
-
-/**
- * Error code for NSError with @c GPBCodedInputStreamErrorDomain.
- **/
-typedef NS_ENUM(NSInteger, GPBCodedInputStreamErrorCode) {
- /** The size does not fit in the remaining bytes to be read. */
- GPBCodedInputStreamErrorInvalidSize = -100,
- /** Attempted to read beyond the subsection limit. */
- GPBCodedInputStreamErrorSubsectionLimitReached = -101,
- /** The requested subsection limit is invalid. */
- GPBCodedInputStreamErrorInvalidSubsectionLimit = -102,
- /** Invalid tag read. */
- GPBCodedInputStreamErrorInvalidTag = -103,
- /** Invalid UTF-8 character in a string. */
- GPBCodedInputStreamErrorInvalidUTF8 = -104,
- /** Invalid VarInt read. */
- GPBCodedInputStreamErrorInvalidVarInt = -105,
- /** The maximum recursion depth of messages was exceeded. */
- GPBCodedInputStreamErrorRecursionDepthExceeded = -106,
-};
-
-CF_EXTERN_C_END
-
-/**
- * Reads and decodes protocol message fields.
- *
- * The common uses of protocol buffers shouldn't need to use this class.
- * @c GPBMessage's provide a @c +parseFromData:error: and
- * @c +parseFromData:extensionRegistry:error: method that will decode a
- * message for you.
- *
- * @note Subclassing of @c GPBCodedInputStream is NOT supported.
- **/
-@interface GPBCodedInputStream : NSObject
-
-/**
- * Creates a new stream wrapping some data.
- *
- * @param data The data to wrap inside the stream.
- *
- * @return A newly instanced GPBCodedInputStream.
- **/
-+ (instancetype)streamWithData:(NSData *)data;
-
-/**
- * Initializes a stream wrapping some data.
- *
- * @param data The data to wrap inside the stream.
- *
- * @return A newly initialized GPBCodedInputStream.
- **/
-- (instancetype)initWithData:(NSData *)data;
-
-/**
- * Attempts to read a field tag, returning zero if we have reached EOF.
- * Protocol message parsers use this to read tags, since a protocol message
- * may legally end wherever a tag occurs, and zero is not a valid tag number.
- *
- * @return The field tag, or zero if EOF was reached.
- **/
-- (int32_t)readTag;
-
-/**
- * @return A double read from the stream.
- **/
-- (double)readDouble;
-/**
- * @return A float read from the stream.
- **/
-- (float)readFloat;
-/**
- * @return A uint64 read from the stream.
- **/
-- (uint64_t)readUInt64;
-/**
- * @return A uint32 read from the stream.
- **/
-- (uint32_t)readUInt32;
-/**
- * @return An int64 read from the stream.
- **/
-- (int64_t)readInt64;
-/**
- * @return An int32 read from the stream.
- **/
-- (int32_t)readInt32;
-/**
- * @return A fixed64 read from the stream.
- **/
-- (uint64_t)readFixed64;
-/**
- * @return A fixed32 read from the stream.
- **/
-- (uint32_t)readFixed32;
-/**
- * @return An enum read from the stream.
- **/
-- (int32_t)readEnum;
-/**
- * @return A sfixed32 read from the stream.
- **/
-- (int32_t)readSFixed32;
-/**
- * @return A fixed64 read from the stream.
- **/
-- (int64_t)readSFixed64;
-/**
- * @return A sint32 read from the stream.
- **/
-- (int32_t)readSInt32;
-/**
- * @return A sint64 read from the stream.
- **/
-- (int64_t)readSInt64;
-/**
- * @return A boolean read from the stream.
- **/
-- (BOOL)readBool;
-/**
- * @return A string read from the stream.
- **/
-- (NSString *)readString;
-/**
- * @return Data read from the stream.
- **/
-- (NSData *)readBytes;
-
-/**
- * Read an embedded message field value from the stream.
- *
- * @param message The message to set fields on as they are read.
- * @param extensionRegistry An optional extension registry to use to lookup
- * extensions for message.
- **/
-- (void)readMessage:(GPBMessage *)message
- extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry;
-
-/**
- * Reads and discards a single field, given its tag value.
- *
- * @param tag The tag number of the field to skip.
- *
- * @return NO if the tag is an endgroup tag (in which case nothing is skipped),
- * YES in all other cases.
- **/
-- (BOOL)skipField:(int32_t)tag;
-
-/**
- * Reads and discards an entire message. This will read either until EOF or
- * until an endgroup tag, whichever comes first.
- **/
-- (void)skipMessage;
-
-/**
- * Check to see if the logical end of the stream has been reached.
- *
- * @note This can return NO when there is no more data, but the current parsing
- * expected more data.
- *
- * @return YES if the logical end of the stream has been reached, NO otherwise.
- **/
-- (BOOL)isAtEnd;
-
-/**
- * @return The offset into the stream.
- **/
-- (size_t)position;
-
-/**
- * Moves the limit to the given byte offset starting at the current location.
- *
- * @exception GPBCodedInputStreamException If the requested bytes exceeed the
- * current limit.
- *
- * @param byteLimit The number of bytes to move the limit, offset to the current
- * location.
- *
- * @return The limit offset before moving the new limit.
- */
-- (size_t)pushLimit:(size_t)byteLimit;
-
-/**
- * Moves the limit back to the offset as it was before calling pushLimit:.
- *
- * @param oldLimit The number of bytes to move the current limit. Usually this
- * is the value returned by the pushLimit: method.
- */
-- (void)popLimit:(size_t)oldLimit;
-
-/**
- * Verifies that the last call to -readTag returned the given tag value. This
- * is used to verify that a nested group ended with the correct end tag.
- *
- * @exception NSParseErrorException If the value does not match the last tag.
- *
- * @param expected The tag that was expected.
- **/
-- (void)checkLastTagWas:(int32_t)expected;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedInputStream_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedInputStream_PackagePrivate.h
deleted file mode 100644
index 43ec6e79b..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedInputStream_PackagePrivate.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This header is private to the ProtobolBuffers library and must NOT be
-// included by any sources outside this library. The contents of this file are
-// subject to change at any time without notice.
-
-#import "GPBCodedInputStream.h"
-
-@class GPBUnknownFieldSet;
-@class GPBFieldDescriptor;
-
-typedef struct GPBCodedInputStreamState {
- const uint8_t *bytes;
- size_t bufferSize;
- size_t bufferPos;
-
- // For parsing subsections of an input stream you can put a hard limit on
- // how much should be read. Normally the limit is the end of the stream,
- // but you can adjust it to anywhere, and if you hit it you will be at the
- // end of the stream, until you adjust the limit.
- size_t currentLimit;
- int32_t lastTag;
- NSUInteger recursionDepth;
-} GPBCodedInputStreamState;
-
-@interface GPBCodedInputStream () {
- @package
- struct GPBCodedInputStreamState state_;
- NSData *buffer_;
-}
-
-// Group support is deprecated, so we hide this interface from users, but
-// support for older data.
-- (void)readGroup:(int32_t)fieldNumber
- message:(GPBMessage *)message
- extensionRegistry:(GPBExtensionRegistry *)extensionRegistry;
-
-// Reads a group field value from the stream and merges it into the given
-// UnknownFieldSet.
-- (void)readUnknownGroup:(int32_t)fieldNumber
- message:(GPBUnknownFieldSet *)message;
-
-// Reads a map entry.
-- (void)readMapEntry:(id)mapDictionary
- extensionRegistry:(GPBExtensionRegistry *)extensionRegistry
- field:(GPBFieldDescriptor *)field
- parentMessage:(GPBMessage *)parentMessage;
-@end
-
-CF_EXTERN_C_BEGIN
-
-int32_t GPBCodedInputStreamReadTag(GPBCodedInputStreamState *state);
-
-double GPBCodedInputStreamReadDouble(GPBCodedInputStreamState *state);
-float GPBCodedInputStreamReadFloat(GPBCodedInputStreamState *state);
-uint64_t GPBCodedInputStreamReadUInt64(GPBCodedInputStreamState *state);
-uint32_t GPBCodedInputStreamReadUInt32(GPBCodedInputStreamState *state);
-int64_t GPBCodedInputStreamReadInt64(GPBCodedInputStreamState *state);
-int32_t GPBCodedInputStreamReadInt32(GPBCodedInputStreamState *state);
-uint64_t GPBCodedInputStreamReadFixed64(GPBCodedInputStreamState *state);
-uint32_t GPBCodedInputStreamReadFixed32(GPBCodedInputStreamState *state);
-int32_t GPBCodedInputStreamReadEnum(GPBCodedInputStreamState *state);
-int32_t GPBCodedInputStreamReadSFixed32(GPBCodedInputStreamState *state);
-int64_t GPBCodedInputStreamReadSFixed64(GPBCodedInputStreamState *state);
-int32_t GPBCodedInputStreamReadSInt32(GPBCodedInputStreamState *state);
-int64_t GPBCodedInputStreamReadSInt64(GPBCodedInputStreamState *state);
-BOOL GPBCodedInputStreamReadBool(GPBCodedInputStreamState *state);
-NSString *GPBCodedInputStreamReadRetainedString(GPBCodedInputStreamState *state)
- __attribute((ns_returns_retained));
-NSData *GPBCodedInputStreamReadRetainedBytes(GPBCodedInputStreamState *state)
- __attribute((ns_returns_retained));
-NSData *GPBCodedInputStreamReadRetainedBytesNoCopy(
- GPBCodedInputStreamState *state) __attribute((ns_returns_retained));
-
-size_t GPBCodedInputStreamPushLimit(GPBCodedInputStreamState *state,
- size_t byteLimit);
-void GPBCodedInputStreamPopLimit(GPBCodedInputStreamState *state,
- size_t oldLimit);
-size_t GPBCodedInputStreamBytesUntilLimit(GPBCodedInputStreamState *state);
-BOOL GPBCodedInputStreamIsAtEnd(GPBCodedInputStreamState *state);
-void GPBCodedInputStreamCheckLastTagWas(GPBCodedInputStreamState *state,
- int32_t value);
-
-CF_EXTERN_C_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedOutputStream.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedOutputStream.h
deleted file mode 100644
index 23c404b85..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedOutputStream.h
+++ /dev/null
@@ -1,748 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBRuntimeTypes.h"
-#import "GPBWireFormat.h"
-
-@class GPBBoolArray;
-@class GPBDoubleArray;
-@class GPBEnumArray;
-@class GPBFloatArray;
-@class GPBMessage;
-@class GPBInt32Array;
-@class GPBInt64Array;
-@class GPBUInt32Array;
-@class GPBUInt64Array;
-@class GPBUnknownFieldSet;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * @c GPBCodedOutputStream exception names.
- **/
-extern NSString *const GPBCodedOutputStreamException_OutOfSpace;
-extern NSString *const GPBCodedOutputStreamException_WriteFailed;
-
-/**
- * Writes out protocol message fields.
- *
- * The common uses of protocol buffers shouldn't need to use this class.
- * GPBMessage's provide a -data method that will serialize the message for you.
- *
- * @note Any -write* api can raise the GPBCodedOutputStreamException_*
- * exceptions.
- *
- * @note Subclassing of GPBCodedOutputStream is NOT supported.
- **/
-@interface GPBCodedOutputStream : NSObject
-
-/**
- * Creates a stream to fill in the given data. Data must be sized to fit or
- * an error will be raised when out of space.
- *
- * @param data The data where the stream will be written to.
- *
- * @return A newly instanced GPBCodedOutputStream.
- **/
-+ (instancetype)streamWithData:(NSMutableData *)data;
-
-/**
- * Creates a stream to write into the given NSOutputStream.
- *
- * @param output The output stream where the stream will be written to.
- *
- * @return A newly instanced GPBCodedOutputStream.
- **/
-+ (instancetype)streamWithOutputStream:(NSOutputStream *)output;
-
-/**
- * Initializes a stream to fill in the given data. Data must be sized to fit
- * or an error will be raised when out of space.
- *
- * @param data The data where the stream will be written to.
- *
- * @return A newly initialized GPBCodedOutputStream.
- **/
-- (instancetype)initWithData:(NSMutableData *)data;
-
-/**
- * Initializes a stream to write into the given @c NSOutputStream.
- *
- * @param output The output stream where the stream will be written to.
- *
- * @return A newly initialized GPBCodedOutputStream.
- **/
-- (instancetype)initWithOutputStream:(NSOutputStream *)output;
-
-/**
- * Flush any buffered data out.
- **/
-- (void)flush;
-
-/**
- * Write the raw byte out.
- *
- * @param value The value to write out.
- **/
-- (void)writeRawByte:(uint8_t)value;
-
-/**
- * Write the tag for the given field number and wire format.
- *
- * @param fieldNumber The field number.
- * @param format The wire format the data for the field will be in.
- **/
-- (void)writeTag:(uint32_t)fieldNumber format:(GPBWireFormat)format;
-
-/**
- * Write a 32bit value out in little endian format.
- *
- * @param value The value to write out.
- **/
-- (void)writeRawLittleEndian32:(int32_t)value;
-/**
- * Write a 64bit value out in little endian format.
- *
- * @param value The value to write out.
- **/
-- (void)writeRawLittleEndian64:(int64_t)value;
-
-/**
- * Write a 32bit value out in varint format.
- *
- * @param value The value to write out.
- **/
-- (void)writeRawVarint32:(int32_t)value;
-/**
- * Write a 64bit value out in varint format.
- *
- * @param value The value to write out.
- **/
-- (void)writeRawVarint64:(int64_t)value;
-
-/**
- * Write a size_t out as a 32bit varint value.
- *
- * @note This will truncate 64 bit values to 32.
- *
- * @param value The value to write out.
- **/
-- (void)writeRawVarintSizeTAs32:(size_t)value;
-
-/**
- * Writes the contents of an NSData out.
- *
- * @param data The data to write out.
- **/
-- (void)writeRawData:(NSData *)data;
-/**
- * Writes out the given data.
- *
- * @param data The data blob to write out.
- * @param offset The offset into the blob to start writing out.
- * @param length The number of bytes from the blob to write out.
- **/
-- (void)writeRawPtr:(const void *)data
- offset:(size_t)offset
- length:(size_t)length;
-
-//%PDDM-EXPAND _WRITE_DECLS()
-// This block of code is generated, do not edit it directly.
-
-/**
- * Write a double for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeDouble:(int32_t)fieldNumber value:(double)value;
-/**
- * Write a packed array of double for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeDoubleArray:(int32_t)fieldNumber
- values:(GPBDoubleArray *)values
- tag:(uint32_t)tag;
-/**
- * Write a double without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeDoubleNoTag:(double)value;
-
-/**
- * Write a float for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeFloat:(int32_t)fieldNumber value:(float)value;
-/**
- * Write a packed array of float for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeFloatArray:(int32_t)fieldNumber
- values:(GPBFloatArray *)values
- tag:(uint32_t)tag;
-/**
- * Write a float without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeFloatNoTag:(float)value;
-
-/**
- * Write a uint64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeUInt64:(int32_t)fieldNumber value:(uint64_t)value;
-/**
- * Write a packed array of uint64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeUInt64Array:(int32_t)fieldNumber
- values:(GPBUInt64Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a uint64_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeUInt64NoTag:(uint64_t)value;
-
-/**
- * Write a int64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeInt64:(int32_t)fieldNumber value:(int64_t)value;
-/**
- * Write a packed array of int64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeInt64Array:(int32_t)fieldNumber
- values:(GPBInt64Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a int64_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeInt64NoTag:(int64_t)value;
-
-/**
- * Write a int32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeInt32:(int32_t)fieldNumber value:(int32_t)value;
-/**
- * Write a packed array of int32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeInt32Array:(int32_t)fieldNumber
- values:(GPBInt32Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a int32_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeInt32NoTag:(int32_t)value;
-
-/**
- * Write a uint32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeUInt32:(int32_t)fieldNumber value:(uint32_t)value;
-/**
- * Write a packed array of uint32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeUInt32Array:(int32_t)fieldNumber
- values:(GPBUInt32Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a uint32_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeUInt32NoTag:(uint32_t)value;
-
-/**
- * Write a uint64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeFixed64:(int32_t)fieldNumber value:(uint64_t)value;
-/**
- * Write a packed array of uint64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeFixed64Array:(int32_t)fieldNumber
- values:(GPBUInt64Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a uint64_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeFixed64NoTag:(uint64_t)value;
-
-/**
- * Write a uint32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeFixed32:(int32_t)fieldNumber value:(uint32_t)value;
-/**
- * Write a packed array of uint32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeFixed32Array:(int32_t)fieldNumber
- values:(GPBUInt32Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a uint32_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeFixed32NoTag:(uint32_t)value;
-
-/**
- * Write a int32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeSInt32:(int32_t)fieldNumber value:(int32_t)value;
-/**
- * Write a packed array of int32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeSInt32Array:(int32_t)fieldNumber
- values:(GPBInt32Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a int32_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeSInt32NoTag:(int32_t)value;
-
-/**
- * Write a int64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeSInt64:(int32_t)fieldNumber value:(int64_t)value;
-/**
- * Write a packed array of int64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeSInt64Array:(int32_t)fieldNumber
- values:(GPBInt64Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a int64_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeSInt64NoTag:(int64_t)value;
-
-/**
- * Write a int64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeSFixed64:(int32_t)fieldNumber value:(int64_t)value;
-/**
- * Write a packed array of int64_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeSFixed64Array:(int32_t)fieldNumber
- values:(GPBInt64Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a int64_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeSFixed64NoTag:(int64_t)value;
-
-/**
- * Write a int32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeSFixed32:(int32_t)fieldNumber value:(int32_t)value;
-/**
- * Write a packed array of int32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeSFixed32Array:(int32_t)fieldNumber
- values:(GPBInt32Array *)values
- tag:(uint32_t)tag;
-/**
- * Write a int32_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeSFixed32NoTag:(int32_t)value;
-
-/**
- * Write a BOOL for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeBool:(int32_t)fieldNumber value:(BOOL)value;
-/**
- * Write a packed array of BOOL for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeBoolArray:(int32_t)fieldNumber
- values:(GPBBoolArray *)values
- tag:(uint32_t)tag;
-/**
- * Write a BOOL without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeBoolNoTag:(BOOL)value;
-
-/**
- * Write a int32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeEnum:(int32_t)fieldNumber value:(int32_t)value;
-/**
- * Write a packed array of int32_t for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- * @param tag The tag assigned to the values.
- **/
-- (void)writeEnumArray:(int32_t)fieldNumber
- values:(GPBEnumArray *)values
- tag:(uint32_t)tag;
-/**
- * Write a int32_t without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeEnumNoTag:(int32_t)value;
-
-/**
- * Write a NSString for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeString:(int32_t)fieldNumber value:(NSString *)value;
-/**
- * Write an array of NSString for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- **/
-- (void)writeStringArray:(int32_t)fieldNumber values:(NSArray<NSString*> *)values;
-/**
- * Write a NSString without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeStringNoTag:(NSString *)value;
-
-/**
- * Write a GPBMessage for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeMessage:(int32_t)fieldNumber value:(GPBMessage *)value;
-/**
- * Write an array of GPBMessage for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- **/
-- (void)writeMessageArray:(int32_t)fieldNumber values:(NSArray<GPBMessage*> *)values;
-/**
- * Write a GPBMessage without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeMessageNoTag:(GPBMessage *)value;
-
-/**
- * Write a NSData for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeBytes:(int32_t)fieldNumber value:(NSData *)value;
-/**
- * Write an array of NSData for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- **/
-- (void)writeBytesArray:(int32_t)fieldNumber values:(NSArray<NSData*> *)values;
-/**
- * Write a NSData without any tag.
- *
- * @param value The value to write out.
- **/
-- (void)writeBytesNoTag:(NSData *)value;
-
-/**
- * Write a GPBMessage for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeGroup:(int32_t)fieldNumber
- value:(GPBMessage *)value;
-/**
- * Write an array of GPBMessage for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- **/
-- (void)writeGroupArray:(int32_t)fieldNumber values:(NSArray<GPBMessage*> *)values;
-/**
- * Write a GPBMessage without any tag (but does write the endGroup tag).
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeGroupNoTag:(int32_t)fieldNumber
- value:(GPBMessage *)value;
-
-/**
- * Write a GPBUnknownFieldSet for the given field number.
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeUnknownGroup:(int32_t)fieldNumber
- value:(GPBUnknownFieldSet *)value;
-/**
- * Write an array of GPBUnknownFieldSet for the given field number.
- *
- * @param fieldNumber The field number assigned to the values.
- * @param values The values to write out.
- **/
-- (void)writeUnknownGroupArray:(int32_t)fieldNumber values:(NSArray<GPBUnknownFieldSet*> *)values;
-/**
- * Write a GPBUnknownFieldSet without any tag (but does write the endGroup tag).
- *
- * @param fieldNumber The field number assigned to the value.
- * @param value The value to write out.
- **/
-- (void)writeUnknownGroupNoTag:(int32_t)fieldNumber
- value:(GPBUnknownFieldSet *)value;
-
-//%PDDM-EXPAND-END _WRITE_DECLS()
-
-/**
-Write a MessageSet extension field to the stream. For historical reasons,
-the wire format differs from normal fields.
-
-@param fieldNumber The extension field number to write out.
-@param value The message from where to get the extension.
-*/
-- (void)writeMessageSetExtension:(int32_t)fieldNumber value:(GPBMessage *)value;
-
-/**
-Write an unparsed MessageSet extension field to the stream. For historical
-reasons, the wire format differs from normal fields.
-
-@param fieldNumber The extension field number to write out.
-@param value The raw message from where to get the extension.
-*/
-- (void)writeRawMessageSetExtension:(int32_t)fieldNumber value:(NSData *)value;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-// Write methods for types that can be in packed arrays.
-//%PDDM-DEFINE _WRITE_PACKABLE_DECLS(NAME, ARRAY_TYPE, TYPE)
-//%/**
-//% * Write a TYPE for the given field number.
-//% *
-//% * @param fieldNumber The field number assigned to the value.
-//% * @param value The value to write out.
-//% **/
-//%- (void)write##NAME:(int32_t)fieldNumber value:(TYPE)value;
-//%/**
-//% * Write a packed array of TYPE for the given field number.
-//% *
-//% * @param fieldNumber The field number assigned to the values.
-//% * @param values The values to write out.
-//% * @param tag The tag assigned to the values.
-//% **/
-//%- (void)write##NAME##Array:(int32_t)fieldNumber
-//% NAME$S values:(GPB##ARRAY_TYPE##Array *)values
-//% NAME$S tag:(uint32_t)tag;
-//%/**
-//% * Write a TYPE without any tag.
-//% *
-//% * @param value The value to write out.
-//% **/
-//%- (void)write##NAME##NoTag:(TYPE)value;
-//%
-// Write methods for types that aren't in packed arrays.
-//%PDDM-DEFINE _WRITE_UNPACKABLE_DECLS(NAME, TYPE)
-//%/**
-//% * Write a TYPE for the given field number.
-//% *
-//% * @param fieldNumber The field number assigned to the value.
-//% * @param value The value to write out.
-//% **/
-//%- (void)write##NAME:(int32_t)fieldNumber value:(TYPE *)value;
-//%/**
-//% * Write an array of TYPE for the given field number.
-//% *
-//% * @param fieldNumber The field number assigned to the values.
-//% * @param values The values to write out.
-//% **/
-//%- (void)write##NAME##Array:(int32_t)fieldNumber values:(NSArray<##TYPE##*> *)values;
-//%/**
-//% * Write a TYPE without any tag.
-//% *
-//% * @param value The value to write out.
-//% **/
-//%- (void)write##NAME##NoTag:(TYPE *)value;
-//%
-// Special write methods for Groups.
-//%PDDM-DEFINE _WRITE_GROUP_DECLS(NAME, TYPE)
-//%/**
-//% * Write a TYPE for the given field number.
-//% *
-//% * @param fieldNumber The field number assigned to the value.
-//% * @param value The value to write out.
-//% **/
-//%- (void)write##NAME:(int32_t)fieldNumber
-//% NAME$S value:(TYPE *)value;
-//%/**
-//% * Write an array of TYPE for the given field number.
-//% *
-//% * @param fieldNumber The field number assigned to the values.
-//% * @param values The values to write out.
-//% **/
-//%- (void)write##NAME##Array:(int32_t)fieldNumber values:(NSArray<##TYPE##*> *)values;
-//%/**
-//% * Write a TYPE without any tag (but does write the endGroup tag).
-//% *
-//% * @param fieldNumber The field number assigned to the value.
-//% * @param value The value to write out.
-//% **/
-//%- (void)write##NAME##NoTag:(int32_t)fieldNumber
-//% NAME$S value:(TYPE *)value;
-//%
-
-// One macro to hide it all up above.
-//%PDDM-DEFINE _WRITE_DECLS()
-//%_WRITE_PACKABLE_DECLS(Double, Double, double)
-//%_WRITE_PACKABLE_DECLS(Float, Float, float)
-//%_WRITE_PACKABLE_DECLS(UInt64, UInt64, uint64_t)
-//%_WRITE_PACKABLE_DECLS(Int64, Int64, int64_t)
-//%_WRITE_PACKABLE_DECLS(Int32, Int32, int32_t)
-//%_WRITE_PACKABLE_DECLS(UInt32, UInt32, uint32_t)
-//%_WRITE_PACKABLE_DECLS(Fixed64, UInt64, uint64_t)
-//%_WRITE_PACKABLE_DECLS(Fixed32, UInt32, uint32_t)
-//%_WRITE_PACKABLE_DECLS(SInt32, Int32, int32_t)
-//%_WRITE_PACKABLE_DECLS(SInt64, Int64, int64_t)
-//%_WRITE_PACKABLE_DECLS(SFixed64, Int64, int64_t)
-//%_WRITE_PACKABLE_DECLS(SFixed32, Int32, int32_t)
-//%_WRITE_PACKABLE_DECLS(Bool, Bool, BOOL)
-//%_WRITE_PACKABLE_DECLS(Enum, Enum, int32_t)
-//%_WRITE_UNPACKABLE_DECLS(String, NSString)
-//%_WRITE_UNPACKABLE_DECLS(Message, GPBMessage)
-//%_WRITE_UNPACKABLE_DECLS(Bytes, NSData)
-//%_WRITE_GROUP_DECLS(Group, GPBMessage)
-//%_WRITE_GROUP_DECLS(UnknownGroup, GPBUnknownFieldSet)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedOutputStream_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedOutputStream_PackagePrivate.h
deleted file mode 100644
index 2e7bb4c4a..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBCodedOutputStream_PackagePrivate.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2016 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import "GPBCodedOutputStream.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-CF_EXTERN_C_BEGIN
-
-size_t GPBComputeDoubleSize(int32_t fieldNumber, double value)
- __attribute__((const));
-size_t GPBComputeFloatSize(int32_t fieldNumber, float value)
- __attribute__((const));
-size_t GPBComputeUInt64Size(int32_t fieldNumber, uint64_t value)
- __attribute__((const));
-size_t GPBComputeInt64Size(int32_t fieldNumber, int64_t value)
- __attribute__((const));
-size_t GPBComputeInt32Size(int32_t fieldNumber, int32_t value)
- __attribute__((const));
-size_t GPBComputeFixed64Size(int32_t fieldNumber, uint64_t value)
- __attribute__((const));
-size_t GPBComputeFixed32Size(int32_t fieldNumber, uint32_t value)
- __attribute__((const));
-size_t GPBComputeBoolSize(int32_t fieldNumber, BOOL value)
- __attribute__((const));
-size_t GPBComputeStringSize(int32_t fieldNumber, NSString *value)
- __attribute__((const));
-size_t GPBComputeGroupSize(int32_t fieldNumber, GPBMessage *value)
- __attribute__((const));
-size_t GPBComputeUnknownGroupSize(int32_t fieldNumber,
- GPBUnknownFieldSet *value)
- __attribute__((const));
-size_t GPBComputeMessageSize(int32_t fieldNumber, GPBMessage *value)
- __attribute__((const));
-size_t GPBComputeBytesSize(int32_t fieldNumber, NSData *value)
- __attribute__((const));
-size_t GPBComputeUInt32Size(int32_t fieldNumber, uint32_t value)
- __attribute__((const));
-size_t GPBComputeSFixed32Size(int32_t fieldNumber, int32_t value)
- __attribute__((const));
-size_t GPBComputeSFixed64Size(int32_t fieldNumber, int64_t value)
- __attribute__((const));
-size_t GPBComputeSInt32Size(int32_t fieldNumber, int32_t value)
- __attribute__((const));
-size_t GPBComputeSInt64Size(int32_t fieldNumber, int64_t value)
- __attribute__((const));
-size_t GPBComputeTagSize(int32_t fieldNumber) __attribute__((const));
-size_t GPBComputeWireFormatTagSize(int field_number, GPBDataType dataType)
- __attribute__((const));
-
-size_t GPBComputeDoubleSizeNoTag(double value) __attribute__((const));
-size_t GPBComputeFloatSizeNoTag(float value) __attribute__((const));
-size_t GPBComputeUInt64SizeNoTag(uint64_t value) __attribute__((const));
-size_t GPBComputeInt64SizeNoTag(int64_t value) __attribute__((const));
-size_t GPBComputeInt32SizeNoTag(int32_t value) __attribute__((const));
-size_t GPBComputeFixed64SizeNoTag(uint64_t value) __attribute__((const));
-size_t GPBComputeFixed32SizeNoTag(uint32_t value) __attribute__((const));
-size_t GPBComputeBoolSizeNoTag(BOOL value) __attribute__((const));
-size_t GPBComputeStringSizeNoTag(NSString *value) __attribute__((const));
-size_t GPBComputeGroupSizeNoTag(GPBMessage *value) __attribute__((const));
-size_t GPBComputeUnknownGroupSizeNoTag(GPBUnknownFieldSet *value)
- __attribute__((const));
-size_t GPBComputeMessageSizeNoTag(GPBMessage *value) __attribute__((const));
-size_t GPBComputeBytesSizeNoTag(NSData *value) __attribute__((const));
-size_t GPBComputeUInt32SizeNoTag(int32_t value) __attribute__((const));
-size_t GPBComputeEnumSizeNoTag(int32_t value) __attribute__((const));
-size_t GPBComputeSFixed32SizeNoTag(int32_t value) __attribute__((const));
-size_t GPBComputeSFixed64SizeNoTag(int64_t value) __attribute__((const));
-size_t GPBComputeSInt32SizeNoTag(int32_t value) __attribute__((const));
-size_t GPBComputeSInt64SizeNoTag(int64_t value) __attribute__((const));
-
-// Note that this will calculate the size of 64 bit values truncated to 32.
-size_t GPBComputeSizeTSizeAsInt32NoTag(size_t value) __attribute__((const));
-
-size_t GPBComputeRawVarint32Size(int32_t value) __attribute__((const));
-size_t GPBComputeRawVarint64Size(int64_t value) __attribute__((const));
-
-// Note that this will calculate the size of 64 bit values truncated to 32.
-size_t GPBComputeRawVarint32SizeForInteger(NSInteger value)
- __attribute__((const));
-
-// Compute the number of bytes that would be needed to encode a
-// MessageSet extension to the stream. For historical reasons,
-// the wire format differs from normal fields.
-size_t GPBComputeMessageSetExtensionSize(int32_t fieldNumber, GPBMessage *value)
- __attribute__((const));
-
-// Compute the number of bytes that would be needed to encode an
-// unparsed MessageSet extension field to the stream. For
-// historical reasons, the wire format differs from normal fields.
-size_t GPBComputeRawMessageSetExtensionSize(int32_t fieldNumber, NSData *value)
- __attribute__((const));
-
-size_t GPBComputeEnumSize(int32_t fieldNumber, int32_t value)
- __attribute__((const));
-
-CF_EXTERN_C_END
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDescriptor.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDescriptor.h
deleted file mode 100644
index 651f4de08..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDescriptor.h
+++ /dev/null
@@ -1,288 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBRuntimeTypes.h"
-
-@class GPBEnumDescriptor;
-@class GPBFieldDescriptor;
-@class GPBFileDescriptor;
-@class GPBOneofDescriptor;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/** Syntax used in the proto file. */
-typedef NS_ENUM(uint8_t, GPBFileSyntax) {
- /** Unknown syntax. */
- GPBFileSyntaxUnknown = 0,
- /** Proto2 syntax. */
- GPBFileSyntaxProto2 = 2,
- /** Proto3 syntax. */
- GPBFileSyntaxProto3 = 3,
-};
-
-/** Type of proto field. */
-typedef NS_ENUM(uint8_t, GPBFieldType) {
- /** Optional/required field. Only valid for proto2 fields. */
- GPBFieldTypeSingle,
- /** Repeated field. */
- GPBFieldTypeRepeated,
- /** Map field. */
- GPBFieldTypeMap,
-};
-
-/**
- * Describes a proto message.
- **/
-@interface GPBDescriptor : NSObject<NSCopying>
-
-/** Name of the message. */
-@property(nonatomic, readonly, copy) NSString *name;
-/** Fields declared in the message. */
-@property(nonatomic, readonly, strong, nullable) NSArray<GPBFieldDescriptor*> *fields;
-/** Oneofs declared in the message. */
-@property(nonatomic, readonly, strong, nullable) NSArray<GPBOneofDescriptor*> *oneofs;
-/** Extension range declared for the message. */
-@property(nonatomic, readonly, nullable) const GPBExtensionRange *extensionRanges;
-/** Number of extension ranges declared for the message. */
-@property(nonatomic, readonly) uint32_t extensionRangesCount;
-/** Descriptor for the file where the message was defined. */
-@property(nonatomic, readonly, assign) GPBFileDescriptor *file;
-
-/** Whether the message is in wire format or not. */
-@property(nonatomic, readonly, getter=isWireFormat) BOOL wireFormat;
-/** The class of this message. */
-@property(nonatomic, readonly) Class messageClass;
-/** Containing message descriptor if this message is nested, or nil otherwise. */
-@property(readonly, nullable) GPBDescriptor *containingType;
-/**
- * Fully qualified name for this message (package.message). Can be nil if the
- * value is unable to be computed.
- */
-@property(readonly, nullable) NSString *fullName;
-
-/**
- * Gets the field for the given number.
- *
- * @param fieldNumber The number for the field to get.
- *
- * @return The field descriptor for the given number, or nil if not found.
- **/
-- (nullable GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber;
-
-/**
- * Gets the field for the given name.
- *
- * @param name The name for the field to get.
- *
- * @return The field descriptor for the given name, or nil if not found.
- **/
-- (nullable GPBFieldDescriptor *)fieldWithName:(NSString *)name;
-
-/**
- * Gets the oneof for the given name.
- *
- * @param name The name for the oneof to get.
- *
- * @return The oneof descriptor for the given name, or nil if not found.
- **/
-- (nullable GPBOneofDescriptor *)oneofWithName:(NSString *)name;
-
-@end
-
-/**
- * Describes a proto file.
- **/
-@interface GPBFileDescriptor : NSObject
-
-/** The package declared in the proto file. */
-@property(nonatomic, readonly, copy) NSString *package;
-/** The objc prefix declared in the proto file. */
-@property(nonatomic, readonly, copy, nullable) NSString *objcPrefix;
-/** The syntax of the proto file. */
-@property(nonatomic, readonly) GPBFileSyntax syntax;
-
-@end
-
-/**
- * Describes a oneof field.
- **/
-@interface GPBOneofDescriptor : NSObject
-/** Name of the oneof field. */
-@property(nonatomic, readonly) NSString *name;
-/** Fields declared in the oneof. */
-@property(nonatomic, readonly) NSArray<GPBFieldDescriptor*> *fields;
-
-/**
- * Gets the field for the given number.
- *
- * @param fieldNumber The number for the field to get.
- *
- * @return The field descriptor for the given number, or nil if not found.
- **/
-- (nullable GPBFieldDescriptor *)fieldWithNumber:(uint32_t)fieldNumber;
-
-/**
- * Gets the field for the given name.
- *
- * @param name The name for the field to get.
- *
- * @return The field descriptor for the given name, or nil if not found.
- **/
-- (nullable GPBFieldDescriptor *)fieldWithName:(NSString *)name;
-
-@end
-
-/**
- * Describes a proto field.
- **/
-@interface GPBFieldDescriptor : NSObject
-
-/** Name of the field. */
-@property(nonatomic, readonly, copy) NSString *name;
-/** Number associated with the field. */
-@property(nonatomic, readonly) uint32_t number;
-/** Data type contained in the field. */
-@property(nonatomic, readonly) GPBDataType dataType;
-/** Whether it has a default value or not. */
-@property(nonatomic, readonly) BOOL hasDefaultValue;
-/** Default value for the field. */
-@property(nonatomic, readonly) GPBGenericValue defaultValue;
-/** Whether this field is required. Only valid for proto2 fields. */
-@property(nonatomic, readonly, getter=isRequired) BOOL required;
-/** Whether this field is optional. */
-@property(nonatomic, readonly, getter=isOptional) BOOL optional;
-/** Type of field (single, repeated, map). */
-@property(nonatomic, readonly) GPBFieldType fieldType;
-/** Type of the key if the field is a map. The value's type is -fieldType. */
-@property(nonatomic, readonly) GPBDataType mapKeyDataType;
-/** Whether the field is packable. */
-@property(nonatomic, readonly, getter=isPackable) BOOL packable;
-
-/** The containing oneof if this field is part of one, nil otherwise. */
-@property(nonatomic, readonly, assign, nullable) GPBOneofDescriptor *containingOneof;
-
-/** Class of the message if the field is of message type. */
-@property(nonatomic, readonly, assign, nullable) Class msgClass;
-
-/** Descriptor for the enum if this field is an enum. */
-@property(nonatomic, readonly, strong, nullable) GPBEnumDescriptor *enumDescriptor;
-
-/**
- * Checks whether the given enum raw value is a valid enum value.
- *
- * @param value The raw enum value to check.
- *
- * @return YES if value is a valid enum raw value.
- **/
-- (BOOL)isValidEnumValue:(int32_t)value;
-
-/** @return Name for the text format, or nil if not known. */
-- (nullable NSString *)textFormatName;
-
-@end
-
-/**
- * Describes a proto enum.
- **/
-@interface GPBEnumDescriptor : NSObject
-
-/** Name of the enum. */
-@property(nonatomic, readonly, copy) NSString *name;
-/** Function that validates that raw values are valid enum values. */
-@property(nonatomic, readonly) GPBEnumValidationFunc enumVerifier;
-
-/**
- * Returns the enum value name for the given raw enum.
- *
- * @param number The raw enum value.
- *
- * @return The name of the enum value passed, or nil if not valid.
- **/
-- (nullable NSString *)enumNameForValue:(int32_t)number;
-
-/**
- * Gets the enum raw value for the given enum name.
- *
- * @param outValue A pointer where the value will be set.
- * @param name The enum name for which to get the raw value.
- *
- * @return YES if a value was copied into the pointer, NO otherwise.
- **/
-- (BOOL)getValue:(nullable int32_t *)outValue forEnumName:(NSString *)name;
-
-/**
- * Returns the text format for the given raw enum value.
- *
- * @param number The raw enum value.
- *
- * @return The text format name for the raw enum value, or nil if not valid.
- **/
-- (nullable NSString *)textFormatNameForValue:(int32_t)number;
-
-/**
- * Gets the enum raw value for the given text format name.
- *
- * @param outValue A pointer where the value will be set.
- * @param textFormatName The text format name for which to get the raw value.
- *
- * @return YES if a value was copied into the pointer, NO otherwise.
- **/
-- (BOOL)getValue:(nullable int32_t *)outValue forEnumTextFormatName:(NSString *)textFormatName;
-
-@end
-
-/**
- * Describes a proto extension.
- **/
-@interface GPBExtensionDescriptor : NSObject<NSCopying>
-/** Field number under which the extension is stored. */
-@property(nonatomic, readonly) uint32_t fieldNumber;
-/** The containing message class, i.e. the class extended by this extension. */
-@property(nonatomic, readonly) Class containingMessageClass;
-/** Data type contained in the extension. */
-@property(nonatomic, readonly) GPBDataType dataType;
-/** Whether the extension is repeated. */
-@property(nonatomic, readonly, getter=isRepeated) BOOL repeated;
-/** Whether the extension is packable. */
-@property(nonatomic, readonly, getter=isPackable) BOOL packable;
-/** The class of the message if the extension is of message type. */
-@property(nonatomic, readonly, assign) Class msgClass;
-/** The singleton name for the extension. */
-@property(nonatomic, readonly) NSString *singletonName;
-/** The enum descriptor if the extension is of enum type. */
-@property(nonatomic, readonly, strong, nullable) GPBEnumDescriptor *enumDescriptor;
-/** The default value for the extension. */
-@property(nonatomic, readonly, nullable) id defaultValue;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDescriptor_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDescriptor_PackagePrivate.h
deleted file mode 100644
index 452b3f8e7..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDescriptor_PackagePrivate.h
+++ /dev/null
@@ -1,325 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This header is private to the ProtobolBuffers library and must NOT be
-// included by any sources outside this library. The contents of this file are
-// subject to change at any time without notice.
-
-#import "GPBDescriptor.h"
-#import "GPBWireFormat.h"
-
-// Describes attributes of the field.
-typedef NS_OPTIONS(uint16_t, GPBFieldFlags) {
- GPBFieldNone = 0,
- // These map to standard protobuf concepts.
- GPBFieldRequired = 1 << 0,
- GPBFieldRepeated = 1 << 1,
- GPBFieldPacked = 1 << 2,
- GPBFieldOptional = 1 << 3,
- GPBFieldHasDefaultValue = 1 << 4,
-
- // Indicates the field needs custom handling for the TextFormat name, if not
- // set, the name can be derived from the ObjC name.
- GPBFieldTextFormatNameCustom = 1 << 6,
- // Indicates the field has an enum descriptor.
- GPBFieldHasEnumDescriptor = 1 << 7,
-
- // These are not standard protobuf concepts, they are specific to the
- // Objective C runtime.
-
- // These bits are used to mark the field as a map and what the key
- // type is.
- GPBFieldMapKeyMask = 0xF << 8,
- GPBFieldMapKeyInt32 = 1 << 8,
- GPBFieldMapKeyInt64 = 2 << 8,
- GPBFieldMapKeyUInt32 = 3 << 8,
- GPBFieldMapKeyUInt64 = 4 << 8,
- GPBFieldMapKeySInt32 = 5 << 8,
- GPBFieldMapKeySInt64 = 6 << 8,
- GPBFieldMapKeyFixed32 = 7 << 8,
- GPBFieldMapKeyFixed64 = 8 << 8,
- GPBFieldMapKeySFixed32 = 9 << 8,
- GPBFieldMapKeySFixed64 = 10 << 8,
- GPBFieldMapKeyBool = 11 << 8,
- GPBFieldMapKeyString = 12 << 8,
-};
-
-// NOTE: The structures defined here have their members ordered to minimize
-// their size. This directly impacts the size of apps since these exist per
-// field/extension.
-
-// Describes a single field in a protobuf as it is represented as an ivar.
-typedef struct GPBMessageFieldDescription {
- // Name of ivar.
- const char *name;
- union {
- const char *className; // Name for message class.
- // For enums only: If EnumDescriptors are compiled in, it will be that,
- // otherwise it will be the verifier.
- GPBEnumDescriptorFunc enumDescFunc;
- GPBEnumValidationFunc enumVerifier;
- } dataTypeSpecific;
- // The field number for the ivar.
- uint32_t number;
- // The index (in bits) into _has_storage_.
- // >= 0: the bit to use for a value being set.
- // = GPBNoHasBit(INT32_MAX): no storage used.
- // < 0: in a oneOf, use a full int32 to record the field active.
- int32_t hasIndex;
- // Offset of the variable into it's structure struct.
- uint32_t offset;
- // Field flags. Use accessor functions below.
- GPBFieldFlags flags;
- // Data type of the ivar.
- GPBDataType dataType;
-} GPBMessageFieldDescription;
-
-// Fields in messages defined in a 'proto2' syntax file can provide a default
-// value. This struct provides the default along with the field info.
-typedef struct GPBMessageFieldDescriptionWithDefault {
- // Default value for the ivar.
- GPBGenericValue defaultValue;
-
- GPBMessageFieldDescription core;
-} GPBMessageFieldDescriptionWithDefault;
-
-// Describes attributes of the extension.
-typedef NS_OPTIONS(uint8_t, GPBExtensionOptions) {
- GPBExtensionNone = 0,
- // These map to standard protobuf concepts.
- GPBExtensionRepeated = 1 << 0,
- GPBExtensionPacked = 1 << 1,
- GPBExtensionSetWireFormat = 1 << 2,
-};
-
-// An extension
-typedef struct GPBExtensionDescription {
- GPBGenericValue defaultValue;
- const char *singletonName;
- const char *extendedClass;
- const char *messageOrGroupClassName;
- GPBEnumDescriptorFunc enumDescriptorFunc;
- int32_t fieldNumber;
- GPBDataType dataType;
- GPBExtensionOptions options;
-} GPBExtensionDescription;
-
-typedef NS_OPTIONS(uint32_t, GPBDescriptorInitializationFlags) {
- GPBDescriptorInitializationFlag_None = 0,
- GPBDescriptorInitializationFlag_FieldsWithDefault = 1 << 0,
- GPBDescriptorInitializationFlag_WireFormat = 1 << 1,
-};
-
-@interface GPBDescriptor () {
- @package
- NSArray *fields_;
- NSArray *oneofs_;
- uint32_t storageSize_;
-}
-
-// fieldDescriptions have to be long lived, they are held as raw pointers.
-+ (instancetype)
- allocDescriptorForClass:(Class)messageClass
- rootClass:(Class)rootClass
- file:(GPBFileDescriptor *)file
- fields:(void *)fieldDescriptions
- fieldCount:(uint32_t)fieldCount
- storageSize:(uint32_t)storageSize
- flags:(GPBDescriptorInitializationFlags)flags;
-
-- (instancetype)initWithClass:(Class)messageClass
- file:(GPBFileDescriptor *)file
- fields:(NSArray *)fields
- storageSize:(uint32_t)storage
- wireFormat:(BOOL)wireFormat;
-
-// Called right after init to provide extra information to avoid init having
-// an explosion of args. These pointers are recorded, so they are expected
-// to live for the lifetime of the app.
-- (void)setupOneofs:(const char **)oneofNames
- count:(uint32_t)count
- firstHasIndex:(int32_t)firstHasIndex;
-- (void)setupExtraTextInfo:(const char *)extraTextFormatInfo;
-- (void)setupExtensionRanges:(const GPBExtensionRange *)ranges count:(int32_t)count;
-- (void)setupContainingMessageClassName:(const char *)msgClassName;
-- (void)setupMessageClassNameSuffix:(NSString *)suffix;
-
-@end
-
-@interface GPBFileDescriptor ()
-- (instancetype)initWithPackage:(NSString *)package
- objcPrefix:(NSString *)objcPrefix
- syntax:(GPBFileSyntax)syntax;
-- (instancetype)initWithPackage:(NSString *)package
- syntax:(GPBFileSyntax)syntax;
-@end
-
-@interface GPBOneofDescriptor () {
- @package
- const char *name_;
- NSArray *fields_;
- SEL caseSel_;
-}
-// name must be long lived.
-- (instancetype)initWithName:(const char *)name fields:(NSArray *)fields;
-@end
-
-@interface GPBFieldDescriptor () {
- @package
- GPBMessageFieldDescription *description_;
- GPB_UNSAFE_UNRETAINED GPBOneofDescriptor *containingOneof_;
-
- SEL getSel_;
- SEL setSel_;
- SEL hasOrCountSel_; // *Count for map<>/repeated fields, has* otherwise.
- SEL setHasSel_;
-}
-
-// Single initializer
-// description has to be long lived, it is held as a raw pointer.
-- (instancetype)initWithFieldDescription:(void *)description
- includesDefault:(BOOL)includesDefault
- syntax:(GPBFileSyntax)syntax;
-@end
-
-@interface GPBEnumDescriptor ()
-// valueNames, values and extraTextFormatInfo have to be long lived, they are
-// held as raw pointers.
-+ (instancetype)
- allocDescriptorForName:(NSString *)name
- valueNames:(const char *)valueNames
- values:(const int32_t *)values
- count:(uint32_t)valueCount
- enumVerifier:(GPBEnumValidationFunc)enumVerifier;
-+ (instancetype)
- allocDescriptorForName:(NSString *)name
- valueNames:(const char *)valueNames
- values:(const int32_t *)values
- count:(uint32_t)valueCount
- enumVerifier:(GPBEnumValidationFunc)enumVerifier
- extraTextFormatInfo:(const char *)extraTextFormatInfo;
-
-- (instancetype)initWithName:(NSString *)name
- valueNames:(const char *)valueNames
- values:(const int32_t *)values
- count:(uint32_t)valueCount
- enumVerifier:(GPBEnumValidationFunc)enumVerifier;
-@end
-
-@interface GPBExtensionDescriptor () {
- @package
- GPBExtensionDescription *description_;
-}
-@property(nonatomic, readonly) GPBWireFormat wireType;
-
-// For repeated extensions, alternateWireType is the wireType with the opposite
-// value for the packable property. i.e. - if the extension was marked packed
-// it would be the wire type for unpacked; if the extension was marked unpacked,
-// it would be the wire type for packed.
-@property(nonatomic, readonly) GPBWireFormat alternateWireType;
-
-// description has to be long lived, it is held as a raw pointer.
-- (instancetype)initWithExtensionDescription:
- (GPBExtensionDescription *)description;
-- (NSComparisonResult)compareByFieldNumber:(GPBExtensionDescriptor *)other;
-@end
-
-CF_EXTERN_C_BEGIN
-
-// Direct access is use for speed, to avoid even internally declaring things
-// read/write, etc. The warning is enabled in the project to ensure code calling
-// protos can turn on -Wdirect-ivar-access without issues.
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdirect-ivar-access"
-
-GPB_INLINE BOOL GPBFieldIsMapOrArray(GPBFieldDescriptor *field) {
- return (field->description_->flags &
- (GPBFieldRepeated | GPBFieldMapKeyMask)) != 0;
-}
-
-GPB_INLINE GPBDataType GPBGetFieldDataType(GPBFieldDescriptor *field) {
- return field->description_->dataType;
-}
-
-GPB_INLINE int32_t GPBFieldHasIndex(GPBFieldDescriptor *field) {
- return field->description_->hasIndex;
-}
-
-GPB_INLINE uint32_t GPBFieldNumber(GPBFieldDescriptor *field) {
- return field->description_->number;
-}
-
-#pragma clang diagnostic pop
-
-uint32_t GPBFieldTag(GPBFieldDescriptor *self);
-
-// For repeated fields, alternateWireType is the wireType with the opposite
-// value for the packable property. i.e. - if the field was marked packed it
-// would be the wire type for unpacked; if the field was marked unpacked, it
-// would be the wire type for packed.
-uint32_t GPBFieldAlternateTag(GPBFieldDescriptor *self);
-
-GPB_INLINE BOOL GPBHasPreservingUnknownEnumSemantics(GPBFileSyntax syntax) {
- return syntax == GPBFileSyntaxProto3;
-}
-
-GPB_INLINE BOOL GPBExtensionIsRepeated(GPBExtensionDescription *description) {
- return (description->options & GPBExtensionRepeated) != 0;
-}
-
-GPB_INLINE BOOL GPBExtensionIsPacked(GPBExtensionDescription *description) {
- return (description->options & GPBExtensionPacked) != 0;
-}
-
-GPB_INLINE BOOL GPBExtensionIsWireFormat(GPBExtensionDescription *description) {
- return (description->options & GPBExtensionSetWireFormat) != 0;
-}
-
-// Helper for compile time assets.
-#ifndef GPBInternalCompileAssert
- #if __has_feature(c_static_assert) || __has_extension(c_static_assert)
- #define GPBInternalCompileAssert(test, msg) _Static_assert((test), #msg)
- #else
- // Pre-Xcode 7 support.
- #define GPBInternalCompileAssertSymbolInner(line, msg) GPBInternalCompileAssert ## line ## __ ## msg
- #define GPBInternalCompileAssertSymbol(line, msg) GPBInternalCompileAssertSymbolInner(line, msg)
- #define GPBInternalCompileAssert(test, msg) \
- typedef char GPBInternalCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ]
- #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert)
-#endif // GPBInternalCompileAssert
-
-// Sanity check that there isn't padding between the field description
-// structures with and without a default.
-GPBInternalCompileAssert(sizeof(GPBMessageFieldDescriptionWithDefault) ==
- (sizeof(GPBGenericValue) +
- sizeof(GPBMessageFieldDescription)),
- DescriptionsWithDefault_different_size_than_expected);
-
-CF_EXTERN_C_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDictionary.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDictionary.h
deleted file mode 100644
index a81165e81..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDictionary.h
+++ /dev/null
@@ -1,5770 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBRuntimeTypes.h"
-
-// Note on naming: for the classes holding numeric values, a more natural
-// naming of the method might be things like "-valueForKey:",
-// "-setValue:forKey:"; etc. But those selectors are also defined by Key Value
-// Coding (KVC) as categories on NSObject. So "overloading" the selectors with
-// other meanings can cause warnings (based on compiler settings), but more
-// importantly, some of those selector get called as KVC breaks up keypaths.
-// So if those selectors are used, using KVC will compile cleanly, but could
-// crash as it invokes those selectors with the wrong types of arguments.
-
-NS_ASSUME_NONNULL_BEGIN
-
-//%PDDM-EXPAND DECLARE_DICTIONARIES()
-// This block of code is generated, do not edit it directly.
-
-#pragma mark - UInt32 -> UInt32
-
-/**
- * Class used for map fields of <uint32_t, uint32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32UInt32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32UInt32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt32sUsingBlock:
- (void (^)(uint32_t key, uint32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt32UInt32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt32:(uint32_t)value forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt32ForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt32 -> Int32
-
-/**
- * Class used for map fields of <uint32_t, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32Int32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt32s:(const int32_t [__nullable])values
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32Int32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt32sUsingBlock:
- (void (^)(uint32_t key, int32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt32Int32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt32:(int32_t)value forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt32ForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt32 -> UInt64
-
-/**
- * Class used for map fields of <uint32_t, uint64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32UInt64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32UInt64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt64sUsingBlock:
- (void (^)(uint32_t key, uint64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt32UInt64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt64:(uint64_t)value forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt64ForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt32 -> Int64
-
-/**
- * Class used for map fields of <uint32_t, int64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32Int64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt64s:(const int64_t [__nullable])values
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32Int64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt64sUsingBlock:
- (void (^)(uint32_t key, int64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt32Int64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt64:(int64_t)value forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt64ForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt32 -> Bool
-
-/**
- * Class used for map fields of <uint32_t, BOOL>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32BoolDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithBools:(const BOOL [__nullable])values
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32BoolDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getBool:(nullable BOOL *)value forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndBoolsUsingBlock:
- (void (^)(uint32_t key, BOOL value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt32BoolDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setBool:(BOOL)value forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeBoolForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt32 -> Float
-
-/**
- * Class used for map fields of <uint32_t, float>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32FloatDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithFloats:(const float [__nullable])values
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32FloatDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getFloat:(nullable float *)value forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndFloatsUsingBlock:
- (void (^)(uint32_t key, float value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt32FloatDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setFloat:(float)value forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeFloatForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt32 -> Double
-
-/**
- * Class used for map fields of <uint32_t, double>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32DoubleDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithDoubles:(const double [__nullable])values
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32DoubleDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getDouble:(nullable double *)value forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndDoublesUsingBlock:
- (void (^)(uint32_t key, double value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt32DoubleDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setDouble:(double)value forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeDoubleForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt32 -> Enum
-
-/**
- * Class used for map fields of <uint32_t, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32EnumDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-/** The validation function to check if the enums are valid. */
-@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-
-/**
- * Initializes a dictionary with the given validation function.
- *
- * @param func The enum validation function for the dictionary.
- *
- * @return A newly initialized dictionary.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-
-/**
- * Initializes a dictionary with the entries given.
- *
- * @param func The enum validation function for the dictionary.
- * @param values The raw enum values values to be placed in the dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of entries to store in the dictionary.
- *
- * @return A newly initialized dictionary with the keys and values in it.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- rawValues:(const int32_t [__nullable])values
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes a dictionary with the entries from the given.
- * dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to the dictionary.
- *
- * @return A newly initialized dictionary with the entries from the given
- * dictionary in it.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32EnumDictionary *)dictionary;
-
-/**
- * Initializes a dictionary with the given capacity.
- *
- * @param func The enum validation function for the dictionary.
- * @param numItems Capacity needed for the dictionary.
- *
- * @return A newly initialized dictionary with the given capacity.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- capacity:(NSUInteger)numItems;
-
-// These will return kGPBUnrecognizedEnumeratorValue if the value for the key
-// is not a valid enumerator as defined by validationFunc. If the actual value is
-// desired, use "raw" version of the method.
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getEnum:(nullable int32_t *)value forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndEnumsUsingBlock:
- (void (^)(uint32_t key, int32_t value, BOOL *stop))block;
-
-/**
- * Gets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **rawValue**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndRawValuesUsingBlock:
- (void (^)(uint32_t key, int32_t rawValue, BOOL *stop))block;
-
-/**
- * Adds the keys and raw enum values from another dictionary.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addRawEntriesFromDictionary:(GPBUInt32EnumDictionary *)otherDictionary;
-
-// If value is not a valid enumerator as defined by validationFunc, these
-// methods will assert in debug, and will log in release and assign the value
-// to the default value. Use the rawValue methods below to assign non enumerator
-// values.
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setEnum:(int32_t)value forKey:(uint32_t)key;
-
-/**
- * Sets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue The raw enum value to set.
- * @param key The key under which to store the raw enum value.
- **/
-- (void)setRawValue:(int32_t)rawValue forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeEnumForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt32 -> Object
-
-/**
- * Class used for map fields of <uint32_t, ObjectType>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt32ObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param objects The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
- forKeys:(const uint32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt32ObjectDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Fetches the object stored under the given key.
- *
- * @param key Key under which the value is stored, if present.
- *
- * @return The object if found, nil otherwise.
- **/
-- (ObjectType)objectForKey:(uint32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **object**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndObjectsUsingBlock:
- (void (^)(uint32_t key, ObjectType object, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt32ObjectDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param object The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setObject:(ObjectType)object forKey:(uint32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeObjectForKey:(uint32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> UInt32
-
-/**
- * Class used for map fields of <int32_t, uint32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32UInt32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt32UInt32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt32sUsingBlock:
- (void (^)(int32_t key, uint32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt32UInt32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt32:(uint32_t)value forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt32ForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> Int32
-
-/**
- * Class used for map fields of <int32_t, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32Int32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt32s:(const int32_t [__nullable])values
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt32Int32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt32:(nullable int32_t *)value forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt32sUsingBlock:
- (void (^)(int32_t key, int32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt32Int32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt32:(int32_t)value forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt32ForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> UInt64
-
-/**
- * Class used for map fields of <int32_t, uint64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32UInt64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt32UInt64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt64sUsingBlock:
- (void (^)(int32_t key, uint64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt32UInt64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt64:(uint64_t)value forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt64ForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> Int64
-
-/**
- * Class used for map fields of <int32_t, int64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32Int64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt64s:(const int64_t [__nullable])values
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt32Int64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt64:(nullable int64_t *)value forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt64sUsingBlock:
- (void (^)(int32_t key, int64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt32Int64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt64:(int64_t)value forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt64ForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> Bool
-
-/**
- * Class used for map fields of <int32_t, BOOL>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32BoolDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithBools:(const BOOL [__nullable])values
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt32BoolDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getBool:(nullable BOOL *)value forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndBoolsUsingBlock:
- (void (^)(int32_t key, BOOL value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt32BoolDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setBool:(BOOL)value forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeBoolForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> Float
-
-/**
- * Class used for map fields of <int32_t, float>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32FloatDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithFloats:(const float [__nullable])values
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt32FloatDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getFloat:(nullable float *)value forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndFloatsUsingBlock:
- (void (^)(int32_t key, float value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt32FloatDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setFloat:(float)value forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeFloatForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> Double
-
-/**
- * Class used for map fields of <int32_t, double>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32DoubleDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithDoubles:(const double [__nullable])values
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt32DoubleDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getDouble:(nullable double *)value forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndDoublesUsingBlock:
- (void (^)(int32_t key, double value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt32DoubleDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setDouble:(double)value forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeDoubleForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> Enum
-
-/**
- * Class used for map fields of <int32_t, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32EnumDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-/** The validation function to check if the enums are valid. */
-@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-
-/**
- * Initializes a dictionary with the given validation function.
- *
- * @param func The enum validation function for the dictionary.
- *
- * @return A newly initialized dictionary.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-
-/**
- * Initializes a dictionary with the entries given.
- *
- * @param func The enum validation function for the dictionary.
- * @param values The raw enum values values to be placed in the dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of entries to store in the dictionary.
- *
- * @return A newly initialized dictionary with the keys and values in it.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- rawValues:(const int32_t [__nullable])values
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes a dictionary with the entries from the given.
- * dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to the dictionary.
- *
- * @return A newly initialized dictionary with the entries from the given
- * dictionary in it.
- **/
-- (instancetype)initWithDictionary:(GPBInt32EnumDictionary *)dictionary;
-
-/**
- * Initializes a dictionary with the given capacity.
- *
- * @param func The enum validation function for the dictionary.
- * @param numItems Capacity needed for the dictionary.
- *
- * @return A newly initialized dictionary with the given capacity.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- capacity:(NSUInteger)numItems;
-
-// These will return kGPBUnrecognizedEnumeratorValue if the value for the key
-// is not a valid enumerator as defined by validationFunc. If the actual value is
-// desired, use "raw" version of the method.
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getEnum:(nullable int32_t *)value forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndEnumsUsingBlock:
- (void (^)(int32_t key, int32_t value, BOOL *stop))block;
-
-/**
- * Gets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **rawValue**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndRawValuesUsingBlock:
- (void (^)(int32_t key, int32_t rawValue, BOOL *stop))block;
-
-/**
- * Adds the keys and raw enum values from another dictionary.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addRawEntriesFromDictionary:(GPBInt32EnumDictionary *)otherDictionary;
-
-// If value is not a valid enumerator as defined by validationFunc, these
-// methods will assert in debug, and will log in release and assign the value
-// to the default value. Use the rawValue methods below to assign non enumerator
-// values.
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setEnum:(int32_t)value forKey:(int32_t)key;
-
-/**
- * Sets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue The raw enum value to set.
- * @param key The key under which to store the raw enum value.
- **/
-- (void)setRawValue:(int32_t)rawValue forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeEnumForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int32 -> Object
-
-/**
- * Class used for map fields of <int32_t, ObjectType>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt32ObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param objects The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
- forKeys:(const int32_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt32ObjectDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Fetches the object stored under the given key.
- *
- * @param key Key under which the value is stored, if present.
- *
- * @return The object if found, nil otherwise.
- **/
-- (ObjectType)objectForKey:(int32_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **object**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndObjectsUsingBlock:
- (void (^)(int32_t key, ObjectType object, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt32ObjectDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param object The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setObject:(ObjectType)object forKey:(int32_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeObjectForKey:(int32_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> UInt32
-
-/**
- * Class used for map fields of <uint64_t, uint32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64UInt32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64UInt32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt32sUsingBlock:
- (void (^)(uint64_t key, uint32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt64UInt32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt32:(uint32_t)value forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt32ForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> Int32
-
-/**
- * Class used for map fields of <uint64_t, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64Int32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt32s:(const int32_t [__nullable])values
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64Int32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt32:(nullable int32_t *)value forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt32sUsingBlock:
- (void (^)(uint64_t key, int32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt64Int32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt32:(int32_t)value forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt32ForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> UInt64
-
-/**
- * Class used for map fields of <uint64_t, uint64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64UInt64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64UInt64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt64sUsingBlock:
- (void (^)(uint64_t key, uint64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt64UInt64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt64:(uint64_t)value forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt64ForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> Int64
-
-/**
- * Class used for map fields of <uint64_t, int64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64Int64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt64s:(const int64_t [__nullable])values
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64Int64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt64:(nullable int64_t *)value forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt64sUsingBlock:
- (void (^)(uint64_t key, int64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt64Int64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt64:(int64_t)value forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt64ForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> Bool
-
-/**
- * Class used for map fields of <uint64_t, BOOL>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64BoolDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithBools:(const BOOL [__nullable])values
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64BoolDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getBool:(nullable BOOL *)value forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndBoolsUsingBlock:
- (void (^)(uint64_t key, BOOL value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt64BoolDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setBool:(BOOL)value forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeBoolForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> Float
-
-/**
- * Class used for map fields of <uint64_t, float>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64FloatDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithFloats:(const float [__nullable])values
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64FloatDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getFloat:(nullable float *)value forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndFloatsUsingBlock:
- (void (^)(uint64_t key, float value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt64FloatDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setFloat:(float)value forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeFloatForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> Double
-
-/**
- * Class used for map fields of <uint64_t, double>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64DoubleDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithDoubles:(const double [__nullable])values
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64DoubleDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getDouble:(nullable double *)value forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndDoublesUsingBlock:
- (void (^)(uint64_t key, double value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt64DoubleDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setDouble:(double)value forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeDoubleForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> Enum
-
-/**
- * Class used for map fields of <uint64_t, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64EnumDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-/** The validation function to check if the enums are valid. */
-@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-
-/**
- * Initializes a dictionary with the given validation function.
- *
- * @param func The enum validation function for the dictionary.
- *
- * @return A newly initialized dictionary.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-
-/**
- * Initializes a dictionary with the entries given.
- *
- * @param func The enum validation function for the dictionary.
- * @param values The raw enum values values to be placed in the dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of entries to store in the dictionary.
- *
- * @return A newly initialized dictionary with the keys and values in it.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- rawValues:(const int32_t [__nullable])values
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes a dictionary with the entries from the given.
- * dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to the dictionary.
- *
- * @return A newly initialized dictionary with the entries from the given
- * dictionary in it.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64EnumDictionary *)dictionary;
-
-/**
- * Initializes a dictionary with the given capacity.
- *
- * @param func The enum validation function for the dictionary.
- * @param numItems Capacity needed for the dictionary.
- *
- * @return A newly initialized dictionary with the given capacity.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- capacity:(NSUInteger)numItems;
-
-// These will return kGPBUnrecognizedEnumeratorValue if the value for the key
-// is not a valid enumerator as defined by validationFunc. If the actual value is
-// desired, use "raw" version of the method.
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getEnum:(nullable int32_t *)value forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndEnumsUsingBlock:
- (void (^)(uint64_t key, int32_t value, BOOL *stop))block;
-
-/**
- * Gets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **rawValue**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndRawValuesUsingBlock:
- (void (^)(uint64_t key, int32_t rawValue, BOOL *stop))block;
-
-/**
- * Adds the keys and raw enum values from another dictionary.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addRawEntriesFromDictionary:(GPBUInt64EnumDictionary *)otherDictionary;
-
-// If value is not a valid enumerator as defined by validationFunc, these
-// methods will assert in debug, and will log in release and assign the value
-// to the default value. Use the rawValue methods below to assign non enumerator
-// values.
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setEnum:(int32_t)value forKey:(uint64_t)key;
-
-/**
- * Sets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue The raw enum value to set.
- * @param key The key under which to store the raw enum value.
- **/
-- (void)setRawValue:(int32_t)rawValue forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeEnumForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - UInt64 -> Object
-
-/**
- * Class used for map fields of <uint64_t, ObjectType>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBUInt64ObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param objects The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
- forKeys:(const uint64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBUInt64ObjectDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Fetches the object stored under the given key.
- *
- * @param key Key under which the value is stored, if present.
- *
- * @return The object if found, nil otherwise.
- **/
-- (ObjectType)objectForKey:(uint64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **object**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndObjectsUsingBlock:
- (void (^)(uint64_t key, ObjectType object, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBUInt64ObjectDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param object The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setObject:(ObjectType)object forKey:(uint64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeObjectForKey:(uint64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> UInt32
-
-/**
- * Class used for map fields of <int64_t, uint32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64UInt32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt64UInt32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt32sUsingBlock:
- (void (^)(int64_t key, uint32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt64UInt32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt32:(uint32_t)value forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt32ForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> Int32
-
-/**
- * Class used for map fields of <int64_t, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64Int32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt32s:(const int32_t [__nullable])values
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt64Int32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt32:(nullable int32_t *)value forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt32sUsingBlock:
- (void (^)(int64_t key, int32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt64Int32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt32:(int32_t)value forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt32ForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> UInt64
-
-/**
- * Class used for map fields of <int64_t, uint64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64UInt64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt64UInt64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt64sUsingBlock:
- (void (^)(int64_t key, uint64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt64UInt64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt64:(uint64_t)value forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt64ForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> Int64
-
-/**
- * Class used for map fields of <int64_t, int64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64Int64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt64s:(const int64_t [__nullable])values
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt64Int64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt64:(nullable int64_t *)value forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt64sUsingBlock:
- (void (^)(int64_t key, int64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt64Int64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt64:(int64_t)value forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt64ForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> Bool
-
-/**
- * Class used for map fields of <int64_t, BOOL>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64BoolDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithBools:(const BOOL [__nullable])values
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt64BoolDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getBool:(nullable BOOL *)value forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndBoolsUsingBlock:
- (void (^)(int64_t key, BOOL value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt64BoolDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setBool:(BOOL)value forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeBoolForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> Float
-
-/**
- * Class used for map fields of <int64_t, float>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64FloatDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithFloats:(const float [__nullable])values
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt64FloatDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getFloat:(nullable float *)value forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndFloatsUsingBlock:
- (void (^)(int64_t key, float value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt64FloatDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setFloat:(float)value forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeFloatForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> Double
-
-/**
- * Class used for map fields of <int64_t, double>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64DoubleDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithDoubles:(const double [__nullable])values
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt64DoubleDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getDouble:(nullable double *)value forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndDoublesUsingBlock:
- (void (^)(int64_t key, double value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt64DoubleDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setDouble:(double)value forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeDoubleForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> Enum
-
-/**
- * Class used for map fields of <int64_t, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64EnumDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-/** The validation function to check if the enums are valid. */
-@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-
-/**
- * Initializes a dictionary with the given validation function.
- *
- * @param func The enum validation function for the dictionary.
- *
- * @return A newly initialized dictionary.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-
-/**
- * Initializes a dictionary with the entries given.
- *
- * @param func The enum validation function for the dictionary.
- * @param values The raw enum values values to be placed in the dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of entries to store in the dictionary.
- *
- * @return A newly initialized dictionary with the keys and values in it.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- rawValues:(const int32_t [__nullable])values
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes a dictionary with the entries from the given.
- * dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to the dictionary.
- *
- * @return A newly initialized dictionary with the entries from the given
- * dictionary in it.
- **/
-- (instancetype)initWithDictionary:(GPBInt64EnumDictionary *)dictionary;
-
-/**
- * Initializes a dictionary with the given capacity.
- *
- * @param func The enum validation function for the dictionary.
- * @param numItems Capacity needed for the dictionary.
- *
- * @return A newly initialized dictionary with the given capacity.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- capacity:(NSUInteger)numItems;
-
-// These will return kGPBUnrecognizedEnumeratorValue if the value for the key
-// is not a valid enumerator as defined by validationFunc. If the actual value is
-// desired, use "raw" version of the method.
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getEnum:(nullable int32_t *)value forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndEnumsUsingBlock:
- (void (^)(int64_t key, int32_t value, BOOL *stop))block;
-
-/**
- * Gets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **rawValue**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndRawValuesUsingBlock:
- (void (^)(int64_t key, int32_t rawValue, BOOL *stop))block;
-
-/**
- * Adds the keys and raw enum values from another dictionary.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addRawEntriesFromDictionary:(GPBInt64EnumDictionary *)otherDictionary;
-
-// If value is not a valid enumerator as defined by validationFunc, these
-// methods will assert in debug, and will log in release and assign the value
-// to the default value. Use the rawValue methods below to assign non enumerator
-// values.
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setEnum:(int32_t)value forKey:(int64_t)key;
-
-/**
- * Sets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue The raw enum value to set.
- * @param key The key under which to store the raw enum value.
- **/
-- (void)setRawValue:(int32_t)rawValue forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeEnumForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Int64 -> Object
-
-/**
- * Class used for map fields of <int64_t, ObjectType>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBInt64ObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param objects The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
- forKeys:(const int64_t [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBInt64ObjectDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Fetches the object stored under the given key.
- *
- * @param key Key under which the value is stored, if present.
- *
- * @return The object if found, nil otherwise.
- **/
-- (ObjectType)objectForKey:(int64_t)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **object**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndObjectsUsingBlock:
- (void (^)(int64_t key, ObjectType object, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBInt64ObjectDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param object The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setObject:(ObjectType)object forKey:(int64_t)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeObjectForKey:(int64_t)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> UInt32
-
-/**
- * Class used for map fields of <BOOL, uint32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolUInt32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBBoolUInt32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt32sUsingBlock:
- (void (^)(BOOL key, uint32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBBoolUInt32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt32:(uint32_t)value forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt32ForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> Int32
-
-/**
- * Class used for map fields of <BOOL, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolInt32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt32s:(const int32_t [__nullable])values
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBBoolInt32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt32:(nullable int32_t *)value forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt32sUsingBlock:
- (void (^)(BOOL key, int32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBBoolInt32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt32:(int32_t)value forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt32ForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> UInt64
-
-/**
- * Class used for map fields of <BOOL, uint64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolUInt64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBBoolUInt64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt64sUsingBlock:
- (void (^)(BOOL key, uint64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBBoolUInt64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt64:(uint64_t)value forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt64ForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> Int64
-
-/**
- * Class used for map fields of <BOOL, int64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolInt64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt64s:(const int64_t [__nullable])values
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBBoolInt64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt64:(nullable int64_t *)value forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt64sUsingBlock:
- (void (^)(BOOL key, int64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBBoolInt64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt64:(int64_t)value forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt64ForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> Bool
-
-/**
- * Class used for map fields of <BOOL, BOOL>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolBoolDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithBools:(const BOOL [__nullable])values
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBBoolBoolDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getBool:(nullable BOOL *)value forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndBoolsUsingBlock:
- (void (^)(BOOL key, BOOL value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBBoolBoolDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setBool:(BOOL)value forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeBoolForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> Float
-
-/**
- * Class used for map fields of <BOOL, float>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolFloatDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithFloats:(const float [__nullable])values
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBBoolFloatDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getFloat:(nullable float *)value forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndFloatsUsingBlock:
- (void (^)(BOOL key, float value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBBoolFloatDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setFloat:(float)value forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeFloatForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> Double
-
-/**
- * Class used for map fields of <BOOL, double>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolDoubleDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithDoubles:(const double [__nullable])values
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBBoolDoubleDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getDouble:(nullable double *)value forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndDoublesUsingBlock:
- (void (^)(BOOL key, double value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBBoolDoubleDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setDouble:(double)value forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeDoubleForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> Enum
-
-/**
- * Class used for map fields of <BOOL, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolEnumDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-/** The validation function to check if the enums are valid. */
-@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-
-/**
- * Initializes a dictionary with the given validation function.
- *
- * @param func The enum validation function for the dictionary.
- *
- * @return A newly initialized dictionary.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-
-/**
- * Initializes a dictionary with the entries given.
- *
- * @param func The enum validation function for the dictionary.
- * @param values The raw enum values values to be placed in the dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of entries to store in the dictionary.
- *
- * @return A newly initialized dictionary with the keys and values in it.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- rawValues:(const int32_t [__nullable])values
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes a dictionary with the entries from the given.
- * dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to the dictionary.
- *
- * @return A newly initialized dictionary with the entries from the given
- * dictionary in it.
- **/
-- (instancetype)initWithDictionary:(GPBBoolEnumDictionary *)dictionary;
-
-/**
- * Initializes a dictionary with the given capacity.
- *
- * @param func The enum validation function for the dictionary.
- * @param numItems Capacity needed for the dictionary.
- *
- * @return A newly initialized dictionary with the given capacity.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- capacity:(NSUInteger)numItems;
-
-// These will return kGPBUnrecognizedEnumeratorValue if the value for the key
-// is not a valid enumerator as defined by validationFunc. If the actual value is
-// desired, use "raw" version of the method.
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getEnum:(nullable int32_t *)value forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndEnumsUsingBlock:
- (void (^)(BOOL key, int32_t value, BOOL *stop))block;
-
-/**
- * Gets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **rawValue**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndRawValuesUsingBlock:
- (void (^)(BOOL key, int32_t rawValue, BOOL *stop))block;
-
-/**
- * Adds the keys and raw enum values from another dictionary.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addRawEntriesFromDictionary:(GPBBoolEnumDictionary *)otherDictionary;
-
-// If value is not a valid enumerator as defined by validationFunc, these
-// methods will assert in debug, and will log in release and assign the value
-// to the default value. Use the rawValue methods below to assign non enumerator
-// values.
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setEnum:(int32_t)value forKey:(BOOL)key;
-
-/**
- * Sets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue The raw enum value to set.
- * @param key The key under which to store the raw enum value.
- **/
-- (void)setRawValue:(int32_t)rawValue forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeEnumForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - Bool -> Object
-
-/**
- * Class used for map fields of <BOOL, ObjectType>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBBoolObjectDictionary<__covariant ObjectType> : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param objects The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithObjects:(const ObjectType __nonnull GPB_UNSAFE_UNRETAINED [__nullable])objects
- forKeys:(const BOOL [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBBoolObjectDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Fetches the object stored under the given key.
- *
- * @param key Key under which the value is stored, if present.
- *
- * @return The object if found, nil otherwise.
- **/
-- (ObjectType)objectForKey:(BOOL)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **object**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndObjectsUsingBlock:
- (void (^)(BOOL key, ObjectType object, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBBoolObjectDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param object The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setObject:(ObjectType)object forKey:(BOOL)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeObjectForKey:(BOOL)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - String -> UInt32
-
-/**
- * Class used for map fields of <NSString, uint32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBStringUInt32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt32s:(const uint32_t [__nullable])values
- forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBStringUInt32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt32:(nullable uint32_t *)value forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt32sUsingBlock:
- (void (^)(NSString *key, uint32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBStringUInt32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt32:(uint32_t)value forKey:(NSString *)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt32ForKey:(NSString *)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - String -> Int32
-
-/**
- * Class used for map fields of <NSString, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBStringInt32Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt32s:(const int32_t [__nullable])values
- forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBStringInt32Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt32:(nullable int32_t *)value forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt32sUsingBlock:
- (void (^)(NSString *key, int32_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBStringInt32Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt32:(int32_t)value forKey:(NSString *)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt32ForKey:(NSString *)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - String -> UInt64
-
-/**
- * Class used for map fields of <NSString, uint64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBStringUInt64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithUInt64s:(const uint64_t [__nullable])values
- forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBStringUInt64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getUInt64:(nullable uint64_t *)value forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndUInt64sUsingBlock:
- (void (^)(NSString *key, uint64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBStringUInt64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setUInt64:(uint64_t)value forKey:(NSString *)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeUInt64ForKey:(NSString *)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - String -> Int64
-
-/**
- * Class used for map fields of <NSString, int64_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBStringInt64Dictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithInt64s:(const int64_t [__nullable])values
- forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBStringInt64Dictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getInt64:(nullable int64_t *)value forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndInt64sUsingBlock:
- (void (^)(NSString *key, int64_t value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBStringInt64Dictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setInt64:(int64_t)value forKey:(NSString *)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeInt64ForKey:(NSString *)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - String -> Bool
-
-/**
- * Class used for map fields of <NSString, BOOL>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBStringBoolDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithBools:(const BOOL [__nullable])values
- forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBStringBoolDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getBool:(nullable BOOL *)value forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndBoolsUsingBlock:
- (void (^)(NSString *key, BOOL value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBStringBoolDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setBool:(BOOL)value forKey:(NSString *)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeBoolForKey:(NSString *)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - String -> Float
-
-/**
- * Class used for map fields of <NSString, float>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBStringFloatDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithFloats:(const float [__nullable])values
- forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBStringFloatDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getFloat:(nullable float *)value forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndFloatsUsingBlock:
- (void (^)(NSString *key, float value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBStringFloatDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setFloat:(float)value forKey:(NSString *)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeFloatForKey:(NSString *)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - String -> Double
-
-/**
- * Class used for map fields of <NSString, double>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBStringDoubleDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-
-/**
- * Initializes this dictionary, copying the given values and keys.
- *
- * @param values The values to be placed in this dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of elements to copy into the dictionary.
- *
- * @return A newly initialized dictionary with a copy of the values and keys.
- **/
-- (instancetype)initWithDoubles:(const double [__nullable])values
- forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes this dictionary, copying the entries from the given dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to this dictionary.
- *
- * @return A newly initialized dictionary with the entries of the given dictionary.
- **/
-- (instancetype)initWithDictionary:(GPBStringDoubleDictionary *)dictionary;
-
-/**
- * Initializes this dictionary with the requested capacity.
- *
- * @param numItems Number of items needed for this dictionary.
- *
- * @return A newly initialized dictionary with the requested capacity.
- **/
-- (instancetype)initWithCapacity:(NSUInteger)numItems;
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getDouble:(nullable double *)value forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndDoublesUsingBlock:
- (void (^)(NSString *key, double value, BOOL *stop))block;
-
-/**
- * Adds the keys and values from another dictionary.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addEntriesFromDictionary:(GPBStringDoubleDictionary *)otherDictionary;
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setDouble:(double)value forKey:(NSString *)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeDoubleForKey:(NSString *)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-#pragma mark - String -> Enum
-
-/**
- * Class used for map fields of <NSString, int32_t>
- * values. This performs better than boxing into NSNumbers in NSDictionaries.
- *
- * @note This class is not meant to be subclassed.
- **/
-@interface GPBStringEnumDictionary : NSObject <NSCopying>
-
-/** Number of entries stored in this dictionary. */
-@property(nonatomic, readonly) NSUInteger count;
-/** The validation function to check if the enums are valid. */
-@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-
-/**
- * Initializes a dictionary with the given validation function.
- *
- * @param func The enum validation function for the dictionary.
- *
- * @return A newly initialized dictionary.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-
-/**
- * Initializes a dictionary with the entries given.
- *
- * @param func The enum validation function for the dictionary.
- * @param values The raw enum values values to be placed in the dictionary.
- * @param keys The keys under which to store the values.
- * @param count The number of entries to store in the dictionary.
- *
- * @return A newly initialized dictionary with the keys and values in it.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- rawValues:(const int32_t [__nullable])values
- forKeys:(const NSString * __nonnull GPB_UNSAFE_UNRETAINED [__nullable])keys
- count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-
-/**
- * Initializes a dictionary with the entries from the given.
- * dictionary.
- *
- * @param dictionary Dictionary containing the entries to add to the dictionary.
- *
- * @return A newly initialized dictionary with the entries from the given
- * dictionary in it.
- **/
-- (instancetype)initWithDictionary:(GPBStringEnumDictionary *)dictionary;
-
-/**
- * Initializes a dictionary with the given capacity.
- *
- * @param func The enum validation function for the dictionary.
- * @param numItems Capacity needed for the dictionary.
- *
- * @return A newly initialized dictionary with the given capacity.
- **/
-- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
- capacity:(NSUInteger)numItems;
-
-// These will return kGPBUnrecognizedEnumeratorValue if the value for the key
-// is not a valid enumerator as defined by validationFunc. If the actual value is
-// desired, use "raw" version of the method.
-
-/**
- * Gets the value for the given key.
- *
- * @param value Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getEnum:(nullable int32_t *)value forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **value**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndEnumsUsingBlock:
- (void (^)(NSString *key, int32_t value, BOOL *stop))block;
-
-/**
- * Gets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue Pointer into which the value will be set, if found.
- * @param key Key under which the value is stored, if present.
- *
- * @return YES if the key was found and the value was copied, NO otherwise.
- **/
-- (BOOL)getRawValue:(nullable int32_t *)rawValue forKey:(NSString *)key;
-
-/**
- * Enumerates the keys and values on this dictionary with the given block.
- *
- * @note This method bypass the validationFunc to enable the access of values that
- * were not known at the time the binary was compiled.
- *
- * @param block The block to enumerate with.
- * **key**: The key for the current entry.
- * **rawValue**: The value for the current entry
- * **stop**: A pointer to a boolean that when set stops the enumeration.
- **/
-- (void)enumerateKeysAndRawValuesUsingBlock:
- (void (^)(NSString *key, int32_t rawValue, BOOL *stop))block;
-
-/**
- * Adds the keys and raw enum values from another dictionary.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param otherDictionary Dictionary containing entries to be added to this
- * dictionary.
- **/
-- (void)addRawEntriesFromDictionary:(GPBStringEnumDictionary *)otherDictionary;
-
-// If value is not a valid enumerator as defined by validationFunc, these
-// methods will assert in debug, and will log in release and assign the value
-// to the default value. Use the rawValue methods below to assign non enumerator
-// values.
-
-/**
- * Sets the value for the given key.
- *
- * @param value The value to set.
- * @param key The key under which to store the value.
- **/
-- (void)setEnum:(int32_t)value forKey:(NSString *)key;
-
-/**
- * Sets the raw enum value for the given key.
- *
- * @note This method bypass the validationFunc to enable the setting of values that
- * were not known at the time the binary was compiled.
- *
- * @param rawValue The raw enum value to set.
- * @param key The key under which to store the raw enum value.
- **/
-- (void)setRawValue:(int32_t)rawValue forKey:(NSString *)key;
-
-/**
- * Removes the entry for the given key.
- *
- * @param aKey Key to be removed from this dictionary.
- **/
-- (void)removeEnumForKey:(NSString *)aKey;
-
-/**
- * Removes all entries in this dictionary.
- **/
-- (void)removeAll;
-
-@end
-
-//%PDDM-EXPAND-END DECLARE_DICTIONARIES()
-
-NS_ASSUME_NONNULL_END
-
-//%PDDM-DEFINE DECLARE_DICTIONARIES()
-//%DICTIONARY_INTERFACES_FOR_POD_KEY(UInt32, uint32_t)
-//%DICTIONARY_INTERFACES_FOR_POD_KEY(Int32, int32_t)
-//%DICTIONARY_INTERFACES_FOR_POD_KEY(UInt64, uint64_t)
-//%DICTIONARY_INTERFACES_FOR_POD_KEY(Int64, int64_t)
-//%DICTIONARY_INTERFACES_FOR_POD_KEY(Bool, BOOL)
-//%DICTIONARY_POD_INTERFACES_FOR_KEY(String, NSString, *, OBJECT)
-//%PDDM-DEFINE DICTIONARY_INTERFACES_FOR_POD_KEY(KEY_NAME, KEY_TYPE)
-//%DICTIONARY_POD_INTERFACES_FOR_KEY(KEY_NAME, KEY_TYPE, , POD)
-//%DICTIONARY_POD_KEY_TO_OBJECT_INTERFACE(KEY_NAME, KEY_TYPE, Object, ObjectType)
-//%PDDM-DEFINE DICTIONARY_POD_INTERFACES_FOR_KEY(KEY_NAME, KEY_TYPE, KisP, KHELPER)
-//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, UInt32, uint32_t)
-//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Int32, int32_t)
-//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, UInt64, uint64_t)
-//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Int64, int64_t)
-//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Bool, BOOL)
-//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Float, float)
-//%DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Double, double)
-//%DICTIONARY_KEY_TO_ENUM_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, Enum, int32_t)
-//%PDDM-DEFINE DICTIONARY_KEY_TO_POD_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE)
-//%DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, POD, VALUE_NAME, value)
-//%PDDM-DEFINE DICTIONARY_POD_KEY_TO_OBJECT_INTERFACE(KEY_NAME, KEY_TYPE, VALUE_NAME, VALUE_TYPE)
-//%DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, , POD, VALUE_NAME, VALUE_TYPE, OBJECT, Object, object)
-//%PDDM-DEFINE VALUE_FOR_KEY_POD(KEY_TYPE, VALUE_TYPE, VNAME)
-//%/**
-//% * Gets the value for the given key.
-//% *
-//% * @param value Pointer into which the value will be set, if found.
-//% * @param key Key under which the value is stored, if present.
-//% *
-//% * @return YES if the key was found and the value was copied, NO otherwise.
-//% **/
-//%- (BOOL)get##VNAME##:(nullable VALUE_TYPE *)value forKey:(KEY_TYPE)key;
-//%PDDM-DEFINE VALUE_FOR_KEY_OBJECT(KEY_TYPE, VALUE_TYPE, VNAME)
-//%/**
-//% * Fetches the object stored under the given key.
-//% *
-//% * @param key Key under which the value is stored, if present.
-//% *
-//% * @return The object if found, nil otherwise.
-//% **/
-//%- (VALUE_TYPE)objectForKey:(KEY_TYPE)key;
-//%PDDM-DEFINE VALUE_FOR_KEY_Enum(KEY_TYPE, VALUE_TYPE, VNAME)
-//%VALUE_FOR_KEY_POD(KEY_TYPE, VALUE_TYPE, VNAME)
-//%PDDM-DEFINE ARRAY_ARG_MODIFIERPOD()
-// Nothing
-//%PDDM-DEFINE ARRAY_ARG_MODIFIEREnum()
-// Nothing
-//%PDDM-DEFINE ARRAY_ARG_MODIFIEROBJECT()
-//%__nonnull GPB_UNSAFE_UNRETAINED ##
-//%PDDM-DEFINE DICTIONARY_CLASS_DECLPOD(KEY_NAME, VALUE_NAME, VALUE_TYPE)
-//%GPB##KEY_NAME##VALUE_NAME##Dictionary
-//%PDDM-DEFINE DICTIONARY_CLASS_DECLEnum(KEY_NAME, VALUE_NAME, VALUE_TYPE)
-//%GPB##KEY_NAME##VALUE_NAME##Dictionary
-//%PDDM-DEFINE DICTIONARY_CLASS_DECLOBJECT(KEY_NAME, VALUE_NAME, VALUE_TYPE)
-//%GPB##KEY_NAME##VALUE_NAME##Dictionary<__covariant VALUE_TYPE>
-//%PDDM-DEFINE DICTIONARY_COMMON_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR)
-//%#pragma mark - KEY_NAME -> VALUE_NAME
-//%
-//%/**
-//% * Class used for map fields of <##KEY_TYPE##, ##VALUE_TYPE##>
-//% * values. This performs better than boxing into NSNumbers in NSDictionaries.
-//% *
-//% * @note This class is not meant to be subclassed.
-//% **/
-//%@interface DICTIONARY_CLASS_DECL##VHELPER(KEY_NAME, VALUE_NAME, VALUE_TYPE) : NSObject <NSCopying>
-//%
-//%/** Number of entries stored in this dictionary. */
-//%@property(nonatomic, readonly) NSUInteger count;
-//%
-//%/**
-//% * Initializes this dictionary, copying the given values and keys.
-//% *
-//% * @param ##VNAME_VAR##s The values to be placed in this dictionary.
-//% * @param keys ##VNAME_VAR$S## The keys under which to store the values.
-//% * @param count ##VNAME_VAR$S## The number of elements to copy into the dictionary.
-//% *
-//% * @return A newly initialized dictionary with a copy of the values and keys.
-//% **/
-//%- (instancetype)initWith##VNAME##s:(const VALUE_TYPE ARRAY_ARG_MODIFIER##VHELPER()[__nullable])##VNAME_VAR##s
-//% ##VNAME$S## forKeys:(const KEY_TYPE##KisP$S##KisP ARRAY_ARG_MODIFIER##KHELPER()[__nullable])keys
-//% ##VNAME$S## count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-//%
-//%/**
-//% * Initializes this dictionary, copying the entries from the given dictionary.
-//% *
-//% * @param dictionary Dictionary containing the entries to add to this dictionary.
-//% *
-//% * @return A newly initialized dictionary with the entries of the given dictionary.
-//% **/
-//%- (instancetype)initWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary;
-//%
-//%/**
-//% * Initializes this dictionary with the requested capacity.
-//% *
-//% * @param numItems Number of items needed for this dictionary.
-//% *
-//% * @return A newly initialized dictionary with the requested capacity.
-//% **/
-//%- (instancetype)initWithCapacity:(NSUInteger)numItems;
-//%
-//%DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR)
-//%
-//%/**
-//% * Adds the keys and values from another dictionary.
-//% *
-//% * @param otherDictionary Dictionary containing entries to be added to this
-//% * dictionary.
-//% **/
-//%- (void)addEntriesFromDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)otherDictionary;
-//%
-//%DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR)
-//%
-//%@end
-//%
-
-//%PDDM-DEFINE DICTIONARY_KEY_TO_ENUM_INTERFACE(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE)
-//%DICTIONARY_KEY_TO_ENUM_INTERFACE2(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, Enum)
-//%PDDM-DEFINE DICTIONARY_KEY_TO_ENUM_INTERFACE2(KEY_NAME, KEY_TYPE, KisP, KHELPER, VALUE_NAME, VALUE_TYPE, VHELPER)
-//%#pragma mark - KEY_NAME -> VALUE_NAME
-//%
-//%/**
-//% * Class used for map fields of <##KEY_TYPE##, ##VALUE_TYPE##>
-//% * values. This performs better than boxing into NSNumbers in NSDictionaries.
-//% *
-//% * @note This class is not meant to be subclassed.
-//% **/
-//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary : NSObject <NSCopying>
-//%
-//%/** Number of entries stored in this dictionary. */
-//%@property(nonatomic, readonly) NSUInteger count;
-//%/** The validation function to check if the enums are valid. */
-//%@property(nonatomic, readonly) GPBEnumValidationFunc validationFunc;
-//%
-//%/**
-//% * Initializes a dictionary with the given validation function.
-//% *
-//% * @param func The enum validation function for the dictionary.
-//% *
-//% * @return A newly initialized dictionary.
-//% **/
-//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func;
-//%
-//%/**
-//% * Initializes a dictionary with the entries given.
-//% *
-//% * @param func The enum validation function for the dictionary.
-//% * @param values The raw enum values values to be placed in the dictionary.
-//% * @param keys The keys under which to store the values.
-//% * @param count The number of entries to store in the dictionary.
-//% *
-//% * @return A newly initialized dictionary with the keys and values in it.
-//% **/
-//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
-//% rawValues:(const VALUE_TYPE ARRAY_ARG_MODIFIER##VHELPER()[__nullable])values
-//% forKeys:(const KEY_TYPE##KisP$S##KisP ARRAY_ARG_MODIFIER##KHELPER()[__nullable])keys
-//% count:(NSUInteger)count NS_DESIGNATED_INITIALIZER;
-//%
-//%/**
-//% * Initializes a dictionary with the entries from the given.
-//% * dictionary.
-//% *
-//% * @param dictionary Dictionary containing the entries to add to the dictionary.
-//% *
-//% * @return A newly initialized dictionary with the entries from the given
-//% * dictionary in it.
-//% **/
-//%- (instancetype)initWithDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)dictionary;
-//%
-//%/**
-//% * Initializes a dictionary with the given capacity.
-//% *
-//% * @param func The enum validation function for the dictionary.
-//% * @param numItems Capacity needed for the dictionary.
-//% *
-//% * @return A newly initialized dictionary with the given capacity.
-//% **/
-//%- (instancetype)initWithValidationFunction:(nullable GPBEnumValidationFunc)func
-//% capacity:(NSUInteger)numItems;
-//%
-//%// These will return kGPBUnrecognizedEnumeratorValue if the value for the key
-//%// is not a valid enumerator as defined by validationFunc. If the actual value is
-//%// desired, use "raw" version of the method.
-//%
-//%DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, Enum, value)
-//%
-//%/**
-//% * Gets the raw enum value for the given key.
-//% *
-//% * @note This method bypass the validationFunc to enable the access of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param rawValue Pointer into which the value will be set, if found.
-//% * @param key Key under which the value is stored, if present.
-//% *
-//% * @return YES if the key was found and the value was copied, NO otherwise.
-//% **/
-//%- (BOOL)getRawValue:(nullable VALUE_TYPE *)rawValue forKey:(KEY_TYPE##KisP$S##KisP)key;
-//%
-//%/**
-//% * Enumerates the keys and values on this dictionary with the given block.
-//% *
-//% * @note This method bypass the validationFunc to enable the access of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param block The block to enumerate with.
-//% * **key**: The key for the current entry.
-//% * **rawValue**: The value for the current entry
-//% * **stop**: A pointer to a boolean that when set stops the enumeration.
-//% **/
-//%- (void)enumerateKeysAndRawValuesUsingBlock:
-//% (void (^)(KEY_TYPE KisP##key, VALUE_TYPE rawValue, BOOL *stop))block;
-//%
-//%/**
-//% * Adds the keys and raw enum values from another dictionary.
-//% *
-//% * @note This method bypass the validationFunc to enable the setting of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param otherDictionary Dictionary containing entries to be added to this
-//% * dictionary.
-//% **/
-//%- (void)addRawEntriesFromDictionary:(GPB##KEY_NAME##VALUE_NAME##Dictionary *)otherDictionary;
-//%
-//%// If value is not a valid enumerator as defined by validationFunc, these
-//%// methods will assert in debug, and will log in release and assign the value
-//%// to the default value. Use the rawValue methods below to assign non enumerator
-//%// values.
-//%
-//%DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, Enum, value)
-//%
-//%@end
-//%
-
-//%PDDM-DEFINE DICTIONARY_IMMUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR)
-//%VALUE_FOR_KEY_##VHELPER(KEY_TYPE##KisP$S##KisP, VALUE_TYPE, VNAME)
-//%
-//%/**
-//% * Enumerates the keys and values on this dictionary with the given block.
-//% *
-//% * @param block The block to enumerate with.
-//% * **key**: ##VNAME_VAR$S## The key for the current entry.
-//% * **VNAME_VAR**: The value for the current entry
-//% * **stop**: ##VNAME_VAR$S## A pointer to a boolean that when set stops the enumeration.
-//% **/
-//%- (void)enumerateKeysAnd##VNAME##sUsingBlock:
-//% (void (^)(KEY_TYPE KisP##key, VALUE_TYPE VNAME_VAR, BOOL *stop))block;
-
-//%PDDM-DEFINE DICTIONARY_MUTABLE_INTERFACE(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE, VHELPER, VNAME, VNAME_VAR)
-//%/**
-//% * Sets the value for the given key.
-//% *
-//% * @param ##VNAME_VAR The value to set.
-//% * @param key ##VNAME_VAR$S## The key under which to store the value.
-//% **/
-//%- (void)set##VNAME##:(VALUE_TYPE)##VNAME_VAR forKey:(KEY_TYPE##KisP$S##KisP)key;
-//%DICTIONARY_EXTRA_MUTABLE_METHODS_##VHELPER(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE)
-//%/**
-//% * Removes the entry for the given key.
-//% *
-//% * @param aKey Key to be removed from this dictionary.
-//% **/
-//%- (void)remove##VNAME##ForKey:(KEY_TYPE##KisP$S##KisP)aKey;
-//%
-//%/**
-//% * Removes all entries in this dictionary.
-//% **/
-//%- (void)removeAll;
-
-//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_POD(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE)
-// Empty
-//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_OBJECT(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE)
-// Empty
-//%PDDM-DEFINE DICTIONARY_EXTRA_MUTABLE_METHODS_Enum(KEY_NAME, KEY_TYPE, KisP, VALUE_NAME, VALUE_TYPE)
-//%
-//%/**
-//% * Sets the raw enum value for the given key.
-//% *
-//% * @note This method bypass the validationFunc to enable the setting of values that
-//% * were not known at the time the binary was compiled.
-//% *
-//% * @param rawValue The raw enum value to set.
-//% * @param key The key under which to store the raw enum value.
-//% **/
-//%- (void)setRawValue:(VALUE_TYPE)rawValue forKey:(KEY_TYPE##KisP$S##KisP)key;
-//%
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDictionary_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDictionary_PackagePrivate.h
deleted file mode 100644
index 7b921e8ec..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBDictionary_PackagePrivate.h
+++ /dev/null
@@ -1,488 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBDictionary.h"
-
-@class GPBCodedInputStream;
-@class GPBCodedOutputStream;
-@class GPBExtensionRegistry;
-@class GPBFieldDescriptor;
-
-@protocol GPBDictionaryInternalsProtocol
-- (size_t)computeSerializedSizeAsField:(GPBFieldDescriptor *)field;
-- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)outputStream
- asField:(GPBFieldDescriptor *)field;
-- (void)setGPBGenericValue:(GPBGenericValue *)value
- forGPBGenericValueKey:(GPBGenericValue *)key;
-- (void)enumerateForTextFormat:(void (^)(id keyObj, id valueObj))block;
-@end
-
-//%PDDM-DEFINE DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(KEY_NAME)
-//%DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Object, Object)
-//%PDDM-DEFINE DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(KEY_NAME)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt32, Basic)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int32, Basic)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, UInt64, Basic)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Int64, Basic)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Bool, Basic)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Float, Basic)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Double, Basic)
-//%DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, Enum, Enum)
-
-//%PDDM-DEFINE DICTIONARY_PRIVATE_INTERFACES(KEY_NAME, VALUE_NAME, HELPER)
-//%@interface GPB##KEY_NAME##VALUE_NAME##Dictionary () <GPBDictionaryInternalsProtocol> {
-//% @package
-//% GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-//%}
-//%EXTRA_DICTIONARY_PRIVATE_INTERFACES_##HELPER()@end
-//%
-
-//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Basic()
-// Empty
-//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Object()
-//%- (BOOL)isInitialized;
-//%- (instancetype)deepCopyWithZone:(NSZone *)zone
-//% __attribute__((ns_returns_retained));
-//%
-//%PDDM-DEFINE EXTRA_DICTIONARY_PRIVATE_INTERFACES_Enum()
-//%- (NSData *)serializedDataForUnknownValue:(int32_t)value
-//% forKey:(GPBGenericValue *)key
-//% keyDataType:(GPBDataType)keyDataType;
-//%
-
-//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt32)
-// This block of code is generated, do not edit it directly.
-
-@interface GPBUInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt32BoolDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt32FloatDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt32EnumDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (NSData *)serializedDataForUnknownValue:(int32_t)value
- forKey:(GPBGenericValue *)key
- keyDataType:(GPBDataType)keyDataType;
-@end
-
-@interface GPBUInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (BOOL)isInitialized;
-- (instancetype)deepCopyWithZone:(NSZone *)zone
- __attribute__((ns_returns_retained));
-@end
-
-//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int32)
-// This block of code is generated, do not edit it directly.
-
-@interface GPBInt32UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt32Int32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt32UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt32Int64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt32BoolDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt32FloatDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt32DoubleDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt32EnumDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (NSData *)serializedDataForUnknownValue:(int32_t)value
- forKey:(GPBGenericValue *)key
- keyDataType:(GPBDataType)keyDataType;
-@end
-
-@interface GPBInt32ObjectDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (BOOL)isInitialized;
-- (instancetype)deepCopyWithZone:(NSZone *)zone
- __attribute__((ns_returns_retained));
-@end
-
-//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(UInt64)
-// This block of code is generated, do not edit it directly.
-
-@interface GPBUInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt64BoolDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt64FloatDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBUInt64EnumDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (NSData *)serializedDataForUnknownValue:(int32_t)value
- forKey:(GPBGenericValue *)key
- keyDataType:(GPBDataType)keyDataType;
-@end
-
-@interface GPBUInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (BOOL)isInitialized;
-- (instancetype)deepCopyWithZone:(NSZone *)zone
- __attribute__((ns_returns_retained));
-@end
-
-//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Int64)
-// This block of code is generated, do not edit it directly.
-
-@interface GPBInt64UInt32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt64Int32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt64UInt64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt64Int64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt64BoolDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt64FloatDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt64DoubleDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBInt64EnumDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (NSData *)serializedDataForUnknownValue:(int32_t)value
- forKey:(GPBGenericValue *)key
- keyDataType:(GPBDataType)keyDataType;
-@end
-
-@interface GPBInt64ObjectDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (BOOL)isInitialized;
-- (instancetype)deepCopyWithZone:(NSZone *)zone
- __attribute__((ns_returns_retained));
-@end
-
-//%PDDM-EXPAND DICTIONARY_PRIV_INTERFACES_FOR_POD_KEY(Bool)
-// This block of code is generated, do not edit it directly.
-
-@interface GPBBoolUInt32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBBoolInt32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBBoolUInt64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBBoolInt64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBBoolBoolDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBBoolFloatDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBBoolDoubleDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBBoolEnumDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (NSData *)serializedDataForUnknownValue:(int32_t)value
- forKey:(GPBGenericValue *)key
- keyDataType:(GPBDataType)keyDataType;
-@end
-
-@interface GPBBoolObjectDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (BOOL)isInitialized;
-- (instancetype)deepCopyWithZone:(NSZone *)zone
- __attribute__((ns_returns_retained));
-@end
-
-//%PDDM-EXPAND DICTIONARY_POD_PRIV_INTERFACES_FOR_KEY(String)
-// This block of code is generated, do not edit it directly.
-
-@interface GPBStringUInt32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBStringInt32Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBStringUInt64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBStringInt64Dictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBStringBoolDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBStringFloatDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBStringDoubleDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-@interface GPBStringEnumDictionary () <GPBDictionaryInternalsProtocol> {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-- (NSData *)serializedDataForUnknownValue:(int32_t)value
- forKey:(GPBGenericValue *)key
- keyDataType:(GPBDataType)keyDataType;
-@end
-
-//%PDDM-EXPAND-END (6 expansions)
-
-#pragma mark - NSDictionary Subclass
-
-@interface GPBAutocreatedDictionary : NSMutableDictionary {
- @package
- GPB_UNSAFE_UNRETAINED GPBMessage *_autocreator;
-}
-@end
-
-#pragma mark - Helpers
-
-CF_EXTERN_C_BEGIN
-
-// Helper to compute size when an NSDictionary is used for the map instead
-// of a custom type.
-size_t GPBDictionaryComputeSizeInternalHelper(NSDictionary *dict,
- GPBFieldDescriptor *field);
-
-// Helper to write out when an NSDictionary is used for the map instead
-// of a custom type.
-void GPBDictionaryWriteToStreamInternalHelper(
- GPBCodedOutputStream *outputStream, NSDictionary *dict,
- GPBFieldDescriptor *field);
-
-// Helper to check message initialization when an NSDictionary is used for
-// the map instead of a custom type.
-BOOL GPBDictionaryIsInitializedInternalHelper(NSDictionary *dict,
- GPBFieldDescriptor *field);
-
-// Helper to read a map instead.
-void GPBDictionaryReadEntry(id mapDictionary, GPBCodedInputStream *stream,
- GPBExtensionRegistry *registry,
- GPBFieldDescriptor *field,
- GPBMessage *parentMessage);
-
-CF_EXTERN_C_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBExtensionInternals.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBExtensionInternals.h
deleted file mode 100644
index 2b980aefa..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBExtensionInternals.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBDescriptor.h"
-
-@class GPBCodedInputStream;
-@class GPBCodedOutputStream;
-@class GPBExtensionRegistry;
-
-void GPBExtensionMergeFromInputStream(GPBExtensionDescriptor *extension,
- BOOL isPackedOnStream,
- GPBCodedInputStream *input,
- GPBExtensionRegistry *extensionRegistry,
- GPBMessage *message);
-
-size_t GPBComputeExtensionSerializedSizeIncludingTag(
- GPBExtensionDescriptor *extension, id value);
-
-void GPBWriteExtensionValueToOutputStream(GPBExtensionDescriptor *extension,
- id value,
- GPBCodedOutputStream *output);
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBExtensionRegistry.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBExtensionRegistry.h
deleted file mode 100644
index d79632d28..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBExtensionRegistry.h
+++ /dev/null
@@ -1,87 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-@class GPBDescriptor;
-@class GPBExtensionDescriptor;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * A table of known extensions, searchable by name or field number. When
- * parsing a protocol message that might have extensions, you must provide a
- * GPBExtensionRegistry in which you have registered any extensions that you
- * want to be able to parse. Otherwise, those extensions will just be treated
- * like unknown fields.
- *
- * The *Root classes provide `+extensionRegistry` for the extensions defined
- * in a given file *and* all files it imports. You can also create a
- * GPBExtensionRegistry, and merge those registries to handle parsing
- * extensions defined from non overlapping files.
- *
- * ```
- * GPBExtensionRegistry *registry = [[MyProtoFileRoot extensionRegistry] copy];
- * [registry addExtension:[OtherMessage neededExtension]]; // Not in MyProtoFile
- * NSError *parseError;
- * MyMessage *msg = [MyMessage parseData:data extensionRegistry:registry error:&parseError];
- * ```
- **/
-@interface GPBExtensionRegistry : NSObject<NSCopying>
-
-/**
- * Adds the given GPBExtensionDescriptor to this registry.
- *
- * @param extension The extension description to add.
- **/
-- (void)addExtension:(GPBExtensionDescriptor *)extension;
-
-/**
- * Adds all the extensions from another registry to this registry.
- *
- * @param registry The registry to merge into this registry.
- **/
-- (void)addExtensions:(GPBExtensionRegistry *)registry;
-
-/**
- * Looks for the extension registered for the given field number on a given
- * GPBDescriptor.
- *
- * @param descriptor The descriptor to look for a registered extension on.
- * @param fieldNumber The field number of the extension to look for.
- *
- * @return The registered GPBExtensionDescriptor or nil if none was found.
- **/
-- (nullable GPBExtensionDescriptor *)extensionForDescriptor:(GPBDescriptor *)descriptor
- fieldNumber:(NSInteger)fieldNumber;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBMessage.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBMessage.h
deleted file mode 100644
index 276740d2f..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBMessage.h
+++ /dev/null
@@ -1,470 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBBootstrap.h"
-
-@class GPBDescriptor;
-@class GPBCodedInputStream;
-@class GPBCodedOutputStream;
-@class GPBExtensionDescriptor;
-@class GPBExtensionRegistry;
-@class GPBFieldDescriptor;
-@class GPBUnknownFieldSet;
-
-NS_ASSUME_NONNULL_BEGIN
-
-CF_EXTERN_C_BEGIN
-
-/** NSError domain used for errors. */
-extern NSString *const GPBMessageErrorDomain;
-
-/** Error codes for NSErrors originated in GPBMessage. */
-typedef NS_ENUM(NSInteger, GPBMessageErrorCode) {
- /** Uncategorized error. */
- GPBMessageErrorCodeOther = -100,
- /** Message couldn't be serialized because it is missing required fields. */
- GPBMessageErrorCodeMissingRequiredField = -101,
-};
-
-/**
- * Key under which the GPBMessage error's reason is stored inside the userInfo
- * dictionary.
- **/
-extern NSString *const GPBErrorReasonKey;
-
-CF_EXTERN_C_END
-
-/**
- * Base class that each generated message subclasses from.
- *
- * @note @c NSCopying support is a "deep copy", in that all sub objects are
- * copied. Just like you wouldn't want a UIView/NSView trying to
- * exist in two places, you don't want a sub message to be a property
- * property of two other messages.
- *
- * @note While the class support NSSecureCoding, if the message has any
- * extensions, they will end up reloaded in @c unknownFields as there is
- * no way for the @c NSCoding plumbing to pass through a
- * @c GPBExtensionRegistry. To support extensions, instead of passing the
- * calls off to the Message, simple store the result of @c data, and then
- * when loading, fetch the data and use
- * @c +parseFromData:extensionRegistry:error: to provide an extension
- * registry.
- **/
-@interface GPBMessage : NSObject<NSSecureCoding, NSCopying>
-
-// If you add an instance method/property to this class that may conflict with
-// fields declared in protos, you need to update objective_helpers.cc. The main
-// cases are methods that take no arguments, or setFoo:/hasFoo: type methods.
-
-/**
- * The set of unknown fields for this message.
- *
- * Only messages from proto files declared with "proto2" syntax support unknown
- * fields. For "proto3" syntax, any unknown fields found while parsing are
- * dropped.
- **/
-@property(nonatomic, copy, nullable) GPBUnknownFieldSet *unknownFields;
-
-/**
- * Whether the message, along with all submessages, have the required fields
- * set. This is only applicable for files declared with "proto2" syntax, as
- * there are no required fields for "proto3" syntax.
- **/
-@property(nonatomic, readonly, getter=isInitialized) BOOL initialized;
-
-/**
- * @return An autoreleased message with the default values set.
- **/
-+ (instancetype)message;
-
-/**
- * Creates a new instance by parsing the provided data. This method should be
- * sent to the generated message class that the data should be interpreted as.
- * If there is an error the method returns nil and the error is returned in
- * errorPtr (when provided).
- *
- * @note In DEBUG builds, the parsed message is checked to be sure all required
- * fields were provided, and the parse will fail if some are missing.
- *
- * @note The errors returned are likely coming from the domain and codes listed
- * at the top of this file and GPBCodedInputStream.h.
- *
- * @param data The data to parse.
- * @param errorPtr An optional error pointer to fill in with a failure reason if
- * the data can not be parsed.
- *
- * @return A new instance of the generated class.
- **/
-+ (nullable instancetype)parseFromData:(NSData *)data error:(NSError **)errorPtr;
-
-/**
- * Creates a new instance by parsing the data. This method should be sent to
- * the generated message class that the data should be interpreted as. If
- * there is an error the method returns nil and the error is returned in
- * errorPtr (when provided).
- *
- * @note In DEBUG builds, the parsed message is checked to be sure all required
- * fields were provided, and the parse will fail if some are missing.
- *
- * @note The errors returned are likely coming from the domain and codes listed
- * at the top of this file and GPBCodedInputStream.h.
- *
- * @param data The data to parse.
- * @param extensionRegistry The extension registry to use to look up extensions.
- * @param errorPtr An optional error pointer to fill in with a failure
- * reason if the data can not be parsed.
- *
- * @return A new instance of the generated class.
- **/
-+ (nullable instancetype)parseFromData:(NSData *)data
- extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry
- error:(NSError **)errorPtr;
-
-/**
- * Creates a new instance by parsing the data from the given input stream. This
- * method should be sent to the generated message class that the data should
- * be interpreted as. If there is an error the method returns nil and the error
- * is returned in errorPtr (when provided).
- *
- * @note In DEBUG builds, the parsed message is checked to be sure all required
- * fields were provided, and the parse will fail if some are missing.
- *
- * @note The errors returned are likely coming from the domain and codes listed
- * at the top of this file and GPBCodedInputStream.h.
- *
- * @param input The stream to read data from.
- * @param extensionRegistry The extension registry to use to look up extensions.
- * @param errorPtr An optional error pointer to fill in with a failure
- * reason if the data can not be parsed.
- *
- * @return A new instance of the generated class.
- **/
-+ (nullable instancetype)parseFromCodedInputStream:(GPBCodedInputStream *)input
- extensionRegistry:
- (nullable GPBExtensionRegistry *)extensionRegistry
- error:(NSError **)errorPtr;
-
-/**
- * Creates a new instance by parsing the data from the given input stream. This
- * method should be sent to the generated message class that the data should
- * be interpreted as. If there is an error the method returns nil and the error
- * is returned in errorPtr (when provided).
- *
- * @note Unlike the parseFrom... methods, this never checks to see if all of
- * the required fields are set. So this method can be used to reload
- * messages that may not be complete.
- *
- * @note The errors returned are likely coming from the domain and codes listed
- * at the top of this file and GPBCodedInputStream.h.
- *
- * @param input The stream to read data from.
- * @param extensionRegistry The extension registry to use to look up extensions.
- * @param errorPtr An optional error pointer to fill in with a failure
- * reason if the data can not be parsed.
- *
- * @return A new instance of the generated class.
- **/
-+ (nullable instancetype)parseDelimitedFromCodedInputStream:(GPBCodedInputStream *)input
- extensionRegistry:
- (nullable GPBExtensionRegistry *)extensionRegistry
- error:(NSError **)errorPtr;
-
-/**
- * Initializes an instance by parsing the data. This method should be sent to
- * the generated message class that the data should be interpreted as. If
- * there is an error the method returns nil and the error is returned in
- * errorPtr (when provided).
- *
- * @note In DEBUG builds, the parsed message is checked to be sure all required
- * fields were provided, and the parse will fail if some are missing.
- *
- * @note The errors returned are likely coming from the domain and codes listed
- * at the top of this file and GPBCodedInputStream.h.
- *
- * @param data The data to parse.
- * @param errorPtr An optional error pointer to fill in with a failure reason if
- * the data can not be parsed.
- *
- * @return An initialized instance of the generated class.
- **/
-- (nullable instancetype)initWithData:(NSData *)data error:(NSError **)errorPtr;
-
-/**
- * Initializes an instance by parsing the data. This method should be sent to
- * the generated message class that the data should be interpreted as. If
- * there is an error the method returns nil and the error is returned in
- * errorPtr (when provided).
- *
- * @note In DEBUG builds, the parsed message is checked to be sure all required
- * fields were provided, and the parse will fail if some are missing.
- *
- * @note The errors returned are likely coming from the domain and codes listed
- * at the top of this file and GPBCodedInputStream.h.
- *
- * @param data The data to parse.
- * @param extensionRegistry The extension registry to use to look up extensions.
- * @param errorPtr An optional error pointer to fill in with a failure
- * reason if the data can not be parsed.
- *
- * @return An initialized instance of the generated class.
- **/
-- (nullable instancetype)initWithData:(NSData *)data
- extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry
- error:(NSError **)errorPtr;
-
-/**
- * Initializes an instance by parsing the data from the given input stream. This
- * method should be sent to the generated message class that the data should
- * be interpreted as. If there is an error the method returns nil and the error
- * is returned in errorPtr (when provided).
- *
- * @note Unlike the parseFrom... methods, this never checks to see if all of
- * the required fields are set. So this method can be used to reload
- * messages that may not be complete.
- *
- * @note The errors returned are likely coming from the domain and codes listed
- * at the top of this file and GPBCodedInputStream.h.
- *
- * @param input The stream to read data from.
- * @param extensionRegistry The extension registry to use to look up extensions.
- * @param errorPtr An optional error pointer to fill in with a failure
- * reason if the data can not be parsed.
- *
- * @return An initialized instance of the generated class.
- **/
-- (nullable instancetype)initWithCodedInputStream:(GPBCodedInputStream *)input
- extensionRegistry:
- (nullable GPBExtensionRegistry *)extensionRegistry
- error:(NSError **)errorPtr;
-
-/**
- * Parses the given data as this message's class, and merges those values into
- * this message.
- *
- * @param data The binary representation of the message to merge.
- * @param extensionRegistry The extension registry to use to look up extensions.
- *
- * @exception GPBCodedInputStreamException Exception thrown when parsing was
- * unsuccessful.
- **/
-- (void)mergeFromData:(NSData *)data
- extensionRegistry:(nullable GPBExtensionRegistry *)extensionRegistry;
-
-/**
- * Merges the fields from another message (of the same type) into this
- * message.
- *
- * @param other Message to merge into this message.
- **/
-- (void)mergeFrom:(GPBMessage *)other;
-
-/**
- * Writes out the message to the given coded output stream.
- *
- * @param output The coded output stream into which to write the message.
- *
- * @note This can raise the GPBCodedOutputStreamException_* exceptions.
- *
- **/
-- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output;
-
-/**
- * Writes out the message to the given output stream.
- *
- * @param output The output stream into which to write the message.
- *
- * @note This can raise the GPBCodedOutputStreamException_* exceptions.
- **/
-- (void)writeToOutputStream:(NSOutputStream *)output;
-
-/**
- * Writes out a varint for the message size followed by the the message to
- * the given output stream.
- *
- * @param output The coded output stream into which to write the message.
- *
- * @note This can raise the GPBCodedOutputStreamException_* exceptions.
- **/
-- (void)writeDelimitedToCodedOutputStream:(GPBCodedOutputStream *)output;
-
-/**
- * Writes out a varint for the message size followed by the the message to
- * the given output stream.
- *
- * @param output The output stream into which to write the message.
- *
- * @note This can raise the GPBCodedOutputStreamException_* exceptions.
- **/
-- (void)writeDelimitedToOutputStream:(NSOutputStream *)output;
-
-/**
- * Serializes the message to an NSData.
- *
- * If there is an error while generating the data, nil is returned.
- *
- * @note This value is not cached, so if you are using it repeatedly, cache
- * it yourself.
- *
- * @note In DEBUG ONLY, the message is also checked for all required field,
- * if one is missing, nil will be returned.
- *
- * @return The binary representation of the message.
- **/
-- (nullable NSData *)data;
-
-/**
- * Serializes a varint with the message size followed by the message data,
- * returning that as an NSData.
- *
- * @note This value is not cached, so if you are using it repeatedly, it is
- * recommended to keep a local copy.
- *
- * @return The binary representation of the size along with the message.
- **/
-- (NSData *)delimitedData;
-
-/**
- * Calculates the size of the object if it were serialized.
- *
- * This is not a cached value. If you are following a pattern like this:
- *
- * ```
- * size_t size = [aMsg serializedSize];
- * NSMutableData *foo = [NSMutableData dataWithCapacity:size + sizeof(size)];
- * [foo writeSize:size];
- * [foo appendData:[aMsg data]];
- * ```
- *
- * you would be better doing:
- *
- * ```
- * NSData *data = [aMsg data];
- * NSUInteger size = [aMsg length];
- * NSMutableData *foo = [NSMutableData dataWithCapacity:size + sizeof(size)];
- * [foo writeSize:size];
- * [foo appendData:data];
- * ```
- *
- * @return The size of the message in it's binary representation.
- **/
-- (size_t)serializedSize;
-
-/**
- * @return The descriptor for the message class.
- **/
-+ (GPBDescriptor *)descriptor;
-
-/**
- * Return the descriptor for the message.
- **/
-- (GPBDescriptor *)descriptor;
-
-/**
- * @return An array with the extension descriptors that are currently set on the
- * message.
- **/
-- (NSArray *)extensionsCurrentlySet;
-
-/**
- * Checks whether there is an extension set on the message which matches the
- * given extension descriptor.
- *
- * @param extension Extension descriptor to check if it's set on the message.
- *
- * @return Whether the extension is currently set on the message.
- **/
-- (BOOL)hasExtension:(GPBExtensionDescriptor *)extension;
-
-/*
- * Fetches the given extension's value for this message.
- *
- * Extensions use boxed values (NSNumbers) for PODs and NSMutableArrays for
- * repeated fields. If the extension is a Message one will be auto created for
- * you and returned similar to fields.
- *
- * @param extension The extension descriptor of the extension to fetch.
- *
- * @return The extension matching the given descriptor, or nil if none found.
- **/
-- (nullable id)getExtension:(GPBExtensionDescriptor *)extension;
-
-/**
- * Sets the given extension's value for this message. This only applies for
- * single field extensions (i.e. - not repeated fields).
- *
- * Extensions use boxed values (NSNumbers).
- *
- * @param extension The extension descriptor under which to set the value.
- * @param value The value to be set as the extension.
- **/
-- (void)setExtension:(GPBExtensionDescriptor *)extension
- value:(nullable id)value;
-
-/**
- * Adds the given value to the extension for this message. This only applies
- * to repeated field extensions. If the field is a repeated POD type, the value
- * should be an NSNumber.
- *
- * @param extension The extension descriptor under which to add the value.
- * @param value The value to be added to the repeated extension.
- **/
-- (void)addExtension:(GPBExtensionDescriptor *)extension value:(id)value;
-
-/**
- * Replaces the value at the given index with the given value for the extension
- * on this message. This only applies to repeated field extensions. If the field
- * is a repeated POD type, the value is should be an NSNumber.
- *
- * @param extension The extension descriptor under which to replace the value.
- * @param index The index of the extension to be replaced.
- * @param value The value to be replaced in the repeated extension.
- **/
-- (void)setExtension:(GPBExtensionDescriptor *)extension
- index:(NSUInteger)index
- value:(id)value;
-
-/**
- * Clears the given extension for this message.
- *
- * @param extension The extension descriptor to be cleared from this message.
- **/
-- (void)clearExtension:(GPBExtensionDescriptor *)extension;
-
-/**
- * Resets all of the fields of this message to their default values.
- **/
-- (void)clear;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBMessage_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBMessage_PackagePrivate.h
deleted file mode 100644
index ca10983b3..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBMessage_PackagePrivate.h
+++ /dev/null
@@ -1,124 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This header is private to the ProtobolBuffers library and must NOT be
-// included by any sources outside this library. The contents of this file are
-// subject to change at any time without notice.
-
-#import "GPBMessage.h"
-
-// TODO: Remove this import. Older generated code use the OSAtomic* apis,
-// so anyone that hasn't regenerated says building by having this. After
-// enough time has passed, this likely can be removed as folks should have
-// regenerated.
-#import <libkern/OSAtomic.h>
-
-#import "GPBBootstrap.h"
-
-typedef struct GPBMessage_Storage {
- uint32_t _has_storage_[0];
-} GPBMessage_Storage;
-
-typedef struct GPBMessage_Storage *GPBMessage_StoragePtr;
-
-@interface GPBMessage () {
- @package
- // NOTE: Because of the +allocWithZone code using NSAllocateObject(),
- // this structure should ideally always be kept pointer aligned where the
- // real storage starts is also pointer aligned. The compiler/runtime already
- // do this, but it may not be documented.
-
- // A pointer to the actual fields of the subclasses. The actual structure
- // pointed to by this pointer will depend on the subclass.
- // All of the actual structures will start the same as
- // GPBMessage_Storage with _has_storage__ as the first field.
- // Kept public because static functions need to access it.
- GPBMessage_StoragePtr messageStorage_;
-}
-
-// Gets an extension value without autocreating the result if not found. (i.e.
-// returns nil if the extension is not set)
-- (id)getExistingExtension:(GPBExtensionDescriptor *)extension;
-
-// Parses a message of this type from the input and merges it with this
-// message.
-//
-// Warning: This does not verify that all required fields are present in
-// the input message.
-// Note: The caller should call
-// -[CodedInputStream checkLastTagWas:] after calling this to
-// verify that the last tag seen was the appropriate end-group tag,
-// or zero for EOF.
-// NOTE: This will throw if there is an error while parsing.
-- (void)mergeFromCodedInputStream:(GPBCodedInputStream *)input
- extensionRegistry:(GPBExtensionRegistry *)extensionRegistry;
-
-// Parses the next delimited message of this type from the input and merges it
-// with this message.
-- (void)mergeDelimitedFromCodedInputStream:(GPBCodedInputStream *)input
- extensionRegistry:
- (GPBExtensionRegistry *)extensionRegistry;
-
-- (void)addUnknownMapEntry:(int32_t)fieldNum value:(NSData *)data;
-
-@end
-
-CF_EXTERN_C_BEGIN
-
-
-// Call this before using the readOnlySemaphore_. This ensures it is created only once.
-void GPBPrepareReadOnlySemaphore(GPBMessage *self);
-
-// Returns a new instance that was automatically created by |autocreator| for
-// its field |field|.
-GPBMessage *GPBCreateMessageWithAutocreator(Class msgClass,
- GPBMessage *autocreator,
- GPBFieldDescriptor *field)
- __attribute__((ns_returns_retained));
-
-// Returns whether |message| autocreated this message. This is NO if the message
-// was not autocreated by |message| or if it has been mutated since
-// autocreation.
-BOOL GPBWasMessageAutocreatedBy(GPBMessage *message, GPBMessage *parent);
-
-// Call this when you mutate a message. It will cause the message to become
-// visible to its autocreator.
-void GPBBecomeVisibleToAutocreator(GPBMessage *self);
-
-// Call this when an array/dictionary is mutated so the parent message that
-// autocreated it can react.
-void GPBAutocreatedArrayModified(GPBMessage *self, id array);
-void GPBAutocreatedDictionaryModified(GPBMessage *self, id dictionary);
-
-// Clear the autocreator, if any. Asserts if the autocreator still has an
-// autocreated reference to this message.
-void GPBClearMessageAutocreator(GPBMessage *self);
-
-CF_EXTERN_C_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBProtocolBuffers.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBProtocolBuffers.h
deleted file mode 100644
index 68d8854eb..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBProtocolBuffers.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import "GPBBootstrap.h"
-
-#import "GPBArray.h"
-#import "GPBCodedInputStream.h"
-#import "GPBCodedOutputStream.h"
-#import "GPBDescriptor.h"
-#import "GPBDictionary.h"
-#import "GPBExtensionRegistry.h"
-#import "GPBMessage.h"
-#import "GPBRootObject.h"
-#import "GPBUnknownField.h"
-#import "GPBUnknownFieldSet.h"
-#import "GPBUtilities.h"
-#import "GPBWellKnownTypes.h"
-#import "GPBWireFormat.h"
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-// Well-known proto types
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/Any.pbobjc.h>
- #import <Protobuf/Api.pbobjc.h>
- #import <Protobuf/Duration.pbobjc.h>
- #import <Protobuf/Empty.pbobjc.h>
- #import <Protobuf/FieldMask.pbobjc.h>
- #import <Protobuf/SourceContext.pbobjc.h>
- #import <Protobuf/Struct.pbobjc.h>
- #import <Protobuf/Timestamp.pbobjc.h>
- #import <Protobuf/Type.pbobjc.h>
- #import <Protobuf/Wrappers.pbobjc.h>
-#else
- #import "google/protobuf/Any.pbobjc.h"
- #import "google/protobuf/Api.pbobjc.h"
- #import "google/protobuf/Duration.pbobjc.h"
- #import "google/protobuf/Empty.pbobjc.h"
- #import "google/protobuf/FieldMask.pbobjc.h"
- #import "google/protobuf/SourceContext.pbobjc.h"
- #import "google/protobuf/Struct.pbobjc.h"
- #import "google/protobuf/Timestamp.pbobjc.h"
- #import "google/protobuf/Type.pbobjc.h"
- #import "google/protobuf/Wrappers.pbobjc.h"
-#endif
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBProtocolBuffers_RuntimeSupport.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBProtocolBuffers_RuntimeSupport.h
deleted file mode 100644
index 04dde620a..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBProtocolBuffers_RuntimeSupport.h
+++ /dev/null
@@ -1,40 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-// This header is meant to only be used by the generated source, it should not
-// be included in code using protocol buffers.
-
-#import "GPBBootstrap.h"
-
-#import "GPBDescriptor_PackagePrivate.h"
-#import "GPBExtensionInternals.h"
-#import "GPBMessage_PackagePrivate.h"
-#import "GPBRootObject_PackagePrivate.h"
-#import "GPBUtilities_PackagePrivate.h"
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRootObject.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRootObject.h
deleted file mode 100644
index d2e2aebfc..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRootObject.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-@class GPBExtensionRegistry;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * Every generated proto file defines a local "Root" class that exposes a
- * GPBExtensionRegistry for all the extensions defined by that file and
- * the files it depends on.
- **/
-@interface GPBRootObject : NSObject
-
-/**
- * @return An extension registry for the given file and all the files it depends
- * on.
- **/
-+ (GPBExtensionRegistry *)extensionRegistry;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRootObject_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRootObject_PackagePrivate.h
deleted file mode 100644
index 3c8f09c89..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRootObject_PackagePrivate.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBRootObject.h"
-
-@class GPBExtensionDescriptor;
-
-@interface GPBRootObject ()
-
-// Globally register.
-+ (void)globallyRegisterExtension:(GPBExtensionDescriptor *)field;
-
-@end
-
-// Returns YES if the selector was resolved and added to the class,
-// NO otherwise.
-BOOL GPBResolveExtensionClassMethod(Class self, SEL sel);
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRuntimeTypes.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRuntimeTypes.h
deleted file mode 100644
index 4d552060b..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBRuntimeTypes.h
+++ /dev/null
@@ -1,144 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBBootstrap.h"
-
-@class GPBEnumDescriptor;
-@class GPBMessage;
-@class GPBInt32Array;
-
-/**
- * Verifies that a given value can be represented by an enum type.
- * */
-typedef BOOL (*GPBEnumValidationFunc)(int32_t);
-
-/**
- * Fetches an EnumDescriptor.
- * */
-typedef GPBEnumDescriptor *(*GPBEnumDescriptorFunc)(void);
-
-/**
- * Magic value used at runtime to indicate an enum value that wasn't know at
- * compile time.
- * */
-enum {
- kGPBUnrecognizedEnumeratorValue = (int32_t)0xFBADBEEF,
-};
-
-/**
- * A union for storing all possible Protobuf values. Note that owner is
- * responsible for memory management of object types.
- * */
-typedef union {
- BOOL valueBool;
- int32_t valueInt32;
- int64_t valueInt64;
- uint32_t valueUInt32;
- uint64_t valueUInt64;
- float valueFloat;
- double valueDouble;
- GPB_UNSAFE_UNRETAINED NSData *valueData;
- GPB_UNSAFE_UNRETAINED NSString *valueString;
- GPB_UNSAFE_UNRETAINED GPBMessage *valueMessage;
- int32_t valueEnum;
-} GPBGenericValue;
-
-/**
- * Enum listing the possible data types that a field can contain.
- *
- * @note Do not change the order of this enum (or add things to it) without
- * thinking about it very carefully. There are several things that depend
- * on the order.
- * */
-typedef NS_ENUM(uint8_t, GPBDataType) {
- /** Field contains boolean value(s). */
- GPBDataTypeBool = 0,
- /** Field contains unsigned 4 byte value(s). */
- GPBDataTypeFixed32,
- /** Field contains signed 4 byte value(s). */
- GPBDataTypeSFixed32,
- /** Field contains float value(s). */
- GPBDataTypeFloat,
- /** Field contains unsigned 8 byte value(s). */
- GPBDataTypeFixed64,
- /** Field contains signed 8 byte value(s). */
- GPBDataTypeSFixed64,
- /** Field contains double value(s). */
- GPBDataTypeDouble,
- /**
- * Field contains variable length value(s). Inefficient for encoding negative
- * numbers – if your field is likely to have negative values, use
- * GPBDataTypeSInt32 instead.
- **/
- GPBDataTypeInt32,
- /**
- * Field contains variable length value(s). Inefficient for encoding negative
- * numbers – if your field is likely to have negative values, use
- * GPBDataTypeSInt64 instead.
- **/
- GPBDataTypeInt64,
- /** Field contains signed variable length integer value(s). */
- GPBDataTypeSInt32,
- /** Field contains signed variable length integer value(s). */
- GPBDataTypeSInt64,
- /** Field contains unsigned variable length integer value(s). */
- GPBDataTypeUInt32,
- /** Field contains unsigned variable length integer value(s). */
- GPBDataTypeUInt64,
- /** Field contains an arbitrary sequence of bytes. */
- GPBDataTypeBytes,
- /** Field contains UTF-8 encoded or 7-bit ASCII text. */
- GPBDataTypeString,
- /** Field contains message type(s). */
- GPBDataTypeMessage,
- /** Field contains message type(s). */
- GPBDataTypeGroup,
- /** Field contains enum value(s). */
- GPBDataTypeEnum,
-};
-
-enum {
- /**
- * A count of the number of types in GPBDataType. Separated out from the
- * GPBDataType enum to avoid warnings regarding not handling GPBDataType_Count
- * in switch statements.
- **/
- GPBDataType_Count = GPBDataTypeEnum + 1
-};
-
-/** An extension range. */
-typedef struct GPBExtensionRange {
- /** Inclusive. */
- uint32_t start;
- /** Exclusive. */
- uint32_t end;
-} GPBExtensionRange;
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownField.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownField.h
deleted file mode 100644
index 5b96023b1..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownField.h
+++ /dev/null
@@ -1,99 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-@class GPBCodedOutputStream;
-@class GPBUInt32Array;
-@class GPBUInt64Array;
-@class GPBUnknownFieldSet;
-
-NS_ASSUME_NONNULL_BEGIN
-/**
- * Store an unknown field. These are used in conjunction with
- * GPBUnknownFieldSet.
- **/
-@interface GPBUnknownField : NSObject<NSCopying>
-
-/** Initialize a field with the given number. */
-- (instancetype)initWithNumber:(int32_t)number;
-
-/** The field number the data is stored under. */
-@property(nonatomic, readonly, assign) int32_t number;
-
-/** An array of varint values for this field. */
-@property(nonatomic, readonly, strong) GPBUInt64Array *varintList;
-
-/** An array of fixed32 values for this field. */
-@property(nonatomic, readonly, strong) GPBUInt32Array *fixed32List;
-
-/** An array of fixed64 values for this field. */
-@property(nonatomic, readonly, strong) GPBUInt64Array *fixed64List;
-
-/** An array of data values for this field. */
-@property(nonatomic, readonly, strong) NSArray<NSData*> *lengthDelimitedList;
-
-/** An array of groups of values for this field. */
-@property(nonatomic, readonly, strong) NSArray<GPBUnknownFieldSet*> *groupList;
-
-/**
- * Add a value to the varintList.
- *
- * @param value The value to add.
- **/
-- (void)addVarint:(uint64_t)value;
-/**
- * Add a value to the fixed32List.
- *
- * @param value The value to add.
- **/
-- (void)addFixed32:(uint32_t)value;
-/**
- * Add a value to the fixed64List.
- *
- * @param value The value to add.
- **/
-- (void)addFixed64:(uint64_t)value;
-/**
- * Add a value to the lengthDelimitedList.
- *
- * @param value The value to add.
- **/
-- (void)addLengthDelimited:(NSData *)value;
-/**
- * Add a value to the groupList.
- *
- * @param value The value to add.
- **/
-- (void)addGroup:(GPBUnknownFieldSet *)value;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownFieldSet.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownFieldSet.h
deleted file mode 100644
index 1b5f24f39..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownFieldSet.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-@class GPBUnknownField;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * A collection of unknown fields. Fields parsed from the binary representation
- * of a message that are unknown end up in an instance of this set. This only
- * applies for files declared with the "proto2" syntax. Files declared with the
- * "proto3" syntax discard the unknown values.
- **/
-@interface GPBUnknownFieldSet : NSObject<NSCopying>
-
-/**
- * Tests to see if the given field number has a value.
- *
- * @param number The field number to check.
- *
- * @return YES if there is an unknown field for the given field number.
- **/
-- (BOOL)hasField:(int32_t)number;
-
-/**
- * Fetches the GPBUnknownField for the given field number.
- *
- * @param number The field number to look up.
- *
- * @return The GPBUnknownField or nil if none found.
- **/
-- (nullable GPBUnknownField *)getField:(int32_t)number;
-
-/**
- * @return The number of fields in this set.
- **/
-- (NSUInteger)countOfFields;
-
-/**
- * Adds the given field to the set.
- *
- * @param field The field to add to the set.
- **/
-- (void)addField:(GPBUnknownField *)field;
-
-/**
- * @return An array of the GPBUnknownFields sorted by the field numbers.
- **/
-- (NSArray<GPBUnknownField *> *)sortedFields;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownFieldSet_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownFieldSet_PackagePrivate.h
deleted file mode 100644
index e27127ad1..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownFieldSet_PackagePrivate.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBUnknownFieldSet.h"
-
-@class GPBCodedOutputStream;
-@class GPBCodedInputStream;
-
-@interface GPBUnknownFieldSet ()
-
-+ (BOOL)isFieldTag:(int32_t)tag;
-
-- (NSData *)data;
-
-- (size_t)serializedSize;
-- (size_t)serializedSizeAsMessageSet;
-
-- (void)writeToCodedOutputStream:(GPBCodedOutputStream *)output;
-- (void)writeAsMessageSetTo:(GPBCodedOutputStream *)output;
-
-- (void)mergeUnknownFields:(GPBUnknownFieldSet *)other;
-
-- (void)mergeFromCodedInputStream:(GPBCodedInputStream *)input;
-- (void)mergeFromData:(NSData *)data;
-
-- (void)mergeVarintField:(int32_t)number value:(int32_t)value;
-- (BOOL)mergeFieldFrom:(int32_t)tag input:(GPBCodedInputStream *)input;
-- (void)mergeMessageSetMessage:(int32_t)number data:(NSData *)messageData;
-
-- (void)addUnknownMapEntry:(int32_t)fieldNum value:(NSData *)data;
-
-@end
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownField_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownField_PackagePrivate.h
deleted file mode 100644
index 2b4c78951..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUnknownField_PackagePrivate.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBUnknownField.h"
-
-@class GPBCodedOutputStream;
-
-@interface GPBUnknownField ()
-
-- (void)writeToOutput:(GPBCodedOutputStream *)output;
-- (size_t)serializedSize;
-
-- (void)writeAsMessageSetExtensionToOutput:(GPBCodedOutputStream *)output;
-- (size_t)serializedSizeAsMessageSetExtension;
-
-- (void)mergeFromField:(GPBUnknownField *)other;
-
-@end
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUtilities.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUtilities.h
deleted file mode 100644
index 5464dfb35..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUtilities.h
+++ /dev/null
@@ -1,539 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBArray.h"
-#import "GPBMessage.h"
-#import "GPBRuntimeTypes.h"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- * Generates a string that should be a valid "TextFormat" for the C++ version
- * of Protocol Buffers.
- *
- * @param message The message to generate from.
- * @param lineIndent A string to use as the prefix for all lines generated. Can
- * be nil if no extra indent is needed.
- *
- * @return An NSString with the TextFormat of the message.
- **/
-NSString *GPBTextFormatForMessage(GPBMessage *message,
- NSString * __nullable lineIndent);
-
-/**
- * Generates a string that should be a valid "TextFormat" for the C++ version
- * of Protocol Buffers.
- *
- * @param unknownSet The unknown field set to generate from.
- * @param lineIndent A string to use as the prefix for all lines generated. Can
- * be nil if no extra indent is needed.
- *
- * @return An NSString with the TextFormat of the unknown field set.
- **/
-NSString *GPBTextFormatForUnknownFieldSet(GPBUnknownFieldSet * __nullable unknownSet,
- NSString * __nullable lineIndent);
-
-/**
- * Checks if the given field number is set on a message.
- *
- * @param self The message to check.
- * @param fieldNumber The field number to check.
- *
- * @return YES if the field number is set on the given message.
- **/
-BOOL GPBMessageHasFieldNumberSet(GPBMessage *self, uint32_t fieldNumber);
-
-/**
- * Checks if the given field is set on a message.
- *
- * @param self The message to check.
- * @param field The field to check.
- *
- * @return YES if the field is set on the given message.
- **/
-BOOL GPBMessageHasFieldSet(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Clears the given field for the given message.
- *
- * @param self The message for which to clear the field.
- * @param field The field to clear.
- **/
-void GPBClearMessageField(GPBMessage *self, GPBFieldDescriptor *field);
-
-//%PDDM-EXPAND GPB_ACCESSORS()
-// This block of code is generated, do not edit it directly.
-
-
-//
-// Get/Set a given field from/to a message.
-//
-
-// Single Fields
-
-/**
- * Gets the value of a bytes field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-NSData *GPBGetMessageBytesField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a bytes field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageBytesField(GPBMessage *self, GPBFieldDescriptor *field, NSData *value);
-
-/**
- * Gets the value of a string field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-NSString *GPBGetMessageStringField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a string field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageStringField(GPBMessage *self, GPBFieldDescriptor *field, NSString *value);
-
-/**
- * Gets the value of a message field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-GPBMessage *GPBGetMessageMessageField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a message field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageMessageField(GPBMessage *self, GPBFieldDescriptor *field, GPBMessage *value);
-
-/**
- * Gets the value of a group field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-GPBMessage *GPBGetMessageGroupField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a group field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageGroupField(GPBMessage *self, GPBFieldDescriptor *field, GPBMessage *value);
-
-/**
- * Gets the value of a bool field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-BOOL GPBGetMessageBoolField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a bool field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageBoolField(GPBMessage *self, GPBFieldDescriptor *field, BOOL value);
-
-/**
- * Gets the value of an int32 field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-int32_t GPBGetMessageInt32Field(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of an int32 field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageInt32Field(GPBMessage *self, GPBFieldDescriptor *field, int32_t value);
-
-/**
- * Gets the value of an uint32 field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-uint32_t GPBGetMessageUInt32Field(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of an uint32 field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageUInt32Field(GPBMessage *self, GPBFieldDescriptor *field, uint32_t value);
-
-/**
- * Gets the value of an int64 field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-int64_t GPBGetMessageInt64Field(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of an int64 field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageInt64Field(GPBMessage *self, GPBFieldDescriptor *field, int64_t value);
-
-/**
- * Gets the value of an uint64 field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-uint64_t GPBGetMessageUInt64Field(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of an uint64 field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageUInt64Field(GPBMessage *self, GPBFieldDescriptor *field, uint64_t value);
-
-/**
- * Gets the value of a float field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-float GPBGetMessageFloatField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a float field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageFloatField(GPBMessage *self, GPBFieldDescriptor *field, float value);
-
-/**
- * Gets the value of a double field.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- **/
-double GPBGetMessageDoubleField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a double field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The to set in the field.
- **/
-void GPBSetMessageDoubleField(GPBMessage *self, GPBFieldDescriptor *field, double value);
-
-/**
- * Gets the given enum field of a message. For proto3, if the value isn't a
- * member of the enum, @c kGPBUnrecognizedEnumeratorValue will be returned.
- * GPBGetMessageRawEnumField will bypass the check and return whatever value
- * was set.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- *
- * @return The enum value for the given field.
- **/
-int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Set the given enum field of a message. You can only set values that are
- * members of the enum.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The enum value to set in the field.
- **/
-void GPBSetMessageEnumField(GPBMessage *self,
- GPBFieldDescriptor *field,
- int32_t value);
-
-/**
- * Get the given enum field of a message. No check is done to ensure the value
- * was defined in the enum.
- *
- * @param self The message from which to get the field.
- * @param field The field to get.
- *
- * @return The raw enum value for the given field.
- **/
-int32_t GPBGetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Set the given enum field of a message. You can set the value to anything,
- * even a value that is not a member of the enum.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param value The raw enum value to set in the field.
- **/
-void GPBSetMessageRawEnumField(GPBMessage *self,
- GPBFieldDescriptor *field,
- int32_t value);
-
-// Repeated Fields
-
-/**
- * Gets the value of a repeated field.
- *
- * @param self The message from which to get the field.
- * @param field The repeated field to get.
- *
- * @return A GPB*Array or an NSMutableArray based on the field's type.
- **/
-id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a repeated field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param array A GPB*Array or NSMutableArray based on the field's type.
- **/
-void GPBSetMessageRepeatedField(GPBMessage *self,
- GPBFieldDescriptor *field,
- id array);
-
-// Map Fields
-
-/**
- * Gets the value of a map<> field.
- *
- * @param self The message from which to get the field.
- * @param field The repeated field to get.
- *
- * @return A GPB*Dictionary or NSMutableDictionary based on the field's type.
- **/
-id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field);
-
-/**
- * Sets the value of a map<> field.
- *
- * @param self The message into which to set the field.
- * @param field The field to set.
- * @param dictionary A GPB*Dictionary or NSMutableDictionary based on the
- * field's type.
- **/
-void GPBSetMessageMapField(GPBMessage *self,
- GPBFieldDescriptor *field,
- id dictionary);
-
-//%PDDM-EXPAND-END GPB_ACCESSORS()
-
-/**
- * Returns an empty NSData to assign to byte fields when you wish to assign them
- * to empty. Prevents allocating a lot of little [NSData data] objects.
- **/
-NSData *GPBEmptyNSData(void) __attribute__((pure));
-
-/**
- * Drops the `unknownFields` from the given message and from all sub message.
- **/
-void GPBMessageDropUnknownFieldsRecursively(GPBMessage *message);
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-
-//%PDDM-DEFINE GPB_ACCESSORS()
-//%
-//%//
-//%// Get/Set a given field from/to a message.
-//%//
-//%
-//%// Single Fields
-//%
-//%GPB_ACCESSOR_SINGLE_FULL(Bytes, NSData, , *)
-//%GPB_ACCESSOR_SINGLE_FULL(String, NSString, , *)
-//%GPB_ACCESSOR_SINGLE_FULL(Message, GPBMessage, , *)
-//%GPB_ACCESSOR_SINGLE_FULL(Group, GPBMessage, , *)
-//%GPB_ACCESSOR_SINGLE(Bool, BOOL, )
-//%GPB_ACCESSOR_SINGLE(Int32, int32_t, n)
-//%GPB_ACCESSOR_SINGLE(UInt32, uint32_t, n)
-//%GPB_ACCESSOR_SINGLE(Int64, int64_t, n)
-//%GPB_ACCESSOR_SINGLE(UInt64, uint64_t, n)
-//%GPB_ACCESSOR_SINGLE(Float, float, )
-//%GPB_ACCESSOR_SINGLE(Double, double, )
-//%/**
-//% * Gets the given enum field of a message. For proto3, if the value isn't a
-//% * member of the enum, @c kGPBUnrecognizedEnumeratorValue will be returned.
-//% * GPBGetMessageRawEnumField will bypass the check and return whatever value
-//% * was set.
-//% *
-//% * @param self The message from which to get the field.
-//% * @param field The field to get.
-//% *
-//% * @return The enum value for the given field.
-//% **/
-//%int32_t GPBGetMessageEnumField(GPBMessage *self, GPBFieldDescriptor *field);
-//%
-//%/**
-//% * Set the given enum field of a message. You can only set values that are
-//% * members of the enum.
-//% *
-//% * @param self The message into which to set the field.
-//% * @param field The field to set.
-//% * @param value The enum value to set in the field.
-//% **/
-//%void GPBSetMessageEnumField(GPBMessage *self,
-//% GPBFieldDescriptor *field,
-//% int32_t value);
-//%
-//%/**
-//% * Get the given enum field of a message. No check is done to ensure the value
-//% * was defined in the enum.
-//% *
-//% * @param self The message from which to get the field.
-//% * @param field The field to get.
-//% *
-//% * @return The raw enum value for the given field.
-//% **/
-//%int32_t GPBGetMessageRawEnumField(GPBMessage *self, GPBFieldDescriptor *field);
-//%
-//%/**
-//% * Set the given enum field of a message. You can set the value to anything,
-//% * even a value that is not a member of the enum.
-//% *
-//% * @param self The message into which to set the field.
-//% * @param field The field to set.
-//% * @param value The raw enum value to set in the field.
-//% **/
-//%void GPBSetMessageRawEnumField(GPBMessage *self,
-//% GPBFieldDescriptor *field,
-//% int32_t value);
-//%
-//%// Repeated Fields
-//%
-//%/**
-//% * Gets the value of a repeated field.
-//% *
-//% * @param self The message from which to get the field.
-//% * @param field The repeated field to get.
-//% *
-//% * @return A GPB*Array or an NSMutableArray based on the field's type.
-//% **/
-//%id GPBGetMessageRepeatedField(GPBMessage *self, GPBFieldDescriptor *field);
-//%
-//%/**
-//% * Sets the value of a repeated field.
-//% *
-//% * @param self The message into which to set the field.
-//% * @param field The field to set.
-//% * @param array A GPB*Array or NSMutableArray based on the field's type.
-//% **/
-//%void GPBSetMessageRepeatedField(GPBMessage *self,
-//% GPBFieldDescriptor *field,
-//% id array);
-//%
-//%// Map Fields
-//%
-//%/**
-//% * Gets the value of a map<> field.
-//% *
-//% * @param self The message from which to get the field.
-//% * @param field The repeated field to get.
-//% *
-//% * @return A GPB*Dictionary or NSMutableDictionary based on the field's type.
-//% **/
-//%id GPBGetMessageMapField(GPBMessage *self, GPBFieldDescriptor *field);
-//%
-//%/**
-//% * Sets the value of a map<> field.
-//% *
-//% * @param self The message into which to set the field.
-//% * @param field The field to set.
-//% * @param dictionary A GPB*Dictionary or NSMutableDictionary based on the
-//% * field's type.
-//% **/
-//%void GPBSetMessageMapField(GPBMessage *self,
-//% GPBFieldDescriptor *field,
-//% id dictionary);
-//%
-
-//%PDDM-DEFINE GPB_ACCESSOR_SINGLE(NAME, TYPE, AN)
-//%GPB_ACCESSOR_SINGLE_FULL(NAME, TYPE, AN, )
-//%PDDM-DEFINE GPB_ACCESSOR_SINGLE_FULL(NAME, TYPE, AN, TisP)
-//%/**
-//% * Gets the value of a##AN NAME$L field.
-//% *
-//% * @param self The message from which to get the field.
-//% * @param field The field to get.
-//% **/
-//%TYPE TisP##GPBGetMessage##NAME##Field(GPBMessage *self, GPBFieldDescriptor *field);
-//%
-//%/**
-//% * Sets the value of a##AN NAME$L field.
-//% *
-//% * @param self The message into which to set the field.
-//% * @param field The field to set.
-//% * @param value The to set in the field.
-//% **/
-//%void GPBSetMessage##NAME##Field(GPBMessage *self, GPBFieldDescriptor *field, TYPE TisP##value);
-//%
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUtilities_PackagePrivate.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUtilities_PackagePrivate.h
deleted file mode 100644
index ed424ce39..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBUtilities_PackagePrivate.h
+++ /dev/null
@@ -1,351 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-#import "GPBUtilities.h"
-
-#import "GPBDescriptor_PackagePrivate.h"
-
-// Macros for stringifying library symbols. These are used in the generated
-// PB descriptor classes wherever a library symbol name is represented as a
-// string. See README.google for more information.
-#define GPBStringify(S) #S
-#define GPBStringifySymbol(S) GPBStringify(S)
-
-#define GPBNSStringify(S) @#S
-#define GPBNSStringifySymbol(S) GPBNSStringify(S)
-
-// Constant to internally mark when there is no has bit.
-#define GPBNoHasBit INT32_MAX
-
-CF_EXTERN_C_BEGIN
-
-// These two are used to inject a runtime check for version mismatch into the
-// generated sources to make sure they are linked with a supporting runtime.
-void GPBCheckRuntimeVersionSupport(int32_t objcRuntimeVersion);
-GPB_INLINE void GPB_DEBUG_CHECK_RUNTIME_VERSIONS() {
- // NOTE: By being inline here, this captures the value from the library's
- // headers at the time the generated code was compiled.
-#if defined(DEBUG) && DEBUG
- GPBCheckRuntimeVersionSupport(GOOGLE_PROTOBUF_OBJC_VERSION);
-#endif
-}
-
-// Legacy version of the checks, remove when GOOGLE_PROTOBUF_OBJC_GEN_VERSION
-// goes away (see more info in GPBBootstrap.h).
-void GPBCheckRuntimeVersionInternal(int32_t version);
-GPB_INLINE void GPBDebugCheckRuntimeVersion() {
-#if defined(DEBUG) && DEBUG
- GPBCheckRuntimeVersionInternal(GOOGLE_PROTOBUF_OBJC_GEN_VERSION);
-#endif
-}
-
-// Conversion functions for de/serializing floating point types.
-
-GPB_INLINE int64_t GPBConvertDoubleToInt64(double v) {
- union { double f; int64_t i; } u;
- u.f = v;
- return u.i;
-}
-
-GPB_INLINE int32_t GPBConvertFloatToInt32(float v) {
- union { float f; int32_t i; } u;
- u.f = v;
- return u.i;
-}
-
-GPB_INLINE double GPBConvertInt64ToDouble(int64_t v) {
- union { double f; int64_t i; } u;
- u.i = v;
- return u.f;
-}
-
-GPB_INLINE float GPBConvertInt32ToFloat(int32_t v) {
- union { float f; int32_t i; } u;
- u.i = v;
- return u.f;
-}
-
-GPB_INLINE int32_t GPBLogicalRightShift32(int32_t value, int32_t spaces) {
- return (int32_t)((uint32_t)(value) >> spaces);
-}
-
-GPB_INLINE int64_t GPBLogicalRightShift64(int64_t value, int32_t spaces) {
- return (int64_t)((uint64_t)(value) >> spaces);
-}
-
-// Decode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers
-// into values that can be efficiently encoded with varint. (Otherwise,
-// negative values must be sign-extended to 64 bits to be varint encoded,
-// thus always taking 10 bytes on the wire.)
-GPB_INLINE int32_t GPBDecodeZigZag32(uint32_t n) {
- return (int32_t)(GPBLogicalRightShift32((int32_t)n, 1) ^ -((int32_t)(n) & 1));
-}
-
-// Decode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers
-// into values that can be efficiently encoded with varint. (Otherwise,
-// negative values must be sign-extended to 64 bits to be varint encoded,
-// thus always taking 10 bytes on the wire.)
-GPB_INLINE int64_t GPBDecodeZigZag64(uint64_t n) {
- return (int64_t)(GPBLogicalRightShift64((int64_t)n, 1) ^ -((int64_t)(n) & 1));
-}
-
-// Encode a ZigZag-encoded 32-bit value. ZigZag encodes signed integers
-// into values that can be efficiently encoded with varint. (Otherwise,
-// negative values must be sign-extended to 64 bits to be varint encoded,
-// thus always taking 10 bytes on the wire.)
-GPB_INLINE uint32_t GPBEncodeZigZag32(int32_t n) {
- // Note: the right-shift must be arithmetic
- return ((uint32_t)n << 1) ^ (uint32_t)(n >> 31);
-}
-
-// Encode a ZigZag-encoded 64-bit value. ZigZag encodes signed integers
-// into values that can be efficiently encoded with varint. (Otherwise,
-// negative values must be sign-extended to 64 bits to be varint encoded,
-// thus always taking 10 bytes on the wire.)
-GPB_INLINE uint64_t GPBEncodeZigZag64(int64_t n) {
- // Note: the right-shift must be arithmetic
- return ((uint64_t)n << 1) ^ (uint64_t)(n >> 63);
-}
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wswitch-enum"
-#pragma clang diagnostic ignored "-Wdirect-ivar-access"
-
-GPB_INLINE BOOL GPBDataTypeIsObject(GPBDataType type) {
- switch (type) {
- case GPBDataTypeBytes:
- case GPBDataTypeString:
- case GPBDataTypeMessage:
- case GPBDataTypeGroup:
- return YES;
- default:
- return NO;
- }
-}
-
-GPB_INLINE BOOL GPBDataTypeIsMessage(GPBDataType type) {
- switch (type) {
- case GPBDataTypeMessage:
- case GPBDataTypeGroup:
- return YES;
- default:
- return NO;
- }
-}
-
-GPB_INLINE BOOL GPBFieldDataTypeIsMessage(GPBFieldDescriptor *field) {
- return GPBDataTypeIsMessage(field->description_->dataType);
-}
-
-GPB_INLINE BOOL GPBFieldDataTypeIsObject(GPBFieldDescriptor *field) {
- return GPBDataTypeIsObject(field->description_->dataType);
-}
-
-GPB_INLINE BOOL GPBExtensionIsMessage(GPBExtensionDescriptor *ext) {
- return GPBDataTypeIsMessage(ext->description_->dataType);
-}
-
-// The field is an array/map or it has an object value.
-GPB_INLINE BOOL GPBFieldStoresObject(GPBFieldDescriptor *field) {
- GPBMessageFieldDescription *desc = field->description_;
- if ((desc->flags & (GPBFieldRepeated | GPBFieldMapKeyMask)) != 0) {
- return YES;
- }
- return GPBDataTypeIsObject(desc->dataType);
-}
-
-BOOL GPBGetHasIvar(GPBMessage *self, int32_t index, uint32_t fieldNumber);
-void GPBSetHasIvar(GPBMessage *self, int32_t idx, uint32_t fieldNumber,
- BOOL value);
-uint32_t GPBGetHasOneof(GPBMessage *self, int32_t index);
-
-GPB_INLINE BOOL
-GPBGetHasIvarField(GPBMessage *self, GPBFieldDescriptor *field) {
- GPBMessageFieldDescription *fieldDesc = field->description_;
- return GPBGetHasIvar(self, fieldDesc->hasIndex, fieldDesc->number);
-}
-GPB_INLINE void GPBSetHasIvarField(GPBMessage *self, GPBFieldDescriptor *field,
- BOOL value) {
- GPBMessageFieldDescription *fieldDesc = field->description_;
- GPBSetHasIvar(self, fieldDesc->hasIndex, fieldDesc->number, value);
-}
-
-void GPBMaybeClearOneof(GPBMessage *self, GPBOneofDescriptor *oneof,
- int32_t oneofHasIndex, uint32_t fieldNumberNotToClear);
-
-#pragma clang diagnostic pop
-
-//%PDDM-DEFINE GPB_IVAR_SET_DECL(NAME, TYPE)
-//%void GPBSet##NAME##IvarWithFieldInternal(GPBMessage *self,
-//% NAME$S GPBFieldDescriptor *field,
-//% NAME$S TYPE value,
-//% NAME$S GPBFileSyntax syntax);
-//%PDDM-EXPAND GPB_IVAR_SET_DECL(Bool, BOOL)
-// This block of code is generated, do not edit it directly.
-
-void GPBSetBoolIvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- BOOL value,
- GPBFileSyntax syntax);
-//%PDDM-EXPAND GPB_IVAR_SET_DECL(Int32, int32_t)
-// This block of code is generated, do not edit it directly.
-
-void GPBSetInt32IvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- int32_t value,
- GPBFileSyntax syntax);
-//%PDDM-EXPAND GPB_IVAR_SET_DECL(UInt32, uint32_t)
-// This block of code is generated, do not edit it directly.
-
-void GPBSetUInt32IvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- uint32_t value,
- GPBFileSyntax syntax);
-//%PDDM-EXPAND GPB_IVAR_SET_DECL(Int64, int64_t)
-// This block of code is generated, do not edit it directly.
-
-void GPBSetInt64IvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- int64_t value,
- GPBFileSyntax syntax);
-//%PDDM-EXPAND GPB_IVAR_SET_DECL(UInt64, uint64_t)
-// This block of code is generated, do not edit it directly.
-
-void GPBSetUInt64IvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- uint64_t value,
- GPBFileSyntax syntax);
-//%PDDM-EXPAND GPB_IVAR_SET_DECL(Float, float)
-// This block of code is generated, do not edit it directly.
-
-void GPBSetFloatIvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- float value,
- GPBFileSyntax syntax);
-//%PDDM-EXPAND GPB_IVAR_SET_DECL(Double, double)
-// This block of code is generated, do not edit it directly.
-
-void GPBSetDoubleIvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- double value,
- GPBFileSyntax syntax);
-//%PDDM-EXPAND GPB_IVAR_SET_DECL(Enum, int32_t)
-// This block of code is generated, do not edit it directly.
-
-void GPBSetEnumIvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- int32_t value,
- GPBFileSyntax syntax);
-//%PDDM-EXPAND-END (8 expansions)
-
-int32_t GPBGetEnumIvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- GPBFileSyntax syntax);
-
-id GPBGetObjectIvarWithField(GPBMessage *self, GPBFieldDescriptor *field);
-
-void GPBSetObjectIvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field, id value,
- GPBFileSyntax syntax);
-void GPBSetRetainedObjectIvarWithFieldInternal(GPBMessage *self,
- GPBFieldDescriptor *field,
- id __attribute__((ns_consumed))
- value,
- GPBFileSyntax syntax);
-
-// GPBGetObjectIvarWithField will automatically create the field (message) if
-// it doesn't exist. GPBGetObjectIvarWithFieldNoAutocreate will return nil.
-id GPBGetObjectIvarWithFieldNoAutocreate(GPBMessage *self,
- GPBFieldDescriptor *field);
-
-void GPBSetAutocreatedRetainedObjectIvarWithField(
- GPBMessage *self, GPBFieldDescriptor *field,
- id __attribute__((ns_consumed)) value);
-
-// Clears and releases the autocreated message ivar, if it's autocreated. If
-// it's not set as autocreated, this method does nothing.
-void GPBClearAutocreatedMessageIvarWithField(GPBMessage *self,
- GPBFieldDescriptor *field);
-
-// Returns an Objective C encoding for |selector|. |instanceSel| should be
-// YES if it's an instance selector (as opposed to a class selector).
-// |selector| must be a selector from MessageSignatureProtocol.
-const char *GPBMessageEncodingForSelector(SEL selector, BOOL instanceSel);
-
-// Helper for text format name encoding.
-// decodeData is the data describing the sepecial decodes.
-// key and inputString are the input that needs decoding.
-NSString *GPBDecodeTextFormatName(const uint8_t *decodeData, int32_t key,
- NSString *inputString);
-
-// A series of selectors that are used solely to get @encoding values
-// for them by the dynamic protobuf runtime code. See
-// GPBMessageEncodingForSelector for details. GPBRootObject conforms to
-// the protocol so that it is encoded in the Objective C runtime.
-@protocol GPBMessageSignatureProtocol
-@optional
-
-#define GPB_MESSAGE_SIGNATURE_ENTRY(TYPE, NAME) \
- -(TYPE)get##NAME; \
- -(void)set##NAME : (TYPE)value; \
- -(TYPE)get##NAME##AtIndex : (NSUInteger)index;
-
-GPB_MESSAGE_SIGNATURE_ENTRY(BOOL, Bool)
-GPB_MESSAGE_SIGNATURE_ENTRY(uint32_t, Fixed32)
-GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, SFixed32)
-GPB_MESSAGE_SIGNATURE_ENTRY(float, Float)
-GPB_MESSAGE_SIGNATURE_ENTRY(uint64_t, Fixed64)
-GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, SFixed64)
-GPB_MESSAGE_SIGNATURE_ENTRY(double, Double)
-GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, Int32)
-GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, Int64)
-GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, SInt32)
-GPB_MESSAGE_SIGNATURE_ENTRY(int64_t, SInt64)
-GPB_MESSAGE_SIGNATURE_ENTRY(uint32_t, UInt32)
-GPB_MESSAGE_SIGNATURE_ENTRY(uint64_t, UInt64)
-GPB_MESSAGE_SIGNATURE_ENTRY(NSData *, Bytes)
-GPB_MESSAGE_SIGNATURE_ENTRY(NSString *, String)
-GPB_MESSAGE_SIGNATURE_ENTRY(GPBMessage *, Message)
-GPB_MESSAGE_SIGNATURE_ENTRY(GPBMessage *, Group)
-GPB_MESSAGE_SIGNATURE_ENTRY(int32_t, Enum)
-
-#undef GPB_MESSAGE_SIGNATURE_ENTRY
-
-- (id)getArray;
-- (NSUInteger)getArrayCount;
-- (void)setArray:(NSArray *)array;
-+ (id)getClassValue;
-@end
-
-BOOL GPBClassHasSel(Class aClass, SEL sel);
-
-CF_EXTERN_C_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBWellKnownTypes.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBWellKnownTypes.h
deleted file mode 100644
index 04df41788..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBWellKnownTypes.h
+++ /dev/null
@@ -1,245 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2015 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import <Foundation/Foundation.h>
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/Any.pbobjc.h>
- #import <Protobuf/Duration.pbobjc.h>
- #import <Protobuf/Timestamp.pbobjc.h>
-#else
- #import "google/protobuf/Any.pbobjc.h"
- #import "google/protobuf/Duration.pbobjc.h"
- #import "google/protobuf/Timestamp.pbobjc.h"
-#endif
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - Errors
-
-/** NSError domain used for errors. */
-extern NSString *const GPBWellKnownTypesErrorDomain;
-
-/** Error code for NSError with GPBWellKnownTypesErrorDomain. */
-typedef NS_ENUM(NSInteger, GPBWellKnownTypesErrorCode) {
- /** The type_url could not be computed for the requested GPBMessage class. */
- GPBWellKnownTypesErrorCodeFailedToComputeTypeURL = -100,
- /** type_url in a Any doesn’t match that of the requested GPBMessage class. */
- GPBWellKnownTypesErrorCodeTypeURLMismatch = -101,
-};
-
-#pragma mark - GPBTimestamp
-
-/**
- * Category for GPBTimestamp to work with standard Foundation time/date types.
- **/
-@interface GPBTimestamp (GBPWellKnownTypes)
-
-/** The NSDate representation of this GPBTimestamp. */
-@property(nonatomic, readwrite, strong) NSDate *date;
-
-/**
- * The NSTimeInterval representation of this GPBTimestamp.
- *
- * @note: Not all second/nanos combinations can be represented in a
- * NSTimeInterval, so getting this could be a lossy transform.
- **/
-@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970;
-
-/**
- * Initializes a GPBTimestamp with the given NSDate.
- *
- * @param date The date to configure the GPBTimestamp with.
- *
- * @return A newly initialized GPBTimestamp.
- **/
-- (instancetype)initWithDate:(NSDate *)date;
-
-/**
- * Initializes a GPBTimestamp with the given NSTimeInterval.
- *
- * @param timeIntervalSince1970 Time interval to configure the GPBTimestamp with.
- *
- * @return A newly initialized GPBTimestamp.
- **/
-- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970;
-
-@end
-
-#pragma mark - GPBDuration
-
-/**
- * Category for GPBDuration to work with standard Foundation time type.
- **/
-@interface GPBDuration (GBPWellKnownTypes)
-
-/**
- * The NSTimeInterval representation of this GPBDuration.
- *
- * @note: Not all second/nanos combinations can be represented in a
- * NSTimeInterval, so getting this could be a lossy transform.
- **/
-@property(nonatomic, readwrite) NSTimeInterval timeInterval;
-
-/**
- * Initializes a GPBDuration with the given NSTimeInterval.
- *
- * @param timeInterval Time interval to configure the GPBDuration with.
- *
- * @return A newly initialized GPBDuration.
- **/
-- (instancetype)initWithTimeInterval:(NSTimeInterval)timeInterval;
-
-// These next two methods are deprecated because GBPDuration has no need of a
-// "base" time. The older methods were about symmetry with GBPTimestamp, but
-// the unix epoch usage is too confusing.
-
-/** Deprecated, use timeInterval instead. */
-@property(nonatomic, readwrite) NSTimeInterval timeIntervalSince1970
- __attribute__((deprecated("Use timeInterval")));
-/** Deprecated, use initWithTimeInterval: instead. */
-- (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)timeIntervalSince1970
- __attribute__((deprecated("Use initWithTimeInterval:")));
-
-@end
-
-#pragma mark - GPBAny
-
-/**
- * Category for GPBAny to help work with the message within the object.
- **/
-@interface GPBAny (GBPWellKnownTypes)
-
-/**
- * Convenience method to create a GPBAny containing the serialized message.
- * This uses type.googleapis.com/ as the type_url's prefix.
- *
- * @param message The message to be packed into the GPBAny.
- * @param errorPtr Pointer to an error that will be populated if something goes
- * wrong.
- *
- * @return A newly configured GPBAny with the given message, or nil on failure.
- */
-+ (nullable instancetype)anyWithMessage:(nonnull GPBMessage *)message
- error:(NSError **)errorPtr;
-
-/**
- * Convenience method to create a GPBAny containing the serialized message.
- *
- * @param message The message to be packed into the GPBAny.
- * @param typeURLPrefix The URL prefix to apply for type_url.
- * @param errorPtr Pointer to an error that will be populated if something
- * goes wrong.
- *
- * @return A newly configured GPBAny with the given message, or nil on failure.
- */
-+ (nullable instancetype)anyWithMessage:(nonnull GPBMessage *)message
- typeURLPrefix:(nonnull NSString *)typeURLPrefix
- error:(NSError **)errorPtr;
-
-/**
- * Initializes a GPBAny to contain the serialized message. This uses
- * type.googleapis.com/ as the type_url's prefix.
- *
- * @param message The message to be packed into the GPBAny.
- * @param errorPtr Pointer to an error that will be populated if something goes
- * wrong.
- *
- * @return A newly configured GPBAny with the given message, or nil on failure.
- */
-- (nullable instancetype)initWithMessage:(nonnull GPBMessage *)message
- error:(NSError **)errorPtr;
-
-/**
- * Initializes a GPBAny to contain the serialized message.
- *
- * @param message The message to be packed into the GPBAny.
- * @param typeURLPrefix The URL prefix to apply for type_url.
- * @param errorPtr Pointer to an error that will be populated if something
- * goes wrong.
- *
- * @return A newly configured GPBAny with the given message, or nil on failure.
- */
-- (nullable instancetype)initWithMessage:(nonnull GPBMessage *)message
- typeURLPrefix:(nonnull NSString *)typeURLPrefix
- error:(NSError **)errorPtr;
-
-/**
- * Packs the serialized message into this GPBAny. This uses
- * type.googleapis.com/ as the type_url's prefix.
- *
- * @param message The message to be packed into the GPBAny.
- * @param errorPtr Pointer to an error that will be populated if something goes
- * wrong.
- *
- * @return Whether the packing was successful or not.
- */
-- (BOOL)packWithMessage:(nonnull GPBMessage *)message
- error:(NSError **)errorPtr;
-
-/**
- * Packs the serialized message into this GPBAny.
- *
- * @param message The message to be packed into the GPBAny.
- * @param typeURLPrefix The URL prefix to apply for type_url.
- * @param errorPtr Pointer to an error that will be populated if something
- * goes wrong.
- *
- * @return Whether the packing was successful or not.
- */
-- (BOOL)packWithMessage:(nonnull GPBMessage *)message
- typeURLPrefix:(nonnull NSString *)typeURLPrefix
- error:(NSError **)errorPtr;
-
-/**
- * Unpacks the serialized message as if it was an instance of the given class.
- *
- * @note When checking type_url, the base URL is not checked, only the fully
- * qualified name.
- *
- * @param messageClass The class to use to deserialize the contained message.
- * @param errorPtr Pointer to an error that will be populated if something
- * goes wrong.
- *
- * @return An instance of the given class populated with the contained data, or
- * nil on failure.
- */
-- (nullable GPBMessage *)unpackMessageClass:(Class)messageClass
- error:(NSError **)errorPtr;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBWireFormat.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBWireFormat.h
deleted file mode 100644
index c5941a382..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/GPBWireFormat.h
+++ /dev/null
@@ -1,73 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#import "GPBRuntimeTypes.h"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-typedef enum {
- GPBWireFormatVarint = 0,
- GPBWireFormatFixed64 = 1,
- GPBWireFormatLengthDelimited = 2,
- GPBWireFormatStartGroup = 3,
- GPBWireFormatEndGroup = 4,
- GPBWireFormatFixed32 = 5,
-} GPBWireFormat;
-
-enum {
- GPBWireFormatMessageSetItem = 1,
- GPBWireFormatMessageSetTypeId = 2,
- GPBWireFormatMessageSetMessage = 3
-};
-
-uint32_t GPBWireFormatMakeTag(uint32_t fieldNumber, GPBWireFormat wireType)
- __attribute__((const));
-GPBWireFormat GPBWireFormatGetTagWireType(uint32_t tag) __attribute__((const));
-uint32_t GPBWireFormatGetTagFieldNumber(uint32_t tag) __attribute__((const));
-BOOL GPBWireFormatIsValidTag(uint32_t tag) __attribute__((const));
-
-GPBWireFormat GPBWireFormatForType(GPBDataType dataType, BOOL isPacked)
- __attribute__((const));
-
-#define GPBWireFormatMessageSetItemTag \
- (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatStartGroup))
-#define GPBWireFormatMessageSetItemEndTag \
- (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatEndGroup))
-#define GPBWireFormatMessageSetTypeIdTag \
- (GPBWireFormatMakeTag(GPBWireFormatMessageSetTypeId, GPBWireFormatVarint))
-#define GPBWireFormatMessageSetMessageTag \
- (GPBWireFormatMakeTag(GPBWireFormatMessageSetMessage, \
- GPBWireFormatLengthDelimited))
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/SourceContext.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/SourceContext.pbobjc.h
deleted file mode 100644
index e4923959e..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/SourceContext.pbobjc.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/source_context.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - GPBSourceContextRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBSourceContextRoot : GPBRootObject
-@end
-
-#pragma mark - GPBSourceContext
-
-typedef GPB_ENUM(GPBSourceContext_FieldNumber) {
- GPBSourceContext_FieldNumber_FileName = 1,
-};
-
-/**
- * `SourceContext` represents information about the source of a
- * protobuf element, like the file in which it is defined.
- **/
-@interface GPBSourceContext : GPBMessage
-
-/**
- * The path-qualified name of the .proto file that contained the associated
- * protobuf element. For example: `"google/protobuf/source_context.proto"`.
- **/
-@property(nonatomic, readwrite, copy, null_resettable) NSString *fileName;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Struct.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Struct.pbobjc.h
deleted file mode 100644
index fb2042519..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Struct.pbobjc.h
+++ /dev/null
@@ -1,204 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/struct.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-@class GPBListValue;
-@class GPBStruct;
-@class GPBValue;
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - Enum GPBNullValue
-
-/**
- * `NullValue` is a singleton enumeration to represent the null value for the
- * `Value` type union.
- *
- * The JSON representation for `NullValue` is JSON `null`.
- **/
-typedef GPB_ENUM(GPBNullValue) {
- /**
- * Value used if any message's field encounters a value that is not defined
- * by this enum. The message will also have C functions to get/set the rawValue
- * of the field.
- **/
- GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
- /** Null value. */
- GPBNullValue_NullValue = 0,
-};
-
-GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void);
-
-/**
- * Checks to see if the given value is defined by the enum or was not known at
- * the time this source was generated.
- **/
-BOOL GPBNullValue_IsValidValue(int32_t value);
-
-#pragma mark - GPBStructRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBStructRoot : GPBRootObject
-@end
-
-#pragma mark - GPBStruct
-
-typedef GPB_ENUM(GPBStruct_FieldNumber) {
- GPBStruct_FieldNumber_Fields = 1,
-};
-
-/**
- * `Struct` represents a structured data value, consisting of fields
- * which map to dynamically typed values. In some languages, `Struct`
- * might be supported by a native representation. For example, in
- * scripting languages like JS a struct is represented as an
- * object. The details of that representation are described together
- * with the proto support for the language.
- *
- * The JSON representation for `Struct` is JSON object.
- **/
-@interface GPBStruct : GPBMessage
-
-/** Unordered map of dynamically typed values. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, GPBValue*> *fields;
-/** The number of items in @c fields without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger fields_Count;
-
-@end
-
-#pragma mark - GPBValue
-
-typedef GPB_ENUM(GPBValue_FieldNumber) {
- GPBValue_FieldNumber_NullValue = 1,
- GPBValue_FieldNumber_NumberValue = 2,
- GPBValue_FieldNumber_StringValue = 3,
- GPBValue_FieldNumber_BoolValue = 4,
- GPBValue_FieldNumber_StructValue = 5,
- GPBValue_FieldNumber_ListValue = 6,
-};
-
-typedef GPB_ENUM(GPBValue_Kind_OneOfCase) {
- GPBValue_Kind_OneOfCase_GPBUnsetOneOfCase = 0,
- GPBValue_Kind_OneOfCase_NullValue = 1,
- GPBValue_Kind_OneOfCase_NumberValue = 2,
- GPBValue_Kind_OneOfCase_StringValue = 3,
- GPBValue_Kind_OneOfCase_BoolValue = 4,
- GPBValue_Kind_OneOfCase_StructValue = 5,
- GPBValue_Kind_OneOfCase_ListValue = 6,
-};
-
-/**
- * `Value` represents a dynamically typed value which can be either
- * null, a number, a string, a boolean, a recursive struct value, or a
- * list of values. A producer of value is expected to set one of that
- * variants, absence of any variant indicates an error.
- *
- * The JSON representation for `Value` is JSON value.
- **/
-@interface GPBValue : GPBMessage
-
-/** The kind of value. */
-@property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase;
-
-/** Represents a null value. */
-@property(nonatomic, readwrite) GPBNullValue nullValue;
-
-/** Represents a double value. */
-@property(nonatomic, readwrite) double numberValue;
-
-/** Represents a string value. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue;
-
-/** Represents a boolean value. */
-@property(nonatomic, readwrite) BOOL boolValue;
-
-/** Represents a structured value. */
-@property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue;
-
-/** Represents a repeated `Value`. */
-@property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue;
-
-@end
-
-/**
- * Fetches the raw value of a @c GPBValue's @c nullValue property, even
- * if the value was not defined by the enum at the time the code was generated.
- **/
-int32_t GPBValue_NullValue_RawValue(GPBValue *message);
-/**
- * Sets the raw value of an @c GPBValue's @c nullValue property, allowing
- * it to be set to a value that was not defined by the enum at the time the code
- * was generated.
- **/
-void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value);
-
-/**
- * Clears whatever value was set for the oneof 'kind'.
- **/
-void GPBValue_ClearKindOneOfCase(GPBValue *message);
-
-#pragma mark - GPBListValue
-
-typedef GPB_ENUM(GPBListValue_FieldNumber) {
- GPBListValue_FieldNumber_ValuesArray = 1,
-};
-
-/**
- * `ListValue` is a wrapper around a repeated field of values.
- *
- * The JSON representation for `ListValue` is JSON array.
- **/
-@interface GPBListValue : GPBMessage
-
-/** Repeated field of dynamically typed values. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBValue*> *valuesArray;
-/** The number of items in @c valuesArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger valuesArray_Count;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Timestamp.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Timestamp.pbobjc.h
deleted file mode 100644
index 2c4b8b205..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Timestamp.pbobjc.h
+++ /dev/null
@@ -1,163 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/timestamp.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - GPBTimestampRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBTimestampRoot : GPBRootObject
-@end
-
-#pragma mark - GPBTimestamp
-
-typedef GPB_ENUM(GPBTimestamp_FieldNumber) {
- GPBTimestamp_FieldNumber_Seconds = 1,
- GPBTimestamp_FieldNumber_Nanos = 2,
-};
-
-/**
- * A Timestamp represents a point in time independent of any time zone
- * or calendar, represented as seconds and fractions of seconds at
- * nanosecond resolution in UTC Epoch time. It is encoded using the
- * Proleptic Gregorian Calendar which extends the Gregorian calendar
- * backwards to year one. It is encoded assuming all minutes are 60
- * seconds long, i.e. leap seconds are "smeared" so that no leap second
- * table is needed for interpretation. Range is from
- * 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
- * By restricting to that range, we ensure that we can convert to
- * and from RFC 3339 date strings.
- * See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
- *
- * # Examples
- *
- * Example 1: Compute Timestamp from POSIX `time()`.
- *
- * Timestamp timestamp;
- * timestamp.set_seconds(time(NULL));
- * timestamp.set_nanos(0);
- *
- * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
- *
- * struct timeval tv;
- * gettimeofday(&tv, NULL);
- *
- * Timestamp timestamp;
- * timestamp.set_seconds(tv.tv_sec);
- * timestamp.set_nanos(tv.tv_usec * 1000);
- *
- * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
- *
- * FILETIME ft;
- * GetSystemTimeAsFileTime(&ft);
- * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
- *
- * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
- * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
- * Timestamp timestamp;
- * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
- * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
- *
- * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
- *
- * long millis = System.currentTimeMillis();
- *
- * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
- * .setNanos((int) ((millis % 1000) * 1000000)).build();
- *
- *
- * Example 5: Compute Timestamp from current time in Python.
- *
- * timestamp = Timestamp()
- * timestamp.GetCurrentTime()
- *
- * # JSON Mapping
- *
- * In JSON format, the Timestamp type is encoded as a string in the
- * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
- * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
- * where {year} is always expressed using four digits while {month}, {day},
- * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
- * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
- * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
- * is required. A proto3 JSON serializer should always use UTC (as indicated by
- * "Z") when printing the Timestamp type and a proto3 JSON parser should be
- * able to accept both UTC and other timezones (as indicated by an offset).
- *
- * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
- * 01:30 UTC on January 15, 2017.
- *
- * In JavaScript, one can convert a Date object to this format using the
- * standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
- * method. In Python, a standard `datetime.datetime` object can be converted
- * to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
- * with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
- * can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
- * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
- * ) to obtain a formatter capable of generating timestamps in this format.
- **/
-@interface GPBTimestamp : GPBMessage
-
-/**
- * Represents seconds of UTC time since Unix epoch
- * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
- * 9999-12-31T23:59:59Z inclusive.
- **/
-@property(nonatomic, readwrite) int64_t seconds;
-
-/**
- * Non-negative fractions of a second at nanosecond resolution. Negative
- * second values with fractions must still have non-negative nanos values
- * that count forward in time. Must be from 0 to 999,999,999
- * inclusive.
- **/
-@property(nonatomic, readwrite) int32_t nanos;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Type.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Type.pbobjc.h
deleted file mode 100644
index e14d15df6..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Type.pbobjc.h
+++ /dev/null
@@ -1,444 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/type.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-@class GPBAny;
-@class GPBEnumValue;
-@class GPBField;
-@class GPBOption;
-@class GPBSourceContext;
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - Enum GPBSyntax
-
-/** The syntax in which a protocol buffer element is defined. */
-typedef GPB_ENUM(GPBSyntax) {
- /**
- * Value used if any message's field encounters a value that is not defined
- * by this enum. The message will also have C functions to get/set the rawValue
- * of the field.
- **/
- GPBSyntax_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
- /** Syntax `proto2`. */
- GPBSyntax_SyntaxProto2 = 0,
-
- /** Syntax `proto3`. */
- GPBSyntax_SyntaxProto3 = 1,
-};
-
-GPBEnumDescriptor *GPBSyntax_EnumDescriptor(void);
-
-/**
- * Checks to see if the given value is defined by the enum or was not known at
- * the time this source was generated.
- **/
-BOOL GPBSyntax_IsValidValue(int32_t value);
-
-#pragma mark - Enum GPBField_Kind
-
-/** Basic field types. */
-typedef GPB_ENUM(GPBField_Kind) {
- /**
- * Value used if any message's field encounters a value that is not defined
- * by this enum. The message will also have C functions to get/set the rawValue
- * of the field.
- **/
- GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
- /** Field type unknown. */
- GPBField_Kind_TypeUnknown = 0,
-
- /** Field type double. */
- GPBField_Kind_TypeDouble = 1,
-
- /** Field type float. */
- GPBField_Kind_TypeFloat = 2,
-
- /** Field type int64. */
- GPBField_Kind_TypeInt64 = 3,
-
- /** Field type uint64. */
- GPBField_Kind_TypeUint64 = 4,
-
- /** Field type int32. */
- GPBField_Kind_TypeInt32 = 5,
-
- /** Field type fixed64. */
- GPBField_Kind_TypeFixed64 = 6,
-
- /** Field type fixed32. */
- GPBField_Kind_TypeFixed32 = 7,
-
- /** Field type bool. */
- GPBField_Kind_TypeBool = 8,
-
- /** Field type string. */
- GPBField_Kind_TypeString = 9,
-
- /** Field type group. Proto2 syntax only, and deprecated. */
- GPBField_Kind_TypeGroup = 10,
-
- /** Field type message. */
- GPBField_Kind_TypeMessage = 11,
-
- /** Field type bytes. */
- GPBField_Kind_TypeBytes = 12,
-
- /** Field type uint32. */
- GPBField_Kind_TypeUint32 = 13,
-
- /** Field type enum. */
- GPBField_Kind_TypeEnum = 14,
-
- /** Field type sfixed32. */
- GPBField_Kind_TypeSfixed32 = 15,
-
- /** Field type sfixed64. */
- GPBField_Kind_TypeSfixed64 = 16,
-
- /** Field type sint32. */
- GPBField_Kind_TypeSint32 = 17,
-
- /** Field type sint64. */
- GPBField_Kind_TypeSint64 = 18,
-};
-
-GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void);
-
-/**
- * Checks to see if the given value is defined by the enum or was not known at
- * the time this source was generated.
- **/
-BOOL GPBField_Kind_IsValidValue(int32_t value);
-
-#pragma mark - Enum GPBField_Cardinality
-
-/** Whether a field is optional, required, or repeated. */
-typedef GPB_ENUM(GPBField_Cardinality) {
- /**
- * Value used if any message's field encounters a value that is not defined
- * by this enum. The message will also have C functions to get/set the rawValue
- * of the field.
- **/
- GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
- /** For fields with unknown cardinality. */
- GPBField_Cardinality_CardinalityUnknown = 0,
-
- /** For optional fields. */
- GPBField_Cardinality_CardinalityOptional = 1,
-
- /** For required fields. Proto2 syntax only. */
- GPBField_Cardinality_CardinalityRequired = 2,
-
- /** For repeated fields. */
- GPBField_Cardinality_CardinalityRepeated = 3,
-};
-
-GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void);
-
-/**
- * Checks to see if the given value is defined by the enum or was not known at
- * the time this source was generated.
- **/
-BOOL GPBField_Cardinality_IsValidValue(int32_t value);
-
-#pragma mark - GPBTypeRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBTypeRoot : GPBRootObject
-@end
-
-#pragma mark - GPBType
-
-typedef GPB_ENUM(GPBType_FieldNumber) {
- GPBType_FieldNumber_Name = 1,
- GPBType_FieldNumber_FieldsArray = 2,
- GPBType_FieldNumber_OneofsArray = 3,
- GPBType_FieldNumber_OptionsArray = 4,
- GPBType_FieldNumber_SourceContext = 5,
- GPBType_FieldNumber_Syntax = 6,
-};
-
-/**
- * A protocol buffer message type.
- **/
-@interface GPBType : GPBMessage
-
-/** The fully qualified message name. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-
-/** The list of fields. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBField*> *fieldsArray;
-/** The number of items in @c fieldsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger fieldsArray_Count;
-
-/** The list of types appearing in `oneof` definitions in this type. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *oneofsArray;
-/** The number of items in @c oneofsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger oneofsArray_Count;
-
-/** The protocol buffer options. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
-/** The number of items in @c optionsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger optionsArray_Count;
-
-/** The source context. */
-@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
-/** Test to see if @c sourceContext has been set. */
-@property(nonatomic, readwrite) BOOL hasSourceContext;
-
-/** The source syntax. */
-@property(nonatomic, readwrite) GPBSyntax syntax;
-
-@end
-
-/**
- * Fetches the raw value of a @c GPBType's @c syntax property, even
- * if the value was not defined by the enum at the time the code was generated.
- **/
-int32_t GPBType_Syntax_RawValue(GPBType *message);
-/**
- * Sets the raw value of an @c GPBType's @c syntax property, allowing
- * it to be set to a value that was not defined by the enum at the time the code
- * was generated.
- **/
-void SetGPBType_Syntax_RawValue(GPBType *message, int32_t value);
-
-#pragma mark - GPBField
-
-typedef GPB_ENUM(GPBField_FieldNumber) {
- GPBField_FieldNumber_Kind = 1,
- GPBField_FieldNumber_Cardinality = 2,
- GPBField_FieldNumber_Number = 3,
- GPBField_FieldNumber_Name = 4,
- GPBField_FieldNumber_TypeURL = 6,
- GPBField_FieldNumber_OneofIndex = 7,
- GPBField_FieldNumber_Packed = 8,
- GPBField_FieldNumber_OptionsArray = 9,
- GPBField_FieldNumber_JsonName = 10,
- GPBField_FieldNumber_DefaultValue = 11,
-};
-
-/**
- * A single field of a message type.
- **/
-@interface GPBField : GPBMessage
-
-/** The field type. */
-@property(nonatomic, readwrite) GPBField_Kind kind;
-
-/** The field cardinality. */
-@property(nonatomic, readwrite) GPBField_Cardinality cardinality;
-
-/** The field number. */
-@property(nonatomic, readwrite) int32_t number;
-
-/** The field name. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-
-/**
- * The field type URL, without the scheme, for message or enumeration
- * types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
- **/
-@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
-
-/**
- * The index of the field type in `Type.oneofs`, for message or enumeration
- * types. The first type has index 1; zero means the type is not in the list.
- **/
-@property(nonatomic, readwrite) int32_t oneofIndex;
-
-/** Whether to use alternative packed wire representation. */
-@property(nonatomic, readwrite) BOOL packed;
-
-/** The protocol buffer options. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
-/** The number of items in @c optionsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger optionsArray_Count;
-
-/** The field JSON name. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *jsonName;
-
-/** The string value of the default value of this field. Proto2 syntax only. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *defaultValue;
-
-@end
-
-/**
- * Fetches the raw value of a @c GPBField's @c kind property, even
- * if the value was not defined by the enum at the time the code was generated.
- **/
-int32_t GPBField_Kind_RawValue(GPBField *message);
-/**
- * Sets the raw value of an @c GPBField's @c kind property, allowing
- * it to be set to a value that was not defined by the enum at the time the code
- * was generated.
- **/
-void SetGPBField_Kind_RawValue(GPBField *message, int32_t value);
-
-/**
- * Fetches the raw value of a @c GPBField's @c cardinality property, even
- * if the value was not defined by the enum at the time the code was generated.
- **/
-int32_t GPBField_Cardinality_RawValue(GPBField *message);
-/**
- * Sets the raw value of an @c GPBField's @c cardinality property, allowing
- * it to be set to a value that was not defined by the enum at the time the code
- * was generated.
- **/
-void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value);
-
-#pragma mark - GPBEnum
-
-typedef GPB_ENUM(GPBEnum_FieldNumber) {
- GPBEnum_FieldNumber_Name = 1,
- GPBEnum_FieldNumber_EnumvalueArray = 2,
- GPBEnum_FieldNumber_OptionsArray = 3,
- GPBEnum_FieldNumber_SourceContext = 4,
- GPBEnum_FieldNumber_Syntax = 5,
-};
-
-/**
- * Enum type definition.
- **/
-@interface GPBEnum : GPBMessage
-
-/** Enum type name. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-
-/** Enum value definitions. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBEnumValue*> *enumvalueArray;
-/** The number of items in @c enumvalueArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger enumvalueArray_Count;
-
-/** Protocol buffer options. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
-/** The number of items in @c optionsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger optionsArray_Count;
-
-/** The source context. */
-@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
-/** Test to see if @c sourceContext has been set. */
-@property(nonatomic, readwrite) BOOL hasSourceContext;
-
-/** The source syntax. */
-@property(nonatomic, readwrite) GPBSyntax syntax;
-
-@end
-
-/**
- * Fetches the raw value of a @c GPBEnum's @c syntax property, even
- * if the value was not defined by the enum at the time the code was generated.
- **/
-int32_t GPBEnum_Syntax_RawValue(GPBEnum *message);
-/**
- * Sets the raw value of an @c GPBEnum's @c syntax property, allowing
- * it to be set to a value that was not defined by the enum at the time the code
- * was generated.
- **/
-void SetGPBEnum_Syntax_RawValue(GPBEnum *message, int32_t value);
-
-#pragma mark - GPBEnumValue
-
-typedef GPB_ENUM(GPBEnumValue_FieldNumber) {
- GPBEnumValue_FieldNumber_Name = 1,
- GPBEnumValue_FieldNumber_Number = 2,
- GPBEnumValue_FieldNumber_OptionsArray = 3,
-};
-
-/**
- * Enum value definition.
- **/
-@interface GPBEnumValue : GPBMessage
-
-/** Enum value name. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-
-/** Enum value number. */
-@property(nonatomic, readwrite) int32_t number;
-
-/** Protocol buffer options. */
-@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
-/** The number of items in @c optionsArray without causing the array to be created. */
-@property(nonatomic, readonly) NSUInteger optionsArray_Count;
-
-@end
-
-#pragma mark - GPBOption
-
-typedef GPB_ENUM(GPBOption_FieldNumber) {
- GPBOption_FieldNumber_Name = 1,
- GPBOption_FieldNumber_Value = 2,
-};
-
-/**
- * A protocol buffer option, which can be attached to a message, field,
- * enumeration, etc.
- **/
-@interface GPBOption : GPBMessage
-
-/**
- * The option's name. For protobuf built-in options (options defined in
- * descriptor.proto), this is the short name. For example, `"map_entry"`.
- * For custom options, it should be the fully-qualified name. For example,
- * `"google.api.http"`.
- **/
-@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
-
-/**
- * The option's value packed in an Any message. If the value is a primitive,
- * the corresponding wrapper type defined in google/protobuf/wrappers.proto
- * should be used. If the value is an enum, it should be stored as an int32
- * value using the google.protobuf.Int32Value type.
- **/
-@property(nonatomic, readwrite, strong, null_resettable) GPBAny *value;
-/** Test to see if @c value has been set. */
-@property(nonatomic, readwrite) BOOL hasValue;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Wrappers.pbobjc.h b/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Wrappers.pbobjc.h
deleted file mode 100644
index 0411e1ec0..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Headers/Wrappers.pbobjc.h
+++ /dev/null
@@ -1,219 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: google/protobuf/wrappers.proto
-
-// This CPP symbol can be defined to use imports that match up to the framework
-// imports needed when using CocoaPods.
-#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
- #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
-#endif
-
-#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
- #import <Protobuf/GPBDescriptor.h>
- #import <Protobuf/GPBMessage.h>
- #import <Protobuf/GPBRootObject.h>
-#else
- #import "GPBDescriptor.h"
- #import "GPBMessage.h"
- #import "GPBRootObject.h"
-#endif
-
-#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
-#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
-#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
-#endif
-
-// @@protoc_insertion_point(imports)
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-
-CF_EXTERN_C_BEGIN
-
-NS_ASSUME_NONNULL_BEGIN
-
-#pragma mark - GPBWrappersRoot
-
-/**
- * Exposes the extension registry for this file.
- *
- * The base class provides:
- * @code
- * + (GPBExtensionRegistry *)extensionRegistry;
- * @endcode
- * which is a @c GPBExtensionRegistry that includes all the extensions defined by
- * this file and all files that it depends on.
- **/
-@interface GPBWrappersRoot : GPBRootObject
-@end
-
-#pragma mark - GPBDoubleValue
-
-typedef GPB_ENUM(GPBDoubleValue_FieldNumber) {
- GPBDoubleValue_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `double`.
- *
- * The JSON representation for `DoubleValue` is JSON number.
- **/
-@interface GPBDoubleValue : GPBMessage
-
-/** The double value. */
-@property(nonatomic, readwrite) double value;
-
-@end
-
-#pragma mark - GPBFloatValue
-
-typedef GPB_ENUM(GPBFloatValue_FieldNumber) {
- GPBFloatValue_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `float`.
- *
- * The JSON representation for `FloatValue` is JSON number.
- **/
-@interface GPBFloatValue : GPBMessage
-
-/** The float value. */
-@property(nonatomic, readwrite) float value;
-
-@end
-
-#pragma mark - GPBInt64Value
-
-typedef GPB_ENUM(GPBInt64Value_FieldNumber) {
- GPBInt64Value_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `int64`.
- *
- * The JSON representation for `Int64Value` is JSON string.
- **/
-@interface GPBInt64Value : GPBMessage
-
-/** The int64 value. */
-@property(nonatomic, readwrite) int64_t value;
-
-@end
-
-#pragma mark - GPBUInt64Value
-
-typedef GPB_ENUM(GPBUInt64Value_FieldNumber) {
- GPBUInt64Value_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `uint64`.
- *
- * The JSON representation for `UInt64Value` is JSON string.
- **/
-@interface GPBUInt64Value : GPBMessage
-
-/** The uint64 value. */
-@property(nonatomic, readwrite) uint64_t value;
-
-@end
-
-#pragma mark - GPBInt32Value
-
-typedef GPB_ENUM(GPBInt32Value_FieldNumber) {
- GPBInt32Value_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `int32`.
- *
- * The JSON representation for `Int32Value` is JSON number.
- **/
-@interface GPBInt32Value : GPBMessage
-
-/** The int32 value. */
-@property(nonatomic, readwrite) int32_t value;
-
-@end
-
-#pragma mark - GPBUInt32Value
-
-typedef GPB_ENUM(GPBUInt32Value_FieldNumber) {
- GPBUInt32Value_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `uint32`.
- *
- * The JSON representation for `UInt32Value` is JSON number.
- **/
-@interface GPBUInt32Value : GPBMessage
-
-/** The uint32 value. */
-@property(nonatomic, readwrite) uint32_t value;
-
-@end
-
-#pragma mark - GPBBoolValue
-
-typedef GPB_ENUM(GPBBoolValue_FieldNumber) {
- GPBBoolValue_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `bool`.
- *
- * The JSON representation for `BoolValue` is JSON `true` and `false`.
- **/
-@interface GPBBoolValue : GPBMessage
-
-/** The bool value. */
-@property(nonatomic, readwrite) BOOL value;
-
-@end
-
-#pragma mark - GPBStringValue
-
-typedef GPB_ENUM(GPBStringValue_FieldNumber) {
- GPBStringValue_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `string`.
- *
- * The JSON representation for `StringValue` is JSON string.
- **/
-@interface GPBStringValue : GPBMessage
-
-/** The string value. */
-@property(nonatomic, readwrite, copy, null_resettable) NSString *value;
-
-@end
-
-#pragma mark - GPBBytesValue
-
-typedef GPB_ENUM(GPBBytesValue_FieldNumber) {
- GPBBytesValue_FieldNumber_Value = 1,
-};
-
-/**
- * Wrapper message for `bytes`.
- *
- * The JSON representation for `BytesValue` is JSON string.
- **/
-@interface GPBBytesValue : GPBMessage
-
-/** The bytes value. */
-@property(nonatomic, readwrite, copy, null_resettable) NSData *value;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-CF_EXTERN_C_END
-
-#pragma clang diagnostic pop
-
-// @@protoc_insertion_point(global_scope)
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Modules/module.modulemap b/Libraries external/Firebase/Messaging/Protobuf.framework/Modules/module.modulemap
deleted file mode 100644
index 8b1cb3fb4..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Modules/module.modulemap
+++ /dev/null
@@ -1,5 +0,0 @@
-framework module Protobuf {
- umbrella header "Protobuf.h"
- export *
- module * { export *}
-}
diff --git a/Libraries external/Firebase/Messaging/Protobuf.framework/Protobuf b/Libraries external/Firebase/Messaging/Protobuf.framework/Protobuf
deleted file mode 100644
index 0edcf0801..000000000
--- a/Libraries external/Firebase/Messaging/Protobuf.framework/Protobuf
+++ /dev/null
Binary files differ
diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj
index b5f8d0292..2458648f0 100644
--- a/Nextcloud.xcodeproj/project.pbxproj
+++ b/Nextcloud.xcodeproj/project.pbxproj
@@ -9,18 +9,6 @@
/* Begin PBXBuildFile section */
F700222C1EC479840080073F /* Custom.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F700222B1EC479840080073F /* Custom.xcassets */; };
F700222D1EC479840080073F /* Custom.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F700222B1EC479840080073F /* Custom.xcassets */; };
- F70022A11EC4C9100080073F /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225A1EC4C9100080073F /* AFHTTPSessionManager.m */; };
- F70022A21EC4C9100080073F /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225A1EC4C9100080073F /* AFHTTPSessionManager.m */; };
- F70022A41EC4C9100080073F /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225D1EC4C9100080073F /* AFNetworkReachabilityManager.m */; };
- F70022A51EC4C9100080073F /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225D1EC4C9100080073F /* AFNetworkReachabilityManager.m */; };
- F70022A71EC4C9100080073F /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225F1EC4C9100080073F /* AFSecurityPolicy.m */; };
- F70022A81EC4C9100080073F /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225F1EC4C9100080073F /* AFSecurityPolicy.m */; };
- F70022AA1EC4C9100080073F /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022611EC4C9100080073F /* AFURLRequestSerialization.m */; };
- F70022AB1EC4C9100080073F /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022611EC4C9100080073F /* AFURLRequestSerialization.m */; };
- F70022AD1EC4C9100080073F /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022631EC4C9100080073F /* AFURLResponseSerialization.m */; };
- F70022AE1EC4C9100080073F /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022631EC4C9100080073F /* AFURLResponseSerialization.m */; };
- F70022B01EC4C9100080073F /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022651EC4C9100080073F /* AFURLSessionManager.m */; };
- F70022B11EC4C9100080073F /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022651EC4C9100080073F /* AFURLSessionManager.m */; };
F70022B31EC4C9100080073F /* OCActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022671EC4C9100080073F /* OCActivity.m */; };
F70022B41EC4C9100080073F /* OCActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022671EC4C9100080073F /* OCActivity.m */; };
F70022B61EC4C9100080073F /* OCCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022691EC4C9100080073F /* OCCapabilities.m */; };
@@ -75,6 +63,7 @@
F70BFC7420E0FA7D00C67599 /* NCUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70BFC7320E0FA7C00C67599 /* NCUtility.swift */; };
F70BFC7520E0FA7D00C67599 /* NCUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70BFC7320E0FA7C00C67599 /* NCUtility.swift */; };
F70CAE3A1F8CF31A008125FD /* NCEndToEndEncryption.m in Sources */ = {isa = PBXBuildFile; fileRef = F70CAE391F8CF31A008125FD /* NCEndToEndEncryption.m */; };
+ F70F2BA5225F2D8900EBB73E /* ZIPFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F70F2BA4225F2D8900EBB73E /* ZIPFoundation.framework */; };
F710E8101EF95C9C00DC2427 /* CCIntro.m in Sources */ = {isa = PBXBuildFile; fileRef = F710E80E1EF95C9C00DC2427 /* CCIntro.m */; };
F710E8111EF95C9C00DC2427 /* ImagesIntro.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F710E80F1EF95C9C00DC2427 /* ImagesIntro.xcassets */; };
F71459B81D12E3B700CAFEEC /* CCError.m in Sources */ = {isa = PBXBuildFile; fileRef = F76C3B881C638A4C00DC4301 /* CCError.m */; };
@@ -97,21 +86,14 @@
F7169A1D1EE590930086BD69 /* NCSharesCell.m in Sources */ = {isa = PBXBuildFile; fileRef = F7169A1A1EE590930086BD69 /* NCSharesCell.m */; };
F7169A1E1EE590930086BD69 /* NCSharesCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7169A1B1EE590930086BD69 /* NCSharesCell.xib */; };
F7226EDC1EE4089300EBECB1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F7226EDB1EE4089300EBECB1 /* Main.storyboard */; };
+ F7267A82225DFCE100D6DB7D /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7267A81225DFCE100D6DB7D /* AFNetworking.framework */; };
+ F7267A83225DFCE800D6DB7D /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7267A81225DFCE100D6DB7D /* AFNetworking.framework */; };
+ F7267A84225DFCEC00D6DB7D /* AFNetworking.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7267A81225DFCE100D6DB7D /* AFNetworking.framework */; };
F726EEEC1FED1C820030B9C8 /* NCEndToEndInitialize.swift in Sources */ = {isa = PBXBuildFile; fileRef = F726EEEB1FED1C820030B9C8 /* NCEndToEndInitialize.swift */; };
F729B92B217A2E4E00FE2150 /* NCActionSheetHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = F729B92A217A2E4E00FE2150 /* NCActionSheetHeaderView.xib */; };
F729B92D217A2F1B00FE2150 /* NCActionSheetHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F729B92C217A2F1B00FE2150 /* NCActionSheetHeaderView.swift */; };
F72AAECA1E5C60C700BB17E1 /* AHKActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = F72AAEC31E5C60C700BB17E1 /* AHKActionSheet.m */; };
F72AAECB1E5C60C700BB17E1 /* AHKActionSheetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F72AAEC51E5C60C700BB17E1 /* AHKActionSheetViewController.m */; };
- F72D0FF9210B6638009C96B7 /* Protobuf.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FEF210B6638009C96B7 /* Protobuf.framework */; };
- F72D0FFA210B6638009C96B7 /* FirebaseMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FF0210B6638009C96B7 /* FirebaseMessaging.framework */; };
- F72D0FFB210B6638009C96B7 /* FirebaseCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FF2210B6638009C96B7 /* FirebaseCore.framework */; };
- F72D0FFC210B6638009C96B7 /* FirebaseAnalytics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FF3210B6638009C96B7 /* FirebaseAnalytics.framework */; };
- F72D0FFD210B6638009C96B7 /* GoogleToolboxForMac.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FF4210B6638009C96B7 /* GoogleToolboxForMac.framework */; };
- F72D0FFE210B6638009C96B7 /* nanopb.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FF5210B6638009C96B7 /* nanopb.framework */; };
- F72D0FFF210B6638009C96B7 /* FirebaseNanoPB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FF6210B6638009C96B7 /* FirebaseNanoPB.framework */; };
- F72D1000210B6638009C96B7 /* FirebaseInstanceID.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FF7210B6638009C96B7 /* FirebaseInstanceID.framework */; };
- F72D1001210B6638009C96B7 /* FirebaseCoreDiagnostics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72D0FF8210B6638009C96B7 /* FirebaseCoreDiagnostics.framework */; };
- F72D1003210B67CE009C96B7 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = F72D1002210B67CE009C96B7 /* GoogleService-Info.plist */; };
F72D1007210B6882009C96B7 /* NCPushNotificationEncryption.m in Sources */ = {isa = PBXBuildFile; fileRef = F72D1005210B6882009C96B7 /* NCPushNotificationEncryption.m */; };
F72E0B9D21AD60BC00898D7B /* WeScan.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F72E0B9C21AD60BC00898D7B /* WeScan.framework */; };
F732BA061D76CE1500E9878B /* CCNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = F732BA041D76CE1500E9878B /* CCNetworking.m */; };
@@ -184,19 +166,6 @@
F73D71641F2674A400E233EB /* NCText.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F73D71631F2674A400E233EB /* NCText.storyboard */; };
F73F537F1E929C8500F8678D /* CCMore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73F537E1E929C8500F8678D /* CCMore.swift */; };
F7417DB3216CE925007D05F5 /* NCTrashSectionHeaderFooter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7417DB2216CE925007D05F5 /* NCTrashSectionHeaderFooter.swift */; };
- F7425B2B224B846E009A3857 /* NotificationService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7425B2A224B846E009A3857 /* NotificationService.swift */; };
- F7425B2F224B846E009A3857 /* Notification Service Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = F7425B28224B846E009A3857 /* Notification Service Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
- F7425B35224B871B009A3857 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F70A63071D5B3467004E2AA5 /* libssl.a */; };
- F7425B36224B872B009A3857 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F70A63061D5B3467004E2AA5 /* libcrypto.a */; };
- F7425B37224B89D2009A3857 /* NCDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7BAADB41ED5A87C00B7EAD4 /* NCDatabase.swift */; };
- F7425B38224B89D6009A3857 /* NCManageDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7BAADB51ED5A87C00B7EAD4 /* NCManageDatabase.swift */; };
- F7425B39224B89FE009A3857 /* CCUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = F7053E3D1C639DF500741EA5 /* CCUtility.m */; };
- F7425B3A224B8A23009A3857 /* NCPushNotificationEncryption.m in Sources */ = {isa = PBXBuildFile; fileRef = F72D1005210B6882009C96B7 /* NCPushNotificationEncryption.m */; };
- F7425B3B224B8A9B009A3857 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
- F7425B3C224B8CDD009A3857 /* NCEndToEndEncryption.m in Sources */ = {isa = PBXBuildFile; fileRef = F70CAE391F8CF31A008125FD /* NCEndToEndEncryption.m */; };
- F7425B3D224B8D4D009A3857 /* NCRichDocumentTemplate.m in Sources */ = {isa = PBXBuildFile; fileRef = F7DFB7DF219C312D00680748 /* NCRichDocumentTemplate.m */; };
- F7425B3E224B8D54009A3857 /* OCActivity.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022671EC4C9100080073F /* OCActivity.m */; };
- F7425B43224B8D73009A3857 /* OCSharedDto.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022791EC4C9100080073F /* OCSharedDto.m */; };
F7434B3420E23FD700417916 /* NCDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7BAADB41ED5A87C00B7EAD4 /* NCDatabase.swift */; };
F7434B3620E23FE000417916 /* NCManageDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7BAADB51ED5A87C00B7EAD4 /* NCManageDatabase.swift */; };
F7434B3720E23FF200417916 /* NCUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = F70BFC7320E0FA7C00C67599 /* NCUtility.swift */; };
@@ -212,12 +181,6 @@
F7434B4220E2405500417916 /* OCSharedDto.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022791EC4C9100080073F /* OCSharedDto.m */; };
F7434B4320E2405900417916 /* OCShareUser.m in Sources */ = {isa = PBXBuildFile; fileRef = F700227B1EC4C9100080073F /* OCShareUser.m */; };
F7434B4420E2405C00417916 /* OCUserProfile.m in Sources */ = {isa = PBXBuildFile; fileRef = F700227D1EC4C9100080073F /* OCUserProfile.m */; };
- F7434B4520E2406400417916 /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225A1EC4C9100080073F /* AFHTTPSessionManager.m */; };
- F7434B4620E2406900417916 /* AFNetworkReachabilityManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225D1EC4C9100080073F /* AFNetworkReachabilityManager.m */; };
- F7434B4720E2406C00417916 /* AFSecurityPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = F700225F1EC4C9100080073F /* AFSecurityPolicy.m */; };
- F7434B4820E2407000417916 /* AFURLRequestSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022611EC4C9100080073F /* AFURLRequestSerialization.m */; };
- F7434B4920E2407300417916 /* AFURLResponseSerialization.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022631EC4C9100080073F /* AFURLResponseSerialization.m */; };
- F7434B4A20E2407600417916 /* AFURLSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022651EC4C9100080073F /* AFURLSessionManager.m */; };
F7434B4B20E2408000417916 /* NSDate+ISO8601.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022801EC4C9100080073F /* NSDate+ISO8601.m */; };
F7434B4C20E2408300417916 /* NSDate+RFC1123.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022821EC4C9100080073F /* NSDate+RFC1123.m */; };
F7434B4D20E2408600417916 /* OCHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F70022841EC4C9100080073F /* OCHTTPRequestOperation.m */; };
@@ -355,7 +318,6 @@
F76B3CCE1EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
F76B3CCF1EAE01BD00921AC9 /* NCBrand.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */; };
F76C6F8E21943C8C0063591B /* NCActionSheetHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76C6F8D21943C8C0063591B /* NCActionSheetHeader.swift */; };
- F76E71E52244DF6900690001 /* Zip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F76E71E42244DF6900690001 /* Zip.framework */; };
F76E71E72244F48400690001 /* NCViewerImagemeter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F76E71E62244F48400690001 /* NCViewerImagemeter.swift */; };
F771E3D320E2392D00AFB62D /* FileProviderExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F771E3D220E2392D00AFB62D /* FileProviderExtension.swift */; };
F771E3D520E2392D00AFB62D /* FileProviderItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = F771E3D420E2392D00AFB62D /* FileProviderItem.swift */; };
@@ -415,10 +377,14 @@
F77B0F8A1D118A16002130FE /* CCCellMain.xib in Resources */ = {isa = PBXBuildFile; fileRef = F70211F61BAC56E9003FC03E /* CCCellMain.xib */; };
F77B0F8C1D118A16002130FE /* CCCellMainTransfer.xib in Resources */ = {isa = PBXBuildFile; fileRef = F70211F91BAC56E9003FC03E /* CCCellMainTransfer.xib */; };
F77D49A91DC238E500CDC568 /* loading.gif in Resources */ = {isa = PBXBuildFile; fileRef = F77D49A71DC238E500CDC568 /* loading.gif */; };
+ F77D9ACB22672CAD00C981EA /* HCEditProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = F77D9ACA22672CAD00C981EA /* HCEditProfile.swift */; };
F77EB6281EC08036003F814F /* CCExifGeo.m in Sources */ = {isa = PBXBuildFile; fileRef = F7A54C351C6267B500E2C8BF /* CCExifGeo.m */; };
F77EB62A1EC0B50A003F814F /* CCCertificate.m in Sources */ = {isa = PBXBuildFile; fileRef = F7F801011D98205A007537BC /* CCCertificate.m */; };
F78071091EDAB65800EAFFF6 /* NSNotificationCenter+MainThread.m in Sources */ = {isa = PBXBuildFile; fileRef = F78071081EDAB65800EAFFF6 /* NSNotificationCenter+MainThread.m */; };
F780710A1EDAB65800EAFFF6 /* NSNotificationCenter+MainThread.m in Sources */ = {isa = PBXBuildFile; fileRef = F78071081EDAB65800EAFFF6 /* NSNotificationCenter+MainThread.m */; };
+ F781996922636BFA00EBDF6A /* HCFeatures.m in Sources */ = {isa = PBXBuildFile; fileRef = F781996822636BFA00EBDF6A /* HCFeatures.m */; };
+ F781996A22636BFA00EBDF6A /* HCFeatures.m in Sources */ = {isa = PBXBuildFile; fileRef = F781996822636BFA00EBDF6A /* HCFeatures.m */; };
+ F781996B22636BFA00EBDF6A /* HCFeatures.m in Sources */ = {isa = PBXBuildFile; fileRef = F781996822636BFA00EBDF6A /* HCFeatures.m */; };
F78295311F962EFA00A572F5 /* NCEndToEndEncryption.m in Sources */ = {isa = PBXBuildFile; fileRef = F70CAE391F8CF31A008125FD /* NCEndToEndEncryption.m */; };
F78AA20621F783E900D0F205 /* SwiftRichString.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F78AA20521F783E900D0F205 /* SwiftRichString.framework */; };
F78ACD4021903CC20088454D /* NCGridCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F78ACD3F21903CC20088454D /* NCGridCell.swift */; };
@@ -620,13 +586,6 @@
remoteGlobalIDString = F71459B41D12E3B700CAFEEC;
remoteInfo = "Share Ext Nextcloud";
};
- F7425B2D224B846E009A3857 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = F7F67BA01A24D27800EE80DA /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = F7425B27224B846E009A3857;
- remoteInfo = "Notification Service Extension";
- };
F771E3E920E2392E00AFB62D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = F7F67BA01A24D27800EE80DA /* Project object */;
@@ -655,7 +614,6 @@
files = (
F771E3EB20E2392E00AFB62D /* File Provider Extension.appex in Embed App Extensions */,
F749E4E91DC1FB38009BA2FD /* Share.appex in Embed App Extensions */,
- F7425B2F224B846E009A3857 /* Notification Service Extension.appex in Embed App Extensions */,
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
@@ -669,19 +627,6 @@
08EA97461E6554FC004C83FA /* FirebaseInstanceID.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseInstanceID.framework; sourceTree = "<group>"; };
08EA97471E6554FC004C83FA /* GoogleToolboxForMac.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleToolboxForMac.framework; sourceTree = "<group>"; };
F700222B1EC479840080073F /* Custom.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Custom.xcassets; sourceTree = "<group>"; };
- F70022591EC4C9100080073F /* AFHTTPSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPSessionManager.h; sourceTree = "<group>"; };
- F700225A1EC4C9100080073F /* AFHTTPSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPSessionManager.m; sourceTree = "<group>"; };
- F700225B1EC4C9100080073F /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = "<group>"; };
- F700225C1EC4C9100080073F /* AFNetworkReachabilityManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkReachabilityManager.h; sourceTree = "<group>"; };
- F700225D1EC4C9100080073F /* AFNetworkReachabilityManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkReachabilityManager.m; sourceTree = "<group>"; };
- F700225E1EC4C9100080073F /* AFSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFSecurityPolicy.h; sourceTree = "<group>"; };
- F700225F1EC4C9100080073F /* AFSecurityPolicy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFSecurityPolicy.m; sourceTree = "<group>"; };
- F70022601EC4C9100080073F /* AFURLRequestSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLRequestSerialization.h; sourceTree = "<group>"; };
- F70022611EC4C9100080073F /* AFURLRequestSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLRequestSerialization.m; sourceTree = "<group>"; };
- F70022621EC4C9100080073F /* AFURLResponseSerialization.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLResponseSerialization.h; sourceTree = "<group>"; };
- F70022631EC4C9100080073F /* AFURLResponseSerialization.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLResponseSerialization.m; sourceTree = "<group>"; };
- F70022641EC4C9100080073F /* AFURLSessionManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLSessionManager.h; sourceTree = "<group>"; };
- F70022651EC4C9100080073F /* AFURLSessionManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLSessionManager.m; sourceTree = "<group>"; };
F70022661EC4C9100080073F /* OCActivity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCActivity.h; sourceTree = "<group>"; };
F70022671EC4C9100080073F /* OCActivity.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OCActivity.m; sourceTree = "<group>"; };
F70022681EC4C9100080073F /* OCCapabilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OCCapabilities.h; sourceTree = "<group>"; };
@@ -755,6 +700,7 @@
F70F05261C889184008DAB36 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
F70F05571C889184008DAB36 /* UIImage+animatedGIF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+animatedGIF.h"; sourceTree = "<group>"; };
F70F05581C889184008DAB36 /* UIImage+animatedGIF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+animatedGIF.m"; sourceTree = "<group>"; };
+ F70F2BA4225F2D8900EBB73E /* ZIPFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ZIPFoundation.framework; path = Carthage/Build/iOS/ZIPFoundation.framework; sourceTree = "<group>"; };
F710E80D1EF95C9C00DC2427 /* CCIntro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCIntro.h; sourceTree = "<group>"; };
F710E80E1EF95C9C00DC2427 /* CCIntro.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCIntro.m; sourceTree = "<group>"; };
F710E80F1EF95C9C00DC2427 /* ImagesIntro.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ImagesIntro.xcassets; sourceTree = "<group>"; };
@@ -768,6 +714,7 @@
F7169A4C1EE59C640086BD69 /* tr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = tr; path = tr.lproj/Localizable.strings; sourceTree = "<group>"; };
F7226EDB1EE4089300EBECB1 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
F7229B491DF71BB300E8C4E7 /* AUTHORS */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AUTHORS; sourceTree = SOURCE_ROOT; };
+ F7267A81225DFCE100D6DB7D /* AFNetworking.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AFNetworking.framework; path = Carthage/Build/iOS/AFNetworking.framework; sourceTree = "<group>"; };
F726EEEB1FED1C820030B9C8 /* NCEndToEndInitialize.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCEndToEndInitialize.swift; sourceTree = "<group>"; };
F7296A661C8880ED001A7809 /* CCloadItemData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCloadItemData.swift; sourceTree = "<group>"; };
F729B92A217A2E4E00FE2150 /* NCActionSheetHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCActionSheetHeaderView.xib; sourceTree = "<group>"; };
@@ -776,17 +723,6 @@
F72AAEC31E5C60C700BB17E1 /* AHKActionSheet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AHKActionSheet.m; sourceTree = "<group>"; };
F72AAEC41E5C60C700BB17E1 /* AHKActionSheetViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AHKActionSheetViewController.h; sourceTree = "<group>"; };
F72AAEC51E5C60C700BB17E1 /* AHKActionSheetViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AHKActionSheetViewController.m; sourceTree = "<group>"; };
- F72D0FEF210B6638009C96B7 /* Protobuf.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Protobuf.framework; sourceTree = "<group>"; };
- F72D0FF0210B6638009C96B7 /* FirebaseMessaging.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseMessaging.framework; sourceTree = "<group>"; };
- F72D0FF2210B6638009C96B7 /* FirebaseCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseCore.framework; sourceTree = "<group>"; };
- F72D0FF3210B6638009C96B7 /* FirebaseAnalytics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseAnalytics.framework; sourceTree = "<group>"; };
- F72D0FF4210B6638009C96B7 /* GoogleToolboxForMac.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleToolboxForMac.framework; sourceTree = "<group>"; };
- F72D0FF5210B6638009C96B7 /* nanopb.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = nanopb.framework; sourceTree = "<group>"; };
- F72D0FF6210B6638009C96B7 /* FirebaseNanoPB.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseNanoPB.framework; sourceTree = "<group>"; };
- F72D0FF7210B6638009C96B7 /* FirebaseInstanceID.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseInstanceID.framework; sourceTree = "<group>"; };
- F72D0FF8210B6638009C96B7 /* FirebaseCoreDiagnostics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseCoreDiagnostics.framework; sourceTree = "<group>"; };
- F72D1002210B67CE009C96B7 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = SOURCE_ROOT; };
- F72D1004210B6835009C96B7 /* Firebase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Firebase.h; sourceTree = "<group>"; };
F72D1005210B6882009C96B7 /* NCPushNotificationEncryption.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NCPushNotificationEncryption.m; sourceTree = "<group>"; };
F72D1006210B6882009C96B7 /* NCPushNotificationEncryption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NCPushNotificationEncryption.h; sourceTree = "<group>"; };
F72E0B9C21AD60BC00898D7B /* WeScan.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WeScan.framework; path = Carthage/Build/iOS/WeScan.framework; sourceTree = "<group>"; };
@@ -889,9 +825,6 @@
F73D71631F2674A400E233EB /* NCText.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCText.storyboard; sourceTree = "<group>"; };
F73F537E1E929C8500F8678D /* CCMore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCMore.swift; sourceTree = "<group>"; };
F7417DB2216CE925007D05F5 /* NCTrashSectionHeaderFooter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NCTrashSectionHeaderFooter.swift; sourceTree = "<group>"; };
- F7425B28224B846E009A3857 /* Notification Service Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "Notification Service Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; };
- F7425B2A224B846E009A3857 /* NotificationService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationService.swift; sourceTree = "<group>"; };
- F7425B33224B84BA009A3857 /* NotificationServiceExtension-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NotificationServiceExtension-Bridging-Header.h"; sourceTree = "<group>"; };
F7434B5F20E2440600417916 /* FileProviderExtension-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FileProviderExtension-Bridging-Header.h"; sourceTree = "<group>"; };
F743B2C31C95BBE8006F5B4A /* CCShareInfoCMOC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCShareInfoCMOC.h; sourceTree = "<group>"; };
F743B2C41C95BBE8006F5B4A /* CCShareInfoCMOC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCShareInfoCMOC.m; sourceTree = "<group>"; };
@@ -919,6 +852,9 @@
F7514EDA1C7B1336008F3338 /* CCHud.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCHud.h; sourceTree = "<group>"; };
F7514EDB1C7B1336008F3338 /* CCHud.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCHud.m; sourceTree = "<group>"; };
F75153232226920200323DDC /* FastScroll.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FastScroll.framework; path = Carthage/Build/iOS/FastScroll.framework; sourceTree = "<group>"; };
+ F753701822723D620041C76C /* gl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = gl; path = gl.lproj/Localizable.strings; sourceTree = "<group>"; };
+ F753701922723E0D0041C76C /* ca */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ca; path = ca.lproj/Localizable.strings; sourceTree = "<group>"; };
+ F753701A22723EC80041C76C /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/Localizable.strings; sourceTree = "<group>"; };
F7540EE21D5B238600C3FFA8 /* aes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes.h; sourceTree = "<group>"; };
F7540EE31D5B238600C3FFA8 /* asn1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asn1.h; sourceTree = "<group>"; };
F7540EE41D5B238600C3FFA8 /* asn1_mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = asn1_mac.h; sourceTree = "<group>"; };
@@ -1188,8 +1124,11 @@
F777F0301C29717F00CE81CB /* PHAsset+Utility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PHAsset+Utility.h"; sourceTree = "<group>"; };
F777F0311C29717F00CE81CB /* PHAsset+Utility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "PHAsset+Utility.m"; sourceTree = "<group>"; };
F77D49A71DC238E500CDC568 /* loading.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = loading.gif; sourceTree = "<group>"; };
+ F77D9ACA22672CAD00C981EA /* HCEditProfile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HCEditProfile.swift; sourceTree = "<group>"; };
F78071071EDAB65800EAFFF6 /* NSNotificationCenter+MainThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNotificationCenter+MainThread.h"; sourceTree = "<group>"; };
F78071081EDAB65800EAFFF6 /* NSNotificationCenter+MainThread.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNotificationCenter+MainThread.m"; sourceTree = "<group>"; };
+ F781996722636BFA00EBDF6A /* HCFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HCFeatures.h; sourceTree = "<group>"; };
+ F781996822636BFA00EBDF6A /* HCFeatures.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HCFeatures.m; sourceTree = "<group>"; };
F78316861C0CB3CA00C43975 /* CCShareUserOC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCShareUserOC.h; sourceTree = "<group>"; };
F78316871C0CB3CA00C43975 /* CCShareUserOC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCShareUserOC.m; sourceTree = "<group>"; };
F78AA20521F783E900D0F205 /* SwiftRichString.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftRichString.framework; path = Carthage/Build/iOS/SwiftRichString.framework; sourceTree = "<group>"; };
@@ -1262,8 +1201,6 @@
F7B3A4ED1E97818A000DACE8 /* CCLoginWeb.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCLoginWeb.swift; sourceTree = "<group>"; };
F7B4F1C71F44356F00B53B42 /* NCUchardet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NCUchardet.h; sourceTree = "<group>"; };
F7B4F1C81F44356F00B53B42 /* NCUchardet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NCUchardet.m; sourceTree = "<group>"; };
- F7B7ED3A21133A4300C89FFA /* Notification_Service_Extension.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Notification_Service_Extension.entitlements; sourceTree = "<group>"; };
- F7B7ED3B21133A6000C89FFA /* Notification_Service_Extension.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Notification_Service_Extension.plist; sourceTree = "<group>"; };
F7BAADB41ED5A87C00B7EAD4 /* NCDatabase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCDatabase.swift; sourceTree = "<group>"; };
F7BAADB51ED5A87C00B7EAD4 /* NCManageDatabase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCManageDatabase.swift; sourceTree = "<group>"; };
F7BB04851FD58ACB00BBFD2A /* cs-CZ */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "cs-CZ"; path = "cs-CZ.lproj/Localizable.strings"; sourceTree = "<group>"; };
@@ -1485,6 +1422,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ F7267A83225DFCE800D6DB7D /* AFNetworking.framework in Frameworks */,
F7B6F70321BD0EA0007D194D /* JDStatusBarNotification.framework in Frameworks */,
F7B6F70221BD0E6D007D194D /* MBProgressHUD.framework in Frameworks */,
F7B6F70121BD0DD3007D194D /* DZNEmptyDataSet.framework in Frameworks */,
@@ -1496,19 +1434,11 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- F7425B25224B846E009A3857 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- F7425B36224B872B009A3857 /* libcrypto.a in Frameworks */,
- F7425B35224B871B009A3857 /* libssl.a in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
F771E3CD20E2392D00AFB62D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ F7267A84225DFCEC00D6DB7D /* AFNetworking.framework in Frameworks */,
F7C40C152199BA750004137E /* Realm.framework in Frameworks */,
F7C40C162199BA780004137E /* RealmSwift.framework in Frameworks */,
F79918A52199816500C2E308 /* UICKeyChainStore.framework in Frameworks */,
@@ -1521,11 +1451,11 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ F7267A82225DFCE100D6DB7D /* AFNetworking.framework in Frameworks */,
F7C40BF32199978B0004137E /* MBProgressHUD.framework in Frameworks */,
F79918A221997FA300C2E308 /* UICKeyChainStore.framework in Frameworks */,
F75EDFBF1E8C116D00E6F369 /* libstdc++.tbd in Frameworks */,
F75EDFBD1E8C112F00E6F369 /* libsqlite3.0.tbd in Frameworks */,
- F72D0FFF210B6638009C96B7 /* FirebaseNanoPB.framework in Frameworks */,
F7A377161EB2364A002856D3 /* Crashlytics.framework in Frameworks */,
F733B65221997CC2001C1FFA /* TLPhotoPicker.framework in Frameworks */,
F7FC7D561DC1F93800BB2C6A /* libz.tbd in Frameworks */,
@@ -1542,22 +1472,14 @@
F7C40BE721998F410004137E /* DZNEmptyDataSet.framework in Frameworks */,
F7C40BEF219994ED0004137E /* KTVCocoaHTTPServer.framework in Frameworks */,
F7C40BF1219994F20004137E /* KTVHTTPCache.framework in Frameworks */,
- F72D0FFE210B6638009C96B7 /* nanopb.framework in Frameworks */,
F7C40C102199BA5D0004137E /* Realm.framework in Frameworks */,
F75153242226920200323DDC /* FastScroll.framework in Frameworks */,
F7C40C122199BA620004137E /* RealmSwift.framework in Frameworks */,
- F72D0FFD210B6638009C96B7 /* GoogleToolboxForMac.framework in Frameworks */,
- F72D0FF9210B6638009C96B7 /* Protobuf.framework in Frameworks */,
- F72D0FFB210B6638009C96B7 /* FirebaseCore.framework in Frameworks */,
F78AA20621F783E900D0F205 /* SwiftRichString.framework in Frameworks */,
F7C40BE321998C060004137E /* PDFGenerator.framework in Frameworks */,
- F72D1000210B6638009C96B7 /* FirebaseInstanceID.framework in Frameworks */,
F7BB14961D5B62C000ECEE68 /* libcrypto.a in Frameworks */,
F7BB14971D5B62C000ECEE68 /* libssl.a in Frameworks */,
- F72D1001210B6638009C96B7 /* FirebaseCoreDiagnostics.framework in Frameworks */,
- F72D0FFA210B6638009C96B7 /* FirebaseMessaging.framework in Frameworks */,
- F72D0FFC210B6638009C96B7 /* FirebaseAnalytics.framework in Frameworks */,
- F76E71E52244DF6900690001 /* Zip.framework in Frameworks */,
+ F70F2BA5225F2D8900EBB73E /* ZIPFoundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1567,9 +1489,10 @@
F70022561EC4C9100080073F /* OCCommunicationLib */ = {
isa = PBXGroup;
children = (
- F70022571EC4C9100080073F /* ExternalLibs */,
F7DFB7DE219C312D00680748 /* NCRichDocumentTemplate.h */,
F7DFB7DF219C312D00680748 /* NCRichDocumentTemplate.m */,
+ F781996722636BFA00EBDF6A /* HCFeatures.h */,
+ F781996822636BFA00EBDF6A /* HCFeatures.m */,
F70022661EC4C9100080073F /* OCActivity.h */,
F70022671EC4C9100080073F /* OCActivity.m */,
F70022681EC4C9100080073F /* OCCapabilities.h */,
@@ -1601,34 +1524,6 @@
path = Library/OCCommunicationLib;
sourceTree = "<group>";
};
- F70022571EC4C9100080073F /* ExternalLibs */ = {
- isa = PBXGroup;
- children = (
- F70022581EC4C9100080073F /* AFNetworking */,
- );
- path = ExternalLibs;
- sourceTree = "<group>";
- };
- F70022581EC4C9100080073F /* AFNetworking */ = {
- isa = PBXGroup;
- children = (
- F70022591EC4C9100080073F /* AFHTTPSessionManager.h */,
- F700225A1EC4C9100080073F /* AFHTTPSessionManager.m */,
- F700225B1EC4C9100080073F /* AFNetworking.h */,
- F700225C1EC4C9100080073F /* AFNetworkReachabilityManager.h */,
- F700225D1EC4C9100080073F /* AFNetworkReachabilityManager.m */,
- F700225E1EC4C9100080073F /* AFSecurityPolicy.h */,
- F700225F1EC4C9100080073F /* AFSecurityPolicy.m */,
- F70022601EC4C9100080073F /* AFURLRequestSerialization.h */,
- F70022611EC4C9100080073F /* AFURLRequestSerialization.m */,
- F70022621EC4C9100080073F /* AFURLResponseSerialization.h */,
- F70022631EC4C9100080073F /* AFURLResponseSerialization.m */,
- F70022641EC4C9100080073F /* AFURLSessionManager.h */,
- F70022651EC4C9100080073F /* AFURLSessionManager.m */,
- );
- path = AFNetworking;
- sourceTree = "<group>";
- };
F700227E1EC4C9100080073F /* OCWebDavClient */ = {
isa = PBXGroup;
children = (
@@ -1713,7 +1608,6 @@
children = (
F70F02B21C889183008DAB36 /* AFViewShaker */,
F7A377131EB2364A002856D3 /* Fabric */,
- F72D0FED210B6638009C96B7 /* Firebase */,
F7B2DEEB1F976785007CF4D2 /* NYMnemonic */,
F7540EE11D5B238600C3FFA8 /* openssl */,
F7CA1EBB20E7E3FE002CC65E /* PKDownloadButton */,
@@ -1808,39 +1702,6 @@
name = Localizations;
sourceTree = "<group>";
};
- F72D0FED210B6638009C96B7 /* Firebase */ = {
- isa = PBXGroup;
- children = (
- F72D1004210B6835009C96B7 /* Firebase.h */,
- F72D0FEE210B6638009C96B7 /* Messaging */,
- F72D0FF1210B6638009C96B7 /* Analytics */,
- );
- path = Firebase;
- sourceTree = "<group>";
- };
- F72D0FEE210B6638009C96B7 /* Messaging */ = {
- isa = PBXGroup;
- children = (
- F72D0FEF210B6638009C96B7 /* Protobuf.framework */,
- F72D0FF0210B6638009C96B7 /* FirebaseMessaging.framework */,
- );
- path = Messaging;
- sourceTree = "<group>";
- };
- F72D0FF1210B6638009C96B7 /* Analytics */ = {
- isa = PBXGroup;
- children = (
- F72D0FF2210B6638009C96B7 /* FirebaseCore.framework */,
- F72D0FF3210B6638009C96B7 /* FirebaseAnalytics.framework */,
- F72D0FF4210B6638009C96B7 /* GoogleToolboxForMac.framework */,
- F72D0FF5210B6638009C96B7 /* nanopb.framework */,
- F72D0FF6210B6638009C96B7 /* FirebaseNanoPB.framework */,
- F72D0FF7210B6638009C96B7 /* FirebaseInstanceID.framework */,
- F72D0FF8210B6638009C96B7 /* FirebaseCoreDiagnostics.framework */,
- );
- path = Analytics;
- sourceTree = "<group>";
- };
F7381ED9218218A4000B1560 /* Offline */ = {
isa = PBXGroup;
children = (
@@ -1961,15 +1822,6 @@
path = Text;
sourceTree = "<group>";
};
- F7425B29224B846E009A3857 /* Notification Service Extension */ = {
- isa = PBXGroup;
- children = (
- F7425B33224B84BA009A3857 /* NotificationServiceExtension-Bridging-Header.h */,
- F7425B2A224B846E009A3857 /* NotificationService.swift */,
- );
- path = "Notification Service Extension";
- sourceTree = "<group>";
- };
F74D3DB81BAC1941000BAE4B /* Networking */ = {
isa = PBXGroup;
children = (
@@ -2493,6 +2345,7 @@
F7ACE42C1BAC0268006C0017 /* CCManageAccount.h */,
F7ACE42D1BAC0268006C0017 /* CCManageAccount.m */,
F75AC2421F1F62450073EC19 /* NCManageAutoUploadFileName.swift */,
+ F77D9ACA22672CAD00C981EA /* HCEditProfile.swift */,
F7ACE42E1BAC0268006C0017 /* CCManageAutoUpload.h */,
F7ACE42F1BAC0268006C0017 /* CCManageAutoUpload.m */,
F7ACE4301BAC0268006C0017 /* CCSettings.h */,
@@ -2650,7 +2503,6 @@
F710E80C1EF95C9C00DC2427 /* Intro */,
F700222B1EC479840080073F /* Custom.xcassets */,
F7362A1E220C853A005101B5 /* LaunchScreen.storyboard */,
- F72D1002210B67CE009C96B7 /* GoogleService-Info.plist */,
F73CB5771ED46807005F2A5A /* NCBridgeSwift.h */,
F76B3CCD1EAE01BD00921AC9 /* NCBrand.swift */,
);
@@ -2669,13 +2521,11 @@
F7C742D31E7BD36600D9C973 /* Supporting Files */ = {
isa = PBXGroup;
children = (
- F7C742C01E7BD01F00D9C973 /* iOSClient.entitlements */,
- F7C742D01E7BD35B00D9C973 /* Share.entitlements */,
F771E3FB20E23A8700AFB62D /* File_Provider_Extension.entitlements */,
- F7B7ED3A21133A4300C89FFA /* Notification_Service_Extension.entitlements */,
F771E3FC20E23A8800AFB62D /* File_Provider_Extension.plist */,
- F7B7ED3B21133A6000C89FFA /* Notification_Service_Extension.plist */,
+ F7C742C01E7BD01F00D9C973 /* iOSClient.entitlements */,
F7496B81208F5651004B299C /* iOSClient.plist */,
+ F7C742D01E7BD35B00D9C973 /* Share.entitlements */,
F7496B83208F5652004B299C /* Share.plist */,
);
name = "Supporting Files";
@@ -2931,11 +2781,9 @@
F7F67BAB1A24D27800EE80DA /* Supporting Files */,
F771E3D120E2392D00AFB62D /* File Provider Extension */,
F7C0F46D1C8880540059EC54 /* Share */,
- F7425B29224B846E009A3857 /* Notification Service Extension */,
F7FC7D651DC1F98700BB2C6A /* Products */,
F7FC7D541DC1F93700BB2C6A /* Frameworks */,
F771E3D020E2392D00AFB62D /* File Provider Extension.appex */,
- F7425B28224B846E009A3857 /* Notification Service Extension.appex */,
);
sourceTree = "<group>";
};
@@ -3016,6 +2864,8 @@
F7FC7D541DC1F93700BB2C6A /* Frameworks */ = {
isa = PBXGroup;
children = (
+ F70F2BA4225F2D8900EBB73E /* ZIPFoundation.framework */,
+ F7267A81225DFCE100D6DB7D /* AFNetworking.framework */,
F76E71E42244DF6900690001 /* Zip.framework */,
F745B250222D871800346520 /* QRCodeReader.framework */,
F75153232226920200323DDC /* FastScroll.framework */,
@@ -3105,23 +2955,6 @@
productReference = F7CE8AFB1DC1F8D8009CAE48 /* Share.appex */;
productType = "com.apple.product-type.app-extension";
};
- F7425B27224B846E009A3857 /* Notification Service Extension */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = F7425B32224B846E009A3857 /* Build configuration list for PBXNativeTarget "Notification Service Extension" */;
- buildPhases = (
- F7425B24224B846E009A3857 /* Sources */,
- F7425B25224B846E009A3857 /* Frameworks */,
- F7425B26224B846E009A3857 /* Resources */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "Notification Service Extension";
- productName = "Notification Service Extension";
- productReference = F7425B28224B846E009A3857 /* Notification Service Extension.appex */;
- productType = "com.apple.product-type.app-extension";
- };
F771E3CF20E2392D00AFB62D /* File Provider Extension */ = {
isa = PBXNativeTarget;
buildConfigurationList = F771E3EF20E2392E00AFB62D /* Build configuration list for PBXNativeTarget "File Provider Extension" */;
@@ -3157,7 +2990,6 @@
dependencies = (
F7145A321D12E65F00CAFEEC /* PBXTargetDependency */,
F771E3EA20E2392E00AFB62D /* PBXTargetDependency */,
- F7425B2E224B846E009A3857 /* PBXTargetDependency */,
);
name = Nextcloud;
productName = "Crypto Cloud";
@@ -3176,7 +3008,7 @@
TargetAttributes = {
F71459B41D12E3B700CAFEEC = {
DevelopmentTeam = 6JLRKY9ZV7;
- LastSwiftMigration = 1000;
+ LastSwiftMigration = 1020;
SystemCapabilities = {
com.apple.ApplicationGroups.iOS = {
enabled = 1;
@@ -3186,28 +3018,15 @@
};
};
};
- F7425B27224B846E009A3857 = {
- CreatedOnToolsVersion = 10.1;
- DevelopmentTeam = 6JLRKY9ZV7;
- ProvisioningStyle = Automatic;
- SystemCapabilities = {
- com.apple.ApplicationGroups.iOS = {
- enabled = 1;
- };
- com.apple.Keychain = {
- enabled = 1;
- };
- };
- };
F771E3CF20E2392D00AFB62D = {
CreatedOnToolsVersion = 9.4.1;
DevelopmentTeam = 6JLRKY9ZV7;
- LastSwiftMigration = 1000;
+ LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
F77B0DEB1D118A16002130FE = {
DevelopmentTeam = 6JLRKY9ZV7;
- LastSwiftMigration = 1000;
+ LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Push = {
@@ -3222,7 +3041,7 @@
};
buildConfigurationList = F7F67BA31A24D27800EE80DA /* Build configuration list for PBXProject "Nextcloud" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@@ -3266,6 +3085,9 @@
"es-419",
"pt-PT",
"ja-JP",
+ gl,
+ ca,
+ da,
);
mainGroup = F7F67B9F1A24D27800EE80DA;
productRefGroup = F7F67B9F1A24D27800EE80DA;
@@ -3275,7 +3097,6 @@
F77B0DEB1D118A16002130FE /* Nextcloud */,
F71459B41D12E3B700CAFEEC /* Share */,
F771E3CF20E2392D00AFB62D /* File Provider Extension */,
- F7425B27224B846E009A3857 /* Notification Service Extension */,
);
};
/* End PBXProject section */
@@ -3294,13 +3115,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- F7425B26224B846E009A3857 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
F771E3CE20E2392D00AFB62D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -3409,7 +3223,6 @@
F7C525A21E3B6DA800FFE02C /* CCNotification.storyboard in Resources */,
F7F54CEB1E5B14C700E19C62 /* ImageSelectedOn.png in Resources */,
F7499A1C2247AD3A00A7D630 /* IMImagemeterView.xib in Resources */,
- F72D1003210B67CE009C96B7 /* GoogleService-Info.plist in Resources */,
F762CB951EACB84400B38484 /* icon-error.png in Resources */,
F7F54CF01E5B14C700E19C62 /* ImageSelectedSmallOff@3x.png in Resources */,
F73B4EF01F470D9100BBEE4B /* CMakeLists.txt in Resources */,
@@ -3491,7 +3304,8 @@
"$(SRCROOT)/Carthage/Build/iOS/SwiftRichString.framework",
"$(SRCROOT)/Carthage/Build/iOS/FastScroll.framework",
"$(SRCROOT)/Carthage/Build/iOS/QRCodeReader.framework",
- "$(SRCROOT)/Carthage/Build/iOS/Zip.framework",
+ "$(SRCROOT)/Carthage/Build/iOS/AFNetworking.framework",
+ "$(SRCROOT)/Carthage/Build/iOS/ZIPFoundation.framework",
);
outputPaths = (
);
@@ -3528,8 +3342,6 @@
F70022C01EC4C9100080073F /* OCFileDto.m in Sources */,
F71459C21D12E3B700CAFEEC /* ShareViewController.m in Sources */,
F77EB6281EC08036003F814F /* CCExifGeo.m in Sources */,
- F70022A21EC4C9100080073F /* AFHTTPSessionManager.m in Sources */,
- F70022A51EC4C9100080073F /* AFNetworkReachabilityManager.m in Sources */,
F73CC0731E813DFF006E3047 /* BKPasscodeLockScreenManager.m in Sources */,
F73CC06A1E813DFF006E3047 /* BKPasscodeDummyViewController.m in Sources */,
F73CC07C1E813DFF006E3047 /* BKTouchIDManager.m in Sources */,
@@ -3555,12 +3367,11 @@
F732BA0B1D76DBA500E9878B /* CCNetworking.m in Sources */,
F70022CF1EC4C9100080073F /* OCShareUser.m in Sources */,
F71459E11D12E3B700CAFEEC /* CCHud.m in Sources */,
- F70022B11EC4C9100080073F /* AFURLSessionManager.m in Sources */,
- F70022AE1EC4C9100080073F /* AFURLResponseSerialization.m in Sources */,
F70022EA1EC4C9100080073F /* OCXMLShareByLinkParser.m in Sources */,
F77EB62A1EC0B50A003F814F /* CCCertificate.m in Sources */,
F70022D81EC4C9100080073F /* NSDate+RFC1123.m in Sources */,
F70022E71EC4C9100080073F /* OCXMLServerErrorsParser.m in Sources */,
+ F781996A22636BFA00EBDF6A /* HCFeatures.m in Sources */,
F70022C91EC4C9100080073F /* OCRichObjectStrings.m in Sources */,
F71459F11D12E3B700CAFEEC /* CCMove.m in Sources */,
F70022C31EC4C9100080073F /* OCNotifications.m in Sources */,
@@ -3568,8 +3379,6 @@
F7BAADC91ED5A87C00B7EAD4 /* NCDatabase.swift in Sources */,
F70022BD1EC4C9100080073F /* OCExternalSites.m in Sources */,
F780710A1EDAB65800EAFFF6 /* NSNotificationCenter+MainThread.m in Sources */,
- F70022A81EC4C9100080073F /* AFSecurityPolicy.m in Sources */,
- F70022AB1EC4C9100080073F /* AFURLRequestSerialization.m in Sources */,
F70022B41EC4C9100080073F /* OCActivity.m in Sources */,
F70022CC1EC4C9100080073F /* OCSharedDto.m in Sources */,
F70022DB1EC4C9100080073F /* OCHTTPRequestOperation.m in Sources */,
@@ -3584,28 +3393,11 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- F7425B24224B846E009A3857 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- F7425B3B224B8A9B009A3857 /* NCBrand.swift in Sources */,
- F7425B3D224B8D4D009A3857 /* NCRichDocumentTemplate.m in Sources */,
- F7425B39224B89FE009A3857 /* CCUtility.m in Sources */,
- F7425B2B224B846E009A3857 /* NotificationService.swift in Sources */,
- F7425B37224B89D2009A3857 /* NCDatabase.swift in Sources */,
- F7425B43224B8D73009A3857 /* OCSharedDto.m in Sources */,
- F7425B3A224B8A23009A3857 /* NCPushNotificationEncryption.m in Sources */,
- F7425B3E224B8D54009A3857 /* OCActivity.m in Sources */,
- F7425B3C224B8CDD009A3857 /* NCEndToEndEncryption.m in Sources */,
- F7425B38224B89D6009A3857 /* NCManageDatabase.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
F771E3CC20E2392D00AFB62D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- F7434B4820E2407000417916 /* AFURLRequestSerialization.m in Sources */,
+ F781996B22636BFA00EBDF6A /* HCFeatures.m in Sources */,
F7434B3C20E2403D00417916 /* OCCommunication.m in Sources */,
F771E3F720E239B500AFB62D /* FileProviderExtension+Actions.swift in Sources */,
F7434B3720E23FF200417916 /* NCUtility.swift in Sources */,
@@ -3613,7 +3405,6 @@
F7DFB7E2219C312D00680748 /* NCRichDocumentTemplate.m in Sources */,
F7434B3A20E2403500417916 /* OCActivity.m in Sources */,
F7434B6220E249F700417916 /* NSNotificationCenter+MainThread.m in Sources */,
- F7434B4A20E2407600417916 /* AFURLSessionManager.m in Sources */,
F7434B3B20E2403900417916 /* OCCapabilities.m in Sources */,
F7434B4B20E2408000417916 /* NSDate+ISO8601.m in Sources */,
F7434B4C20E2408300417916 /* NSDate+RFC1123.m in Sources */,
@@ -3629,14 +3420,12 @@
F7434B6120E2445C00417916 /* CCCertificate.m in Sources */,
F7434B5A20E241BB00417916 /* NCNetworkingEndToEnd.m in Sources */,
F7434B3820E2400600417916 /* NCBrand.swift in Sources */,
- F7434B4620E2406900417916 /* AFNetworkReachabilityManager.m in Sources */,
F7434B6320E249FB00417916 /* NSString+TruncateToWidth.m in Sources */,
F7434B5620E2412900417916 /* CCError.m in Sources */,
F7434B5C20E241D500417916 /* NCEndToEndEncryption.m in Sources */,
F7434B3E20E2404700417916 /* OCFileDto.m in Sources */,
F7434B3D20E2404300417916 /* OCExternalSites.m in Sources */,
F7434B4420E2405C00417916 /* OCUserProfile.m in Sources */,
- F7434B4520E2406400417916 /* AFHTTPSessionManager.m in Sources */,
F7434B5E20E241EC00417916 /* CCGraphics.m in Sources */,
F771E3D320E2392D00AFB62D /* FileProviderExtension.swift in Sources */,
F7434B5B20E241D100417916 /* NCEndToEndMetadata.swift in Sources */,
@@ -3647,11 +3436,9 @@
F7434B3620E23FE000417916 /* NCManageDatabase.swift in Sources */,
F771E3F320E239A600AFB62D /* FileProviderData.swift in Sources */,
F771E3D720E2392D00AFB62D /* FileProviderEnumerator.swift in Sources */,
- F7434B4720E2406C00417916 /* AFSecurityPolicy.m in Sources */,
F7434B4220E2405500417916 /* OCSharedDto.m in Sources */,
F7434B3F20E2404B00417916 /* OCNotifications.m in Sources */,
F7434B6020E2445200417916 /* CCExifGeo.m in Sources */,
- F7434B4920E2407300417916 /* AFURLResponseSerialization.m in Sources */,
F7434B5420E240A300417916 /* NSString+Encode.m in Sources */,
F7434B4E20E2408A00417916 /* OCWebDAVClient.m in Sources */,
F771E3F820E239B500AFB62D /* FileProviderExtension+Thumbnail.swift in Sources */,
@@ -3666,7 +3453,6 @@
files = (
F760F79521F21F61006B1A73 /* PhotoEditor+Gestures.swift in Sources */,
F70022D71EC4C9100080073F /* NSDate+RFC1123.m in Sources */,
- F70022A41EC4C9100080073F /* AFNetworkReachabilityManager.m in Sources */,
F762CAFD1EACB66200B38484 /* XLFormInlineSelectorCell.m in Sources */,
F77B0DF21D118A16002130FE /* CCUploadFromOtherUpp.m in Sources */,
F754EECB21772B6100BB1CDF /* DropdownMenu.swift in Sources */,
@@ -3689,7 +3475,6 @@
F73B4F081F470D9100BBEE4B /* nsEUCJPProber.cpp in Sources */,
F70022DA1EC4C9100080073F /* OCHTTPRequestOperation.m in Sources */,
F790110E21415BF600D7B136 /* NCViewerRichdocument.swift in Sources */,
- F70022A11EC4C9100080073F /* AFHTTPSessionManager.m in Sources */,
F78ACD4021903CC20088454D /* NCGridCell.swift in Sources */,
F762CB041EACB66200B38484 /* XLFormSwitchCell.m in Sources */,
F73B4F0F1F470D9100BBEE4B /* nsMBCSSM.cpp in Sources */,
@@ -3704,7 +3489,6 @@
F7F54D061E5B14C800E19C62 /* MWCaptionView.m in Sources */,
F762CB001EACB66200B38484 /* XLFormSegmentedCell.m in Sources */,
F732BA061D76CE1500E9878B /* CCNetworking.m in Sources */,
- F70022B01EC4C9100080073F /* AFURLSessionManager.m in Sources */,
F7B1FBC71E72E3D1001781FE /* SwiftWebVC.swift in Sources */,
F7D423801F0596C6009C9782 /* ReaderMainPagebar.m in Sources */,
F762CB061EACB66200B38484 /* XLFormTextViewCell.m in Sources */,
@@ -3851,6 +3635,7 @@
F762CAFA1EACB66200B38484 /* XLFormDateCell.m in Sources */,
F70022B91EC4C9100080073F /* OCCommunication.m in Sources */,
F762CB181EACB66200B38484 /* XLFormValidationStatus.m in Sources */,
+ F77D9ACB22672CAD00C981EA /* HCEditProfile.swift in Sources */,
F73B4EF91F470D9100BBEE4B /* LangEsperantoModel.cpp in Sources */,
F77B0E8F1D118A16002130FE /* CCSection.m in Sources */,
F7CA1ED720E7E3FE002CC65E /* PKDownloadButton.m in Sources */,
@@ -3861,7 +3646,6 @@
F77B0E981D118A16002130FE /* CCManageAccount.m in Sources */,
F762CB011EACB66200B38484 /* XLFormSelectorCell.m in Sources */,
F755BD9B20594AC7008C5FBB /* NCService.swift in Sources */,
- F70022AD1EC4C9100080073F /* AFURLResponseSerialization.m in Sources */,
F77B0E9B1D118A16002130FE /* CCBKPasscode.m in Sources */,
F760F77F21F21F61006B1A73 /* PhotoEditor+Controls.swift in Sources */,
F7169A1D1EE590930086BD69 /* NCSharesCell.m in Sources */,
@@ -3907,7 +3691,6 @@
F7F54D0B1E5B14C800E19C62 /* MWTapDetectingImageView.m in Sources */,
F7D423821F0596C6009C9782 /* ReaderThumbCache.m in Sources */,
F760F79A21F21F61006B1A73 /* PhotoEditor+Crop.swift in Sources */,
- F70022A71EC4C9100080073F /* AFSecurityPolicy.m in Sources */,
F7CA1ED220E7E3FE002CC65E /* PKCircleView.m in Sources */,
F7F54D0D1E5B14C800E19C62 /* MWZoomingScrollView.m in Sources */,
F760F78E21F21F61006B1A73 /* PhotoEditor+Drawing.swift in Sources */,
@@ -3934,8 +3717,8 @@
F7CA1ED620E7E3FE002CC65E /* CALayer+PKDownloadButtonAnimations.m in Sources */,
F7ECBA6D1E239DCD003E6328 /* NCCreateFormUploadRichdocuments.swift in Sources */,
F758B45E212C569D00515F55 /* ScanCell.swift in Sources */,
+ F781996922636BFA00EBDF6A /* HCFeatures.m in Sources */,
F70022FE1EC4C9100080073F /* UtilsFramework.m in Sources */,
- F70022AA1EC4C9100080073F /* AFURLRequestSerialization.m in Sources */,
F7D423851F0596C6009C9782 /* ReaderThumbRender.m in Sources */,
F72AAECA1E5C60C700BB17E1 /* AHKActionSheet.m in Sources */,
F7CA1ED920E7E3FE002CC65E /* NSLayoutConstraint+PKDownloadButton.m in Sources */,
@@ -3960,11 +3743,6 @@
target = F71459B41D12E3B700CAFEEC /* Share */;
targetProxy = F7145A311D12E65F00CAFEEC /* PBXContainerItemProxy */;
};
- F7425B2E224B846E009A3857 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = F7425B27224B846E009A3857 /* Notification Service Extension */;
- targetProxy = F7425B2D224B846E009A3857 /* PBXContainerItemProxy */;
- };
F771E3EA20E2392E00AFB62D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = F771E3CF20E2392D00AFB62D /* File Provider Extension */;
@@ -4024,6 +3802,9 @@
F732093B201B81E4008A0888 /* es-419 */,
F70A07C8205285FB00DC1231 /* pt-PT */,
F7E45E6D21E75BF200579249 /* ja-JP */,
+ F753701822723D620041C76C /* gl */,
+ F753701922723E0D0041C76C /* ca */,
+ F753701A22723EC80041C76C /* da */,
);
name = Localizable.strings;
path = "Supporting Files";
@@ -4068,7 +3849,7 @@
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Share/Share-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
USE_HEADERMAP = YES;
};
@@ -4109,108 +3890,12 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Share/Share-Bridging-Header.h";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
USE_HEADERMAP = YES;
};
name = Release;
};
- F7425B30224B846E009A3857 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
- APPLICATION_EXTENSION_API_ONLY = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_STRICT_PROTOTYPES = NO;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOSClient/Brand/Notification_Service_Extension.entitlements";
- CODE_SIGN_IDENTITY = "iPhone Developer";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEBUG_INFORMATION_FORMAT = dwarf;
- DEVELOPMENT_TEAM = 6JLRKY9ZV7;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "$(inherited)",
- EXTENSION,
- EXTENSION_NOTIFICATION_SERVICE,
- NC,
- );
- HEADER_SEARCH_PATHS = "\"Libraries external\"/**";
- INFOPLIST_FILE = "$(SRCROOT)/iOSClient/Brand/Notification_Service_Extension.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- LIBRARY_SEARCH_PATHS = "\"Libraries external\"/**";
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = "it.twsweb.Nextcloud.Notification-Service-Extension";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SKIP_INSTALL = YES;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_OBJC_BRIDGING_HEADER = "Notification Service Extension/NotificationServiceExtension-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 4.2;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- F7425B31224B846E009A3857 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
- APPLICATION_EXTENSION_API_ONLY = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_STRICT_PROTOTYPES = NO;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_ENTITLEMENTS = "$(SRCROOT)/iOSClient/Brand/Notification_Service_Extension.entitlements";
- CODE_SIGN_IDENTITY = "iPhone Developer";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- DEVELOPMENT_TEAM = 6JLRKY9ZV7;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "$(PROJECT_DIR)/Carthage/Build/iOS",
- );
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_PREFIX_HEADER = iOSClient/CryptoCloud.pch;
- GCC_PREPROCESSOR_DEFINITIONS = (
- EXTENSION,
- EXTENSION_NOTIFICATION_SERVICE,
- NC,
- );
- HEADER_SEARCH_PATHS = "\"Libraries external\"/**";
- INFOPLIST_FILE = "$(SRCROOT)/iOSClient/Brand/Notification_Service_Extension.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
- LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
- LIBRARY_SEARCH_PATHS = "\"Libraries external\"/**";
- MTL_FAST_MATH = YES;
- PRODUCT_BUNDLE_IDENTIFIER = "it.twsweb.Nextcloud.Notification-Service-Extension";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SKIP_INSTALL = YES;
- SWIFT_OBJC_BRIDGING_HEADER = "Notification Service Extension/NotificationServiceExtension-Bridging-Header.h";
- SWIFT_VERSION = 4.2;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Release;
- };
F771E3F020E2392E00AFB62D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -4255,7 +3940,7 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OBJC_BRIDGING_HEADER = "File Provider Extension/FileProviderExtension-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@@ -4301,7 +3986,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "File Provider Extension/FileProviderExtension-Bridging-Header.h";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
@@ -4322,7 +4007,6 @@
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)\"/Libraries external/Firebase\"/**",
"$(PROJECT_DIR)\"/Libraries external/Fabric\"",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
@@ -4345,7 +4029,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "iOSClient/Nextcloud-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
USE_HEADERMAP = YES;
VERSIONING_SYSTEM = "";
@@ -4369,7 +4053,6 @@
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
- "$(PROJECT_DIR)\"/Libraries external/Firebase\"/**",
"$(PROJECT_DIR)\"/Libraries external/Fabric\"",
"$(PROJECT_DIR)/Carthage/Build/iOS",
);
@@ -4390,7 +4073,7 @@
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "iOSClient/Nextcloud-Bridging-Header.h";
- SWIFT_VERSION = 4.2;
+ SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
USE_HEADERMAP = YES;
VERSIONING_SYSTEM = "";
@@ -4521,15 +4204,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- F7425B32224B846E009A3857 /* Build configuration list for PBXNativeTarget "Notification Service Extension" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- F7425B30224B846E009A3857 /* Debug */,
- F7425B31224B846E009A3857 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
F771E3EF20E2392E00AFB62D /* Build configuration list for PBXNativeTarget "File Provider Extension" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/Notification Service Extension/NotificationService.swift b/Notification Service Extension/NotificationService.swift
deleted file mode 100755
index b39d47b5a..000000000
--- a/Notification Service Extension/NotificationService.swift
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// NotificationService.swift
-// Notification Service Extension
-//
-// Created by Marino Faggiana on 27/07/18.
-// Copyright © 2018 Marino Faggiana. All rights reserved.
-//
-// Author Marino Faggiana <marino.faggiana@nextcloud.com>
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-//
-
-import UserNotifications
-
-class NotificationService: UNNotificationServiceExtension {
-
- var contentHandler: ((UNNotificationContent) -> Void)?
- var bestAttemptContent: UNMutableNotificationContent?
-
- override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
-
- self.contentHandler = contentHandler
- bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent)
-
- if let bestAttemptContent = bestAttemptContent {
-
- bestAttemptContent.title = ""
- bestAttemptContent.body = "Nextcloud notification"
-
- guard let message = bestAttemptContent.userInfo["subject"] else {
- contentHandler(bestAttemptContent)
- return
- }
-
- for result in NCManageDatabase.sharedInstance.getAllAccount() {
- guard let privateKey = CCUtility.getPushNotificationPrivateKey(result.account) else {
- continue
- }
- guard let decryptedMessage = NCPushNotificationEncryption.sharedInstance()?.decryptPushNotification(message as? String, withDevicePrivateKey: privateKey) else {
- continue
- }
- guard let data = decryptedMessage.data(using: .utf8) else {
- contentHandler(bestAttemptContent)
- return
- }
-
- do {
- let json = try JSONSerialization.jsonObject(with: data) as! [String:AnyObject]
- if let app = json["app"] as? String {
- if app == "spreed" {
- bestAttemptContent.title = "Nextcloud Talk"
- } else {
- bestAttemptContent.title = app.capitalized
- }
- }
- if let subject = json["subject"] as? String {
- bestAttemptContent.body = subject
- }
- } catch let error as NSError {
- print("Failed : \(error.localizedDescription)")
- }
- }
-
- contentHandler(bestAttemptContent)
- }
- }
-
- override func serviceExtensionTimeWillExpire() {
-
- if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
-
- bestAttemptContent.title = ""
- bestAttemptContent.body = "Nextcloud"
-
- contentHandler(bestAttemptContent)
- }
- }
-}
diff --git a/Share/Share-Bridging-Header.h b/Share/Share-Bridging-Header.h
index 360275708..99857be4b 100644
--- a/Share/Share-Bridging-Header.h
+++ b/Share/Share-Bridging-Header.h
@@ -5,9 +5,9 @@
#import "CCHud.h"
#import "ShareViewController.h"
#import "NCEndToEndEncryption.h"
-
#import "OCActivity.h"
#import "OCUserProfile.h"
#import "OCCapabilities.h"
#import "OCExternalSites.h"
#import "OCSharedDto.h"
+#import "HCFeatures.h"
diff --git a/Share/ShareViewController.h b/Share/ShareViewController.h
index 702805d54..ad686ec54 100644
--- a/Share/ShareViewController.h
+++ b/Share/ShareViewController.h
@@ -24,7 +24,6 @@
#import <MBProgressHUD/MBProgressHUD.h>
#import "OCCommunication.h"
-#import "AFURLSessionManager.h"
#import "CCNetworking.h"
#import "OCNetworking.h"
#import "CCBKPasscode.h"
diff --git a/Share/ShareViewController.m b/Share/ShareViewController.m
index 8fca908f2..866011fce 100644
--- a/Share/ShareViewController.m
+++ b/Share/ShareViewController.m
@@ -46,9 +46,9 @@
-(void)viewDidLoad
{
- tableAccount *recordAccount = [[NCManageDatabase sharedInstance] getAccountActive];
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
- if (recordAccount == nil) {
+ if (tableAccount == nil) {
// close now
[self performSelector:@selector(closeShareViewController) withObject:nil afterDelay:0.1];
@@ -57,11 +57,11 @@
} else {
- _activeAccount = recordAccount.account;
- _activePassword = recordAccount.password;
- _activeUrl = recordAccount.url;
- _activeUser = recordAccount.user;
- _activeUserID = recordAccount.userID;
+ _activeAccount = tableAccount.account;
+ _activePassword = [CCUtility getPassword:tableAccount.account];
+ _activeUrl = tableAccount.url;
+ _activeUser = tableAccount.user;
+ _activeUserID = tableAccount.userID;
if ([_activeAccount isEqualToString:[CCUtility getActiveAccountExt]]) {
diff --git a/iOSClient/AppDelegate.m b/iOSClient/AppDelegate.m
index 3624a605e..44b2672a1 100644
--- a/iOSClient/AppDelegate.m
+++ b/iOSClient/AppDelegate.m
@@ -23,8 +23,6 @@
#import "AppDelegate.h"
#import <JDStatusBarNotification/JDStatusBarNotification.h>
-
-#import "AFURLSessionManager.h"
#import "CCNetworking.h"
#import "CCGraphics.h"
#import "CCSynchronize.h"
@@ -34,10 +32,9 @@
#import <Crashlytics/Crashlytics.h>
#import "NCBridgeSwift.h"
#import "NCAutoUpload.h"
-#import "Firebase.h"
#import "NCPushNotificationEncryption.h"
-@interface AppDelegate () <UNUserNotificationCenterDelegate, FIRMessagingDelegate>
+@interface AppDelegate () <UNUserNotificationCenterDelegate>
{
PKPushRegistry *pushRegistry;
}
@@ -101,9 +98,9 @@ PKPushRegistry *pushRegistry;
if ([self upgrade]) {
// Set account, if no exists clear all
- tableAccount *account = [[NCManageDatabase sharedInstance] getAccountActive];
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
- if (account == nil) {
+ if (tableAccount == nil) {
// remove all the keys Chain
[CCUtility deleteAllChainStore];
@@ -113,7 +110,7 @@ PKPushRegistry *pushRegistry;
} else {
- [self settingActiveAccount:account.account activeUrl:account.url activeUser:account.user activeUserID:account.userID activePassword:account.password];
+ [self settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:[CCUtility getPassword:tableAccount.account]];
}
}
@@ -149,29 +146,19 @@ PKPushRegistry *pushRegistry;
self.listProgressMetadata = [[NSMutableDictionary alloc] init];
self.listMainVC = [[NSMutableDictionary alloc] init];
- /*
- // Firebase - Push Notification
- @try {
- [FIRApp configure];
- } @catch (NSException *exception) {
- NSLog(@"[LOG] Something went wrong while configuring Firebase");
- }
- */
-
// Push Notification
pushRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()];
pushRegistry.delegate = self;
pushRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP];
+ [application registerForRemoteNotifications];
+
// Display notification (sent via APNS)
[UNUserNotificationCenter currentNotificationCenter].delegate = self;
UNAuthorizationOptions authOptions = UNAuthorizationOptionAlert | UNAuthorizationOptionSound | UNAuthorizationOptionBadge;
[[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:authOptions completionHandler:^(BOOL granted, NSError * _Nullable error) {
}];
- [application registerForRemoteNotifications];
- [FIRMessaging messaging].delegate = self;
-
// setting Reachable in back
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
@@ -215,7 +202,9 @@ PKPushRegistry *pushRegistry;
self.timerUpdateApplicationIconBadgeNumber = [NSTimer scheduledTimerWithTimeInterval:k_timerUpdateApplicationIconBadgeNumber target:self selector:@selector(updateApplicationIconBadgeNumber) userInfo:nil repeats:YES];
// Fabric
- [Fabric with:@[[Crashlytics class]]];
+ if (![CCUtility getDisableCrashservice]) {
+ [Fabric with:@[[Crashlytics class]]];
+ }
// Store review
if ([[NCUtility sharedInstance] isSimulatorOrTestFlight] == false) {
@@ -254,6 +243,9 @@ PKPushRegistry *pushRegistry;
NSLog(@"[LOG] Read active directory");
[self.activeMain readFileReloadFolder];
+
+ NSLog(@"[LOG] Required unsubscribing / subscribing");
+ [self pushNotification];
}
//
@@ -411,14 +403,17 @@ PKPushRegistry *pushRegistry;
if (self.activeAccount.length == 0 || self.maintenanceMode || self.pushKitToken.length == 0)
return;
- NSString *token = [CCUtility getPushNotificationToken:self.activeAccount];
-
- if (![token isEqualToString:self.pushKitToken]) {
- if (token != nil) {
- // unsubscribing + subscribing
- [self unsubscribingNextcloudServerPushNotification:self.activeAccount url:self.activeUrl withSubscribing:true];
- } else {
- [self subscribingNextcloudServerPushNotification:self.activeAccount url:self.activeUrl];
+ for (tableAccount *result in [[NCManageDatabase sharedInstance] getAllAccount]) {
+
+ NSString *token = [CCUtility getPushNotificationToken:result.account];
+
+ if (![token isEqualToString:self.pushKitToken]) {
+ if (token != nil) {
+ // unsubscribing + subscribing
+ [self unsubscribingNextcloudServerPushNotification:result.account url:result.url withSubscribing:true];
+ } else {
+ [self subscribingNextcloudServerPushNotification:result.account url:result.url];
+ }
}
}
}
@@ -500,86 +495,6 @@ PKPushRegistry *pushRegistry;
completionHandler();
}
-/*
-- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler
-{
- NSLog(@"Push notification: %@", userInfo);
-
- NSUInteger fetchResult = UIBackgroundFetchResultNoData;
- NSString *message = [userInfo objectForKey:@"subject"];
-
- if (message) {
- for (tableAccount *result in [[NCManageDatabase sharedInstance] getAllAccount]) {
- if ([CCUtility getPushNotificationPrivateKey:result.account]) {
- NSString *decryptedMessage = [[NCPushNotificationEncryption sharedInstance] decryptPushNotification:message withDevicePrivateKey: [CCUtility getPushNotificationPrivateKey:result.account]];
- if (decryptedMessage) {
-
- UNMutableNotificationContent *content = [UNMutableNotificationContent new];
-
- NSData *data = [decryptedMessage dataUsingEncoding:NSUTF8StringEncoding];
- NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
-
- NSString *app = [json objectForKey:@"app"];
- NSString *subject = [json objectForKey:@"subject"];
- NSInteger notificationId = [[json objectForKey:@"nid"] integerValue];
-
- if ([app isEqualToString:@"spreed"]) {
- content.title = @"Nextcloud Talk";
- } else {
- content.title = app.capitalizedString;
- }
- content.title = [NSString stringWithFormat:@"%@ (%@)", content.title, result.account];
-
- if (subject) {
- content.body = subject;
- } else {
- content.body = @"Nextcloud notification";
- }
-
- [[OCNetworking sharedManager] getServerNotification:result.url notificationId:notificationId completion:^(NSDictionary *json, NSString *message, NSInteger errorCode) {
- //
- }];
-
- content.sound = [UNNotificationSound defaultSound];
-
- NSString *identifier = [NSString stringWithFormat:@"Notification-%@", [NSDate new]];
-
- UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:0.1 repeats:NO];
- UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:identifier content:content trigger:trigger];
-
- [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:nil];
-
- fetchResult = UIBackgroundFetchResultNewData;
- break;
- }
- }
- }
- }
-
- completionHandler(fetchResult);
-}
-
-- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken
-{
-
- // test
- if (self.activeAccount.length == 0 || self.maintenanceMode)
- return;
-
- NSLog(@"FCM registration token: %@", fcmToken);
-
- NSString *token = [CCUtility getPushNotificationToken:self.activeAccount];
- if (![token isEqualToString:fcmToken]) {
- if (token != nil) {
- // unsubscribing + subscribing
- [self unsubscribingNextcloudServerPushNotification:self.activeAccount url:self.activeUrl token:fcmToken];
- } else {
- [self subscribingNextcloudServerPushNotification:self.activeAccount url:self.activeUrl token:fcmToken];
- }
- }
-}
-*/
-
- (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type
{
self.pushKitToken = [self stringWithDeviceToken:credentials.token];
@@ -592,7 +507,8 @@ PKPushRegistry *pushRegistry;
NSString *message = [payload.dictionaryPayload objectForKey:@"subject"];
if (message) {
- for (tableAccount *result in [[NCManageDatabase sharedInstance] getAllAccount]) {
+ NSArray *results = [[NCManageDatabase sharedInstance] getAllAccount];
+ for (tableAccount *result in results) {
if ([CCUtility getPushNotificationPrivateKey:result.account]) {
NSString *decryptedMessage = [[NCPushNotificationEncryption sharedInstance] decryptPushNotification:message withDevicePrivateKey: [CCUtility getPushNotificationPrivateKey:result.account]];
if (decryptedMessage) {
@@ -614,7 +530,12 @@ PKPushRegistry *pushRegistry;
} else {
content.title = app.capitalizedString;
}
- content.title = [NSString stringWithFormat:@"%@ - %@ (%@)", content.title, result.displayName, domain];
+ if (results.count == 1) {
+ content.title = content.title;
+ } else {
+ content.title = content.title;
+ content.subtitle = [NSString stringWithFormat:@"%@ (%@)", result.displayName, domain];
+ }
if (subject) {
content.body = subject;
} else {
@@ -1671,6 +1592,14 @@ PKPushRegistry *pushRegistry;
[[NCManageDatabase sharedInstance] clearTable:[tableActivityPreview class] account:nil];
}
}
+
+ if (([actualVersion compare:@"2.23.4" options:NSNumericSearch] == NSOrderedAscending)) {
+ NSArray *records = [[NCManageDatabase sharedInstance] getAllAccount];
+ for (tableAccount *record in records) {
+ [CCUtility setPassword:record.account password:record.password];
+ [[NCManageDatabase sharedInstance] removePasswordAccount:record.account];
+ }
+ }
return YES;
}
diff --git a/iOSClient/AutoUpload/NCAutoUpload.m b/iOSClient/AutoUpload/NCAutoUpload.m
index e835d97ab..b76c2f710 100644
--- a/iOSClient/AutoUpload/NCAutoUpload.m
+++ b/iOSClient/AutoUpload/NCAutoUpload.m
@@ -437,13 +437,11 @@
});
}
- // end loading
+ // end loadingcand reload
dispatch_async(dispatch_get_main_queue(), ^{
[_hud hideHud];
- });
-
- // reload
- [[NCMainCommon sharedInstance] reloadDatasourceWithServerUrl:nil fileID:nil action:k_action_NULL];
+ [[NCMainCommon sharedInstance] reloadDatasourceWithServerUrl:nil fileID:nil action:k_action_NULL];
+ });
}
- (void)addQueueUploadAndPhotoLibrary:(tableMetadata *)metadata asset:(PHAsset *)asset
diff --git a/iOSClient/Brand/File_Provider_Extension.plist b/iOSClient/Brand/File_Provider_Extension.plist
index 7877aef48..2e6fd2e13 100644
--- a/iOSClient/Brand/File_Provider_Extension.plist
+++ b/iOSClient/Brand/File_Provider_Extension.plist
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
- <string>2.23.3</string>
+ <string>2.23.4</string>
<key>CFBundleVersion</key>
- <string>4</string>
+ <string>10</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionFileProviderDocumentGroup</key>
diff --git a/iOSClient/Brand/NCBrand.swift b/iOSClient/Brand/NCBrand.swift
index 0218c7581..e0cc28663 100644
--- a/iOSClient/Brand/NCBrand.swift
+++ b/iOSClient/Brand/NCBrand.swift
@@ -71,6 +71,7 @@ class NCBrandColor: NSObject {
}()
@objc public let brand: String = "Nextcloud"
+ @objc public var brandInitials: String = "nc" // Don't touch me !!
@objc public let mailMe: String = "ios@nextcloud.com"
@objc public let textCopyrightNextcloudiOS: String = "Nextcloud for iOS %@ © 2019"
@objc public let textCopyrightNextcloudServer: String = "Nextcloud Server %@"
@@ -90,8 +91,8 @@ class NCBrandColor: NSObject {
// Capabilities Group
@objc public let capabilitiesGroups: String = "group.it.twsweb.Crypto-Cloud"
- // Database key 64 char ASCII (for encryption AES-256+SHA2)
- @objc public var databaseEncryptionKey: String = "1234567890123456789012345678901234567890123456789012345678901234"
+ // User Agent
+ @objc public var userAgent: String = "Nextcloud-iOS" // Don't touch me !!
// Options
@objc public let use_login_web_personalized: Bool = false // Don't touch me !!
@@ -101,7 +102,6 @@ class NCBrandColor: NSObject {
@objc public let use_themingLogo: Bool = false
@objc public let use_middlewarePing: Bool = false
@objc public let use_storeLocalAutoUploadAll: Bool = false
- @objc public let use_database_encryption: Bool = false
@objc public let disable_intro: Bool = false
@objc public let disable_request_login_url: Bool = false
@@ -113,9 +113,10 @@ class NCBrandColor: NSObject {
override init() {
if folderBrandAutoUpload != "" {
-
- self.folderDefaultAutoUpload = self.folderBrandAutoUpload
+ folderDefaultAutoUpload = folderBrandAutoUpload
}
+
+ brandInitials = brandInitials.lowercased()
}
}
diff --git a/iOSClient/Brand/NCBridgeSwift.h b/iOSClient/Brand/NCBridgeSwift.h
index 240355240..38030e22c 100644
--- a/iOSClient/Brand/NCBridgeSwift.h
+++ b/iOSClient/Brand/NCBridgeSwift.h
@@ -47,10 +47,3 @@
#import "File_Provider_Extension-Swift.h"
#endif
-
-// Nextcloud Notification Service Extension
-#if defined(EXTENSION_NOTIFICATION_SERVICE)
-
-#import "Notification_Service_Extension-Swift.h"
-
-#endif
diff --git a/iOSClient/Brand/Notification_Service_Extension.entitlements b/iOSClient/Brand/Notification_Service_Extension.entitlements
deleted file mode 100644
index 4ecc3f0d1..000000000
--- a/iOSClient/Brand/Notification_Service_Extension.entitlements
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>com.apple.security.application-groups</key>
- <array>
- <string>group.it.twsweb.Crypto-Cloud</string>
- </array>
- <key>keychain-access-groups</key>
- <array>
- <string>$(AppIdentifierPrefix)it.twsweb.Crypto-Cloud</string>
- </array>
-</dict>
-</plist>
diff --git a/iOSClient/Brand/Notification_Service_Extension.plist b/iOSClient/Brand/Notification_Service_Extension.plist
deleted file mode 100644
index a62cf3d10..000000000
--- a/iOSClient/Brand/Notification_Service_Extension.plist
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>$(DEVELOPMENT_LANGUAGE)</string>
- <key>CFBundleDisplayName</key>
- <string>Nextcloud-NotificationServiceExtension</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIdentifier</key>
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>$(PRODUCT_NAME)</string>
- <key>CFBundlePackageType</key>
- <string>XPC!</string>
- <key>CFBundleShortVersionString</key>
- <string>2.23.3</string>
- <key>CFBundleVersion</key>
- <string>4</string>
- <key>NSExtension</key>
- <dict>
- <key>NSExtensionPointIdentifier</key>
- <string>com.apple.usernotifications.service</string>
- <key>NSExtensionPrincipalClass</key>
- <string>$(PRODUCT_MODULE_NAME).NotificationService</string>
- </dict>
-</dict>
-</plist>
diff --git a/iOSClient/Brand/Share.plist b/iOSClient/Brand/Share.plist
index f630a119f..9380fb56f 100644
--- a/iOSClient/Brand/Share.plist
+++ b/iOSClient/Brand/Share.plist
@@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
- <string>2.23.3</string>
+ <string>2.23.4</string>
<key>CFBundleVersion</key>
- <string>4</string>
+ <string>10</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
diff --git a/iOSClient/Brand/iOSClient.plist b/iOSClient/Brand/iOSClient.plist
index 31f7f7da3..e62ead533 100644
--- a/iOSClient/Brand/iOSClient.plist
+++ b/iOSClient/Brand/iOSClient.plist
@@ -46,11 +46,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
- <string>2.23.3</string>
+ <string>2.23.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>4</string>
+ <string>10</string>
<key>FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED</key>
<true/>
<key>Fabric</key>
diff --git a/iOSClient/CCGlobal.h b/iOSClient/CCGlobal.h
index fc597cac7..0bd6e7a58 100644
--- a/iOSClient/CCGlobal.h
+++ b/iOSClient/CCGlobal.h
@@ -80,8 +80,9 @@
#define k_maxErrorAutoUploadAll 100
-// Name Default DB
+// Database Realm
#define k_databaseDefault @"nextcloud.realm"
+#define k_databaseSchemaVersion 49
// Intro selector
#define k_intro_login 0
@@ -165,6 +166,7 @@
#define k_metadataStatusInUpload 7
#define k_metadataStatusUploading 8
#define k_metadataStatusUploadError 9
+#define k_metadataStatusUploadForcedStart 10
// Timer
#define k_timerProcessAutoDownloadUpload 5
@@ -273,9 +275,6 @@
#define k_action_MOD 1
#define k_action_DEL 2
-// Nextcloud unsupported
-#define k_nextcloud_unsupported 11
-
// Toolbar Detail
#define k_detail_Toolbar_Height 49
@@ -293,6 +292,9 @@
#define k_layout_view_trash @"LayoutTrash"
#define k_layout_view_offline @"LayoutOffline"
+// Nextcloud unsupported
+#define k_nextcloud_unsupported 13
+
// Nextcloud version
#define k_nextcloud_version_12_0 12
#define k_nextcloud_version_13_0 13
diff --git a/iOSClient/Database/NCDatabase.swift b/iOSClient/Database/NCDatabase.swift
index 2b2494153..9d23190b0 100644
--- a/iOSClient/Database/NCDatabase.swift
+++ b/iOSClient/Database/NCDatabase.swift
@@ -38,7 +38,12 @@ class tableAccount: Object {
@objc dynamic var autoUploadVideo: Bool = false
@objc dynamic var autoUploadWWAnPhoto: Bool = false
@objc dynamic var autoUploadWWAnVideo: Bool = false
+ @objc dynamic var businessSize: String = ""
+ @objc dynamic var businessType = ""
@objc dynamic var dateSearchContentTypeImageVideo = NSDate.distantPast
+ @objc dynamic var city = ""
+ @objc dynamic var company = ""
+ @objc dynamic var country = ""
@objc dynamic var displayName = ""
@objc dynamic var email = ""
@objc dynamic var enabled: Bool = false
@@ -51,12 +56,26 @@ class tableAccount: Object {
@objc dynamic var quotaRelative: Double = 0
@objc dynamic var quotaTotal: Double = 0
@objc dynamic var quotaUsed: Double = 0
+ @objc dynamic var role = ""
@objc dynamic var startDirectoryPhotosTab = ""
@objc dynamic var twitter = ""
@objc dynamic var url = ""
@objc dynamic var user = ""
@objc dynamic var userID = ""
@objc dynamic var webpage = ""
+ @objc dynamic var zip = ""
+ // HC
+ @objc dynamic var hcIsTrial: Bool = false
+ @objc dynamic var hcTrialExpired: Bool = false
+ @objc dynamic var hcTrialRemainingSec: Double = 0
+ @objc dynamic var hcTrialEndTime: NSDate? = nil
+ @objc dynamic var hcAccountRemoveExpired: Bool = false
+ @objc dynamic var hcAccountRemoveRemainingSec: Double = 0
+ @objc dynamic var hcAccountRemoveTime: NSDate? = nil
+
+ override static func primaryKey() -> String {
+ return "account"
+ }
}
class tableActivity: Object {
diff --git a/iOSClient/Database/NCManageDatabase.swift b/iOSClient/Database/NCManageDatabase.swift
index 2eef1b588..369635022 100644
--- a/iOSClient/Database/NCManageDatabase.swift
+++ b/iOSClient/Database/NCManageDatabase.swift
@@ -33,26 +33,22 @@ class NCManageDatabase: NSObject {
override init() {
let dirGroup = FileManager.default.containerURL(forSecurityApplicationGroupIdentifier: NCBrandOptions.sharedInstance.capabilitiesGroups)
-
- var configCompact = Realm.Configuration(
-
- fileURL: dirGroup?.appendingPathComponent("\(k_appDatabaseNextcloud)/\(k_databaseDefault)"),
-
- shouldCompactOnLaunch: { totalBytes, usedBytes in
- // totalBytes refers to the size of the file on disk in bytes (data + free space)
- // usedBytes refers to the number of bytes used by data in the file
+ let databaseFilePath = dirGroup?.appendingPathComponent("\(k_appDatabaseNextcloud)/\(k_databaseDefault)")
+
+ let configCompact = Realm.Configuration(
- // Compact if the file is over 100MB in size and less than 50% 'used'
- let oneHundredMB = 100 * 1024 * 1024
- return (totalBytes > oneHundredMB) && (Double(usedBytes) / Double(totalBytes)) < 0.5
- })
-
- // Encrypting the database file on disk with AES-256+SHA2 by supplying a 64-byte encryption key
- if NCBrandOptions.sharedInstance.use_database_encryption {
- if let keyData = NCBrandOptions.sharedInstance.databaseEncryptionKey.data(using: String.Encoding.utf8, allowLossyConversion: false) {
- configCompact.encryptionKey = keyData
+ fileURL: databaseFilePath,
+ schemaVersion: UInt64(k_databaseSchemaVersion),
+
+ shouldCompactOnLaunch: { totalBytes, usedBytes in
+ // totalBytes refers to the size of the file on disk in bytes (data + free space)
+ // usedBytes refers to the number of bytes used by data in the file
+
+ // Compact if the file is over 100MB in size and less than 50% 'used'
+ let oneHundredMB = 100 * 1024 * 1024
+ return (totalBytes > oneHundredMB) && (Double(usedBytes) / Double(totalBytes)) < 0.5
}
- }
+ )
do {
// Realm is compacted on the first open if the configuration block conditions were met.
@@ -61,80 +57,29 @@ class NCManageDatabase: NSObject {
// handle error compacting or opening Realm
}
- var config = Realm.Configuration(
+ let config = Realm.Configuration(
fileURL: dirGroup?.appendingPathComponent("\(k_appDatabaseNextcloud)/\(k_databaseDefault)"),
- schemaVersion: 43,
-
- // 10 : Version 2.18.0
- // 11 : Version 2.18.2
- // 12 : Version 2.19.0.5
- // 13 : Version 2.19.0.14
- // 14 : Version 2.19.0.xx
- // 15 : Version 2.19.2
- // 16 : Version 2.20.2
- // 17 : Version 2.20.4
- // 18 : Version 2.20.6
- // 19 : Version 2.20.7
- // 20 : Version 2.21.0
- // 21 : Version 2.21.0.3
- // 22 : Version 2.21.0.9
- // 23 : Version 2.21.0.15
- // 24 : Version 2.21.2.5
- // 25 : Version 2.21.3.1
- // 26 : Version 2.22.0.4
- // 27 : Version 2.22.0.7
- // 28 : Version 2.22.3.5
- // 29 : Version 2.22.5.2
- // 30 : Version 2.22.6.0
- // 31 : Version 2.22.6.3
- // 32 : Version 2.22.6.10
- // 33 : Version 2.22.7.1
- // 34 : Version 2.22.8.14
- // 35 : Version 2.22.8.14
- // 36 : Version 2.22.8.14
- // 37 : Version 2.22.8.14
- // 38 : Version 2.22.8.20
- // 39 : Version 2.22.9.1
- // 40 : Version 2.22.9.3
- // 41 : Version 2.22.9.5
- // 42 : Version 2.23.1.0
- // 43 : Version 2.23.2.0
-
+ schemaVersion: UInt64(k_databaseSchemaVersion),
+
migrationBlock: { migration, oldSchemaVersion in
- // We haven’t migrated anything yet, so oldSchemaVersion == 0
- /*
- if (oldSchemaVersion < 37) {
- migration.enumerateObjects(ofType: tableMetadata.className()) { oldObject, newObject in
- let account = oldObject!["account"] as! String
- let serverUrl = oldObject!["serverUrl"] as! String
- let fileName = oldObject!["fileName"] as! String
- newObject!["metadataID"] = CCUtility.createMetadataID(fromAccount: account, serverUrl: serverUrl, fileName: fileName)
- }
-
- migration.enumerateObjects(ofType: tablePhotos.className()) { oldObject, newObject in
- let account = oldObject!["account"] as! String
- let serverUrl = oldObject!["serverUrl"] as! String
- let fileName = oldObject!["fileName"] as! String
- newObject!["metadataID"] = CCUtility.createMetadataID(fromAccount: account, serverUrl: serverUrl, fileName: fileName)
- }
- }
- */
if oldSchemaVersion < 41 {
migration.deleteData(forType: tableActivity.className())
migration.deleteData(forType: tableMetadata.className())
migration.deleteData(forType: tableDirectory.className())
}
- })
-
-
- // Encrypting the database file on disk with AES-256+SHA2 by supplying a 64-byte encryption key
- if NCBrandOptions.sharedInstance.use_database_encryption {
- if let keyData = NCBrandOptions.sharedInstance.databaseEncryptionKey.data(using: String.Encoding.utf8, allowLossyConversion: false) {
- config.encryptionKey = keyData
+
+ /*
+ if oldSchemaVersion < 44 {
+ migration.enumerateObjects(ofType: tableAccount.className()) { oldObject, newObject in
+ let account = oldObject!["account"] as! String
+ let password = oldObject!["password"] as! String
+ }
+ }
+ */
}
- }
+ )
Realm.Configuration.defaultConfiguration = config
_ = try! Realm()
@@ -226,12 +171,13 @@ class NCManageDatabase: NSObject {
addObject.autoUploadWWAnVideo = true
}
-
- addObject.password = password
+
+ CCUtility.setPassword(account, password: password)
+
addObject.url = url
addObject.user = user
addObject.userID = user
-
+
realm.add(addObject)
do {
@@ -241,27 +187,17 @@ class NCManageDatabase: NSObject {
}
}
- @objc func setAccountPassword(_ account: String, password: String) -> tableAccount? {
+ @objc func updateAccount(_ account: tableAccount) {
let realm = try! Realm()
-
- realm.beginWrite()
-
- guard let result = realm.objects(tableAccount.self).filter("account = %@", account).first else {
- realm.cancelWrite()
- return nil
- }
-
- result.password = password
do {
- try realm.commitWrite()
+ try realm.write {
+ realm.add(account, update: true)
+ }
} catch let error {
print("[LOG] Could not write to database: ", error)
- return nil
}
-
- return result
}
@objc func deleteAccount(_ account: String) {
@@ -293,7 +229,7 @@ class NCManageDatabase: NSObject {
return nil
}
- return result
+ return tableAccount.init(value: result)
}
@objc func getAccounts() -> [String]? {
@@ -403,7 +339,25 @@ class NCManageDatabase: NSObject {
return nil
}
- return activeAccount
+ return tableAccount.init(value: activeAccount)
+ }
+
+ @objc func removePasswordAccount(_ account: String) {
+
+ let realm = try! Realm()
+
+ do {
+ try realm.write {
+
+ guard let result = realm.objects(tableAccount.self).filter("account = %@", account).first else {
+ return
+ }
+
+ result.password = "********"
+ }
+ } catch let error {
+ print("[LOG] Could not write to database: ", error)
+ }
}
@objc func setAccountAutoUploadProperty(_ property: String, state: Bool) {
@@ -479,15 +433,17 @@ class NCManageDatabase: NSObject {
}
}
- @objc func setAccountUserProfile(_ userProfile: OCUserProfile) -> tableAccount? {
+ @objc func setAccountUserProfile(_ userProfile: OCUserProfile, HCProperties: Bool) -> tableAccount? {
- guard let activeAccount = self.getAccountActive() else {
- return nil
- }
-
let realm = try! Realm()
+ var returnAccount = tableAccount()
+
do {
+ guard let activeAccount = self.getAccountActive() else {
+ return nil
+ }
+
try realm.write {
guard let result = realm.objects(tableAccount.self).filter("account = %@", activeAccount.account).first else {
@@ -509,17 +465,71 @@ class NCManageDatabase: NSObject {
result.twitter = userProfile.twitter
result.webpage = userProfile.webpage
+ if HCProperties {
+ result.businessSize = userProfile.businessSize
+ result.businessType = userProfile.businessType
+ result.city = userProfile.city
+ result.country = userProfile.country
+ result.company = userProfile.company
+ result.role = userProfile.role
+ result.zip = userProfile.zip
+ }
+
result.quota = userProfile.quota
result.quotaFree = userProfile.quotaFree
result.quotaRelative = userProfile.quotaRelative
result.quotaTotal = userProfile.quotaTotal
result.quotaUsed = userProfile.quotaUsed
+
+ returnAccount = result
+ }
+ } catch let error {
+ print("[LOG] Could not write to database: ", error)
+ }
+
+ return tableAccount.init(value: returnAccount)
+ }
+
+ @objc func setAccountHCFeatures(_ features: HCFeatures) -> tableAccount? {
+
+ let realm = try! Realm()
+
+ var returnAccount = tableAccount()
+
+ do {
+ guard let activeAccount = self.getAccountActive() else {
+ return nil
+ }
+
+ try realm.write {
+
+ guard let result = realm.objects(tableAccount.self).filter("account = %@", activeAccount.account).first else {
+ return
+ }
+
+ result.hcIsTrial = features.isTrial
+ result.hcTrialExpired = features.trialExpired
+ result.hcTrialRemainingSec = features.trialRemainingSec
+ if features.trialEndTime > 0 {
+ result.hcTrialEndTime = Date(timeIntervalSince1970: features.trialEndTime) as NSDate
+ } else {
+ result.hcTrialEndTime = nil
+ }
+ result.hcAccountRemoveExpired = features.accountRemoveExpired
+ result.hcAccountRemoveRemainingSec = features.accountRemoveRemainingSec
+ if features.accountRemoveTime > 0 {
+ result.hcAccountRemoveTime = Date(timeIntervalSince1970: features.accountRemoveTime) as NSDate
+ } else {
+ result.hcAccountRemoveTime = nil
+ }
+
+ returnAccount = result
}
} catch let error {
print("[LOG] Could not write to database: ", error)
}
- return activeAccount
+ return tableAccount.init(value: returnAccount)
}
@objc func setAccountDateSearchContentTypeImageVideo(_ date: Date) {
@@ -2231,7 +2241,7 @@ class NCManageDatabase: NSObject {
if (result.shareUserAndGroup.contains(share)) {
var shares : [String] = result.shareUserAndGroup.components(separatedBy: ",")
- if let index = shares.index(of:share) {
+ if let index = shares.firstIndex(of:share) {
shares.remove(at: index)
}
result.shareUserAndGroup = shares.joined(separator: ",")
diff --git a/iOSClient/Favorites/CCFavorites.m b/iOSClient/Favorites/CCFavorites.m
index 197186959..98caf2008 100644
--- a/iOSClient/Favorites/CCFavorites.m
+++ b/iOSClient/Favorites/CCFavorites.m
@@ -293,7 +293,7 @@
tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID == %@", metadataSection.fileID]];
if (metadata)
- [[NCMainCommon sharedInstance] cancelTransferMetadata:metadata reloadDatasource:true];
+ [[NCMainCommon sharedInstance] cancelTransferMetadata:metadata reloadDatasource:true uploadStatusForcedStart:false];
}
}
}
diff --git a/iOSClient/Images.xcassets/address.imageset/Contents.json b/iOSClient/Images.xcassets/address.imageset/Contents.json
new file mode 100644
index 000000000..5b5d33f9f
--- /dev/null
+++ b/iOSClient/Images.xcassets/address.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "address.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/address.imageset/address.pdf b/iOSClient/Images.xcassets/address.imageset/address.pdf
new file mode 100644
index 000000000..0860bb2b7
--- /dev/null
+++ b/iOSClient/Images.xcassets/address.imageset/address.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/businesstype.imageset/Contents.json b/iOSClient/Images.xcassets/businesstype.imageset/Contents.json
new file mode 100644
index 000000000..1c6770c98
--- /dev/null
+++ b/iOSClient/Images.xcassets/businesstype.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "businesstype.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/businesstype.imageset/businesstype.pdf b/iOSClient/Images.xcassets/businesstype.imageset/businesstype.pdf
new file mode 100644
index 000000000..fd349393c
--- /dev/null
+++ b/iOSClient/Images.xcassets/businesstype.imageset/businesstype.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/checkedYes.imageset/checkedYes.pdf b/iOSClient/Images.xcassets/checkedYes.imageset/checkedYes.pdf
index 80ac178cb..d6f58c15e 100644
--- a/iOSClient/Images.xcassets/checkedYes.imageset/checkedYes.pdf
+++ b/iOSClient/Images.xcassets/checkedYes.imageset/checkedYes.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/city.imageset/Contents.json b/iOSClient/Images.xcassets/city.imageset/Contents.json
new file mode 100644
index 000000000..91e3e1fe0
--- /dev/null
+++ b/iOSClient/Images.xcassets/city.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "city.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/city.imageset/city.pdf b/iOSClient/Images.xcassets/city.imageset/city.pdf
new file mode 100644
index 000000000..3bf8a0dc8
--- /dev/null
+++ b/iOSClient/Images.xcassets/city.imageset/city.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/cityzip.imageset/Contents.json b/iOSClient/Images.xcassets/cityzip.imageset/Contents.json
new file mode 100644
index 000000000..5f7eb3384
--- /dev/null
+++ b/iOSClient/Images.xcassets/cityzip.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "cityzip.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/cityzip.imageset/cityzip.pdf b/iOSClient/Images.xcassets/cityzip.imageset/cityzip.pdf
new file mode 100644
index 000000000..2ceae8c76
--- /dev/null
+++ b/iOSClient/Images.xcassets/cityzip.imageset/cityzip.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/company.imageset/Contents.json b/iOSClient/Images.xcassets/company.imageset/Contents.json
new file mode 100644
index 000000000..e2f8bd474
--- /dev/null
+++ b/iOSClient/Images.xcassets/company.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "company.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/company.imageset/company.pdf b/iOSClient/Images.xcassets/company.imageset/company.pdf
new file mode 100644
index 000000000..eee8b91aa
--- /dev/null
+++ b/iOSClient/Images.xcassets/company.imageset/company.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/country.imageset/Contents.json b/iOSClient/Images.xcassets/country.imageset/Contents.json
new file mode 100644
index 000000000..a2a693d28
--- /dev/null
+++ b/iOSClient/Images.xcassets/country.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "country.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/country.imageset/country.pdf b/iOSClient/Images.xcassets/country.imageset/country.pdf
new file mode 100644
index 000000000..f9667fe22
--- /dev/null
+++ b/iOSClient/Images.xcassets/country.imageset/country.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/crashservice.imageset/Contents.json b/iOSClient/Images.xcassets/crashservice.imageset/Contents.json
new file mode 100644
index 000000000..445b983e3
--- /dev/null
+++ b/iOSClient/Images.xcassets/crashservice.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "crashservice.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/crashservice.imageset/crashservice.pdf b/iOSClient/Images.xcassets/crashservice.imageset/crashservice.pdf
new file mode 100644
index 000000000..5efb36c1d
--- /dev/null
+++ b/iOSClient/Images.xcassets/crashservice.imageset/crashservice.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/editUserProfile.imageset/Contents.json b/iOSClient/Images.xcassets/editUserProfile.imageset/Contents.json
new file mode 100644
index 000000000..ae240a41a
--- /dev/null
+++ b/iOSClient/Images.xcassets/editUserProfile.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "editUserProfile.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/editUserProfile.imageset/editUserProfile.pdf b/iOSClient/Images.xcassets/editUserProfile.imageset/editUserProfile.pdf
new file mode 100644
index 000000000..b3fbbbd0b
--- /dev/null
+++ b/iOSClient/Images.xcassets/editUserProfile.imageset/editUserProfile.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/email.imageset/Contents.json b/iOSClient/Images.xcassets/email.imageset/Contents.json
new file mode 100644
index 000000000..565a76d80
--- /dev/null
+++ b/iOSClient/Images.xcassets/email.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "mail.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/email.imageset/mail.pdf b/iOSClient/Images.xcassets/email.imageset/mail.pdf
new file mode 100644
index 000000000..33d54d385
--- /dev/null
+++ b/iOSClient/Images.xcassets/email.imageset/mail.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/phone.imageset/Contents.json b/iOSClient/Images.xcassets/phone.imageset/Contents.json
new file mode 100644
index 000000000..1bdf7a5d9
--- /dev/null
+++ b/iOSClient/Images.xcassets/phone.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "phone.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/phone.imageset/phone.pdf b/iOSClient/Images.xcassets/phone.imageset/phone.pdf
new file mode 100644
index 000000000..b686cc423
--- /dev/null
+++ b/iOSClient/Images.xcassets/phone.imageset/phone.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/role.imageset/Contents.json b/iOSClient/Images.xcassets/role.imageset/Contents.json
new file mode 100644
index 000000000..33866e577
--- /dev/null
+++ b/iOSClient/Images.xcassets/role.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "role.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/role.imageset/role.pdf b/iOSClient/Images.xcassets/role.imageset/role.pdf
new file mode 100644
index 000000000..9f7dcfb04
--- /dev/null
+++ b/iOSClient/Images.xcassets/role.imageset/role.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/twitter.imageset/Contents.json b/iOSClient/Images.xcassets/twitter.imageset/Contents.json
new file mode 100644
index 000000000..bf338730b
--- /dev/null
+++ b/iOSClient/Images.xcassets/twitter.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "twitter.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/twitter.imageset/twitter.pdf b/iOSClient/Images.xcassets/twitter.imageset/twitter.pdf
new file mode 100644
index 000000000..7cd6ccfa6
--- /dev/null
+++ b/iOSClient/Images.xcassets/twitter.imageset/twitter.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/user.imageset/Contents.json b/iOSClient/Images.xcassets/user.imageset/Contents.json
new file mode 100644
index 000000000..f231d18f8
--- /dev/null
+++ b/iOSClient/Images.xcassets/user.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "user.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/user.imageset/user.pdf b/iOSClient/Images.xcassets/user.imageset/user.pdf
new file mode 100644
index 000000000..376c2bf39
--- /dev/null
+++ b/iOSClient/Images.xcassets/user.imageset/user.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/users.imageset/Contents.json b/iOSClient/Images.xcassets/users.imageset/Contents.json
new file mode 100644
index 000000000..18de8b11f
--- /dev/null
+++ b/iOSClient/Images.xcassets/users.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "users.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/users.imageset/users.pdf b/iOSClient/Images.xcassets/users.imageset/users.pdf
new file mode 100644
index 000000000..d85e5b544
--- /dev/null
+++ b/iOSClient/Images.xcassets/users.imageset/users.pdf
Binary files differ
diff --git a/iOSClient/Images.xcassets/web.imageset/Contents.json b/iOSClient/Images.xcassets/web.imageset/Contents.json
new file mode 100644
index 000000000..7a11edfd7
--- /dev/null
+++ b/iOSClient/Images.xcassets/web.imageset/Contents.json
@@ -0,0 +1,15 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "web.pdf"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ },
+ "properties" : {
+ "preserves-vector-representation" : true
+ }
+} \ No newline at end of file
diff --git a/iOSClient/Images.xcassets/web.imageset/web.pdf b/iOSClient/Images.xcassets/web.imageset/web.pdf
new file mode 100644
index 000000000..4bc529391
--- /dev/null
+++ b/iOSClient/Images.xcassets/web.imageset/web.pdf
Binary files differ
diff --git a/iOSClient/Library/DropdownMenu/DropUpMenu.swift b/iOSClient/Library/DropdownMenu/DropUpMenu.swift
index 1ab9c30aa..4daf9fc65 100755
--- a/iOSClient/Library/DropdownMenu/DropUpMenu.swift
+++ b/iOSClient/Library/DropdownMenu/DropUpMenu.swift
@@ -119,10 +119,10 @@ open class DropUpMenu: UIView {
}
tableView.translatesAutoresizingMaskIntoConstraints = false
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant:0)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: tableViewHeight)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView as Any, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant:0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView as Any, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: tableViewHeight)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView as Any, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView as Any, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0)])
}
fileprivate func setupBottomSeperatorView() {
@@ -141,10 +141,10 @@ open class DropUpMenu: UIView {
barCoverView.backgroundColor = UIColor.clear
barCoverView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(barCoverView)
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: barCoverView, attribute: .bottom, relatedBy: .equal, toItem: view, attribute: .bottom, multiplier: 1.0, constant: 0)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: barCoverView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: bottomOffsetY)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: barCoverView, attribute: .left, relatedBy: .equal, toItem: view, attribute: .left, multiplier: 1.0, constant: 0)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: barCoverView, attribute: .right, relatedBy: .equal, toItem: view, attribute: .right, multiplier: 1.0, constant: 0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: barCoverView as Any, attribute: .bottom, relatedBy: .equal, toItem: view, attribute: .bottom, multiplier: 1.0, constant: 0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: barCoverView as Any, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: bottomOffsetY)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: barCoverView as Any, attribute: .left, relatedBy: .equal, toItem: view, attribute: .left, multiplier: 1.0, constant: 0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: barCoverView as Any, attribute: .right, relatedBy: .equal, toItem: view, attribute: .right, multiplier: 1.0, constant: 0)])
barCoverView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(hideMenu)))
}
diff --git a/iOSClient/Library/DropdownMenu/DropdownMenu.swift b/iOSClient/Library/DropdownMenu/DropdownMenu.swift
index c0f81f17b..396773859 100755
--- a/iOSClient/Library/DropdownMenu/DropdownMenu.swift
+++ b/iOSClient/Library/DropdownMenu/DropdownMenu.swift
@@ -208,10 +208,10 @@ open class DropdownMenu: UIView {
}
}
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant:0)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: tableViewHeight)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0)])
- NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView as Any, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1.0, constant:0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView as Any, attribute: .height, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: tableViewHeight)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView as Any, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1.0, constant: 0)])
+ NSLayoutConstraint.activate([NSLayoutConstraint.init(item: tableView as Any, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1.0, constant: 0)])
}
fileprivate func setupTopSeperatorView() {
diff --git a/iOSClient/Library/DropdownMenu/SectionHeader.swift b/iOSClient/Library/DropdownMenu/SectionHeader.swift
index ca39a219a..8ac61ddb9 100755
--- a/iOSClient/Library/DropdownMenu/SectionHeader.swift
+++ b/iOSClient/Library/DropdownMenu/SectionHeader.swift
@@ -36,18 +36,18 @@ open class SectionHeader: UIView {
func updateTitleLabelConstraint() {
if #available(iOS 11.0, *) {
- let leftConstraint = NSLayoutConstraint(item: titleLabel, attribute: .left, relatedBy: .equal, toItem: safeAreaLayoutGuide, attribute: .left, multiplier: 1.0, constant: style.bottomPadding)
+ let leftConstraint = NSLayoutConstraint(item: titleLabel as Any, attribute: .left, relatedBy: .equal, toItem: safeAreaLayoutGuide, attribute: .left, multiplier: 1.0, constant: style.bottomPadding)
NSLayoutConstraint.activate([leftConstraint])
} else {
// Fallback on earlier versions
- let constraints = NSLayoutConstraint.constraints(withVisualFormat: "H:|-leftPadding-[titleLabel]->=20-|", options: [], metrics: ["leftPadding": style.leftPadding], views: ["titleLabel": titleLabel])
+ let constraints = NSLayoutConstraint.constraints(withVisualFormat: "H:|-leftPadding-[titleLabel]->=20-|", options: [], metrics: ["leftPadding": style.leftPadding], views: ["titleLabel": titleLabel as Any])
addConstraints(constraints)
}
if style.shouldTitleCenterVertically {
- let centerY = NSLayoutConstraint(item: titleLabel, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .centerY, multiplier: 1.0, constant: 0)
+ let centerY = NSLayoutConstraint(item: titleLabel as Any, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .centerY, multiplier: 1.0, constant: 0)
addConstraint(centerY)
} else {
- let vConstraints = NSLayoutConstraint(item: titleLabel, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: style.bottomPadding)
+ let vConstraints = NSLayoutConstraint(item: titleLabel as Any, attribute: .bottom, relatedBy: .equal, toItem: self, attribute: .bottom, multiplier: 1.0, constant: style.bottomPadding)
addConstraint(vConstraints)
}
}
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFHTTPSessionManager.h b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFHTTPSessionManager.h
deleted file mode 100755
index 5ce279a65..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFHTTPSessionManager.h
+++ /dev/null
@@ -1,295 +0,0 @@
-// AFHTTPSessionManager.h
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import <Foundation/Foundation.h>
-#if !TARGET_OS_WATCH
-#import <SystemConfiguration/SystemConfiguration.h>
-#endif
-#import <TargetConditionals.h>
-
-#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
-#import <MobileCoreServices/MobileCoreServices.h>
-#else
-#import <CoreServices/CoreServices.h>
-#endif
-
-#import "AFURLSessionManager.h"
-
-/**
- `AFHTTPSessionManager` is a subclass of `AFURLSessionManager` with convenience methods for making HTTP requests. When a `baseURL` is provided, requests made with the `GET` / `POST` / et al. convenience methods can be made with relative paths.
-
- ## Subclassing Notes
-
- Developers targeting iOS 7 or Mac OS X 10.9 or later that deal extensively with a web service are encouraged to subclass `AFHTTPSessionManager`, providing a class method that returns a shared singleton object on which authentication and other configuration can be shared across the application.
-
- For developers targeting iOS 6 or Mac OS X 10.8 or earlier, `AFHTTPRequestOperationManager` may be used to similar effect.
-
- ## Methods to Override
-
- To change the behavior of all data task operation construction, which is also used in the `GET` / `POST` / et al. convenience methods, override `dataTaskWithRequest:completionHandler:`.
-
- ## Serialization
-
- Requests created by an HTTP client will contain default headers and encode parameters according to the `requestSerializer` property, which is an object conforming to `<AFURLRequestSerialization>`.
-
- Responses received from the server are automatically validated and serialized by the `responseSerializers` property, which is an object conforming to `<AFURLResponseSerialization>`
-
- ## URL Construction Using Relative Paths
-
- For HTTP convenience methods, the request serializer constructs URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`, when provided. If `baseURL` is `nil`, `path` needs to resolve to a valid `NSURL` object using `NSURL +URLWithString:`.
-
- Below are a few examples of how `baseURL` and relative paths interact:
-
- NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"];
- [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo
- [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz
- [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo
- [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo
- [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/
- [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/
-
- Also important to note is that a trailing slash will be added to any `baseURL` without one. This would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash.
-
- @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.
- */
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface AFHTTPSessionManager : AFURLSessionManager <NSSecureCoding, NSCopying>
-
-/**
- The URL used to construct requests from relative paths in methods like `requestWithMethod:URLString:parameters:`, and the `GET` / `POST` / et al. convenience methods.
- */
-@property (readonly, nonatomic, strong, nullable) NSURL *baseURL;
-
-/**
- Requests created with `requestWithMethod:URLString:parameters:` & `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:` are constructed with a set of default headers using a parameter serialization specified by this property. By default, this is set to an instance of `AFHTTPRequestSerializer`, which serializes query string parameters for `GET`, `HEAD`, and `DELETE` requests, or otherwise URL-form-encodes HTTP message bodies.
-
- @warning `requestSerializer` must not be `nil`.
- */
-@property (nonatomic, strong) AFHTTPRequestSerializer <AFURLRequestSerialization> * requestSerializer;
-
-/**
- Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.
-
- @warning `responseSerializer` must not be `nil`.
- */
-@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer;
-
-///---------------------
-/// @name Initialization
-///---------------------
-
-/**
- Creates and returns an `AFHTTPSessionManager` object.
- */
-+ (instancetype)manager;
-
-/**
- Initializes an `AFHTTPSessionManager` object with the specified base URL.
-
- @param url The base URL for the HTTP client.
-
- @return The newly-initialized HTTP client
- */
-- (instancetype)initWithBaseURL:(nullable NSURL *)url;
-
-/**
- Initializes an `AFHTTPSessionManager` object with the specified base URL.
-
- This is the designated initializer.
-
- @param url The base URL for the HTTP client.
- @param configuration The configuration used to create the managed session.
-
- @return The newly-initialized HTTP client
- */
-- (instancetype)initWithBaseURL:(nullable NSURL *)url
- sessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
-
-///---------------------------
-/// @name Making HTTP Requests
-///---------------------------
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a `GET` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
- parameters:(nullable id)parameters
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
-
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a `GET` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param downloadProgress A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)GET:(NSString *)URLString
- parameters:(nullable id)parameters
- progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgress
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a `HEAD` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes a single arguments: the data task.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)HEAD:(NSString *)URLString
- parameters:(nullable id)parameters
- success:(nullable void (^)(NSURLSessionDataTask *task))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a `POST` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(nullable id)parameters
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a `POST` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(nullable id)parameters
- progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(nullable id)parameters
- constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure DEPRECATED_ATTRIBUTE;
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a multipart `POST` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
- @param uploadProgress A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(nullable id)parameters
- constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
- progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgress
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a `PUT` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)PUT:(NSString *)URLString
- parameters:(nullable id)parameters
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a `PATCH` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)PATCH:(NSString *)URLString
- parameters:(nullable id)parameters
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
-
-/**
- Creates and runs an `NSURLSessionDataTask` with a `DELETE` request.
-
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded according to the client request serializer.
- @param success A block object to be executed when the task finishes successfully. This block has no return value and takes two arguments: the data task, and the response object created by the client response serializer.
- @param failure A block object to be executed when the task finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes a two arguments: the data task and the error describing the network or parsing error that occurred.
-
- @see -dataTaskWithRequest:completionHandler:
- */
-- (nullable NSURLSessionDataTask *)DELETE:(NSString *)URLString
- parameters:(nullable id)parameters
- success:(nullable void (^)(NSURLSessionDataTask *task, id _Nullable responseObject))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable task, NSError *error))failure;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFHTTPSessionManager.m b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFHTTPSessionManager.m
deleted file mode 100755
index 259107060..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFHTTPSessionManager.m
+++ /dev/null
@@ -1,361 +0,0 @@
-// AFHTTPSessionManager.m
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import "AFHTTPSessionManager.h"
-
-#import "AFURLRequestSerialization.h"
-#import "AFURLResponseSerialization.h"
-
-#import <Availability.h>
-#import <TargetConditionals.h>
-#import <Security/Security.h>
-
-#import <netinet/in.h>
-#import <netinet6/in6.h>
-#import <arpa/inet.h>
-#import <ifaddrs.h>
-#import <netdb.h>
-
-#if TARGET_OS_IOS || TARGET_OS_TV
-#import <UIKit/UIKit.h>
-#elif TARGET_OS_WATCH
-#import <WatchKit/WatchKit.h>
-#endif
-
-@interface AFHTTPSessionManager ()
-@property (readwrite, nonatomic, strong) NSURL *baseURL;
-@end
-
-@implementation AFHTTPSessionManager
-@dynamic responseSerializer;
-
-+ (instancetype)manager {
- return [[[self class] alloc] initWithBaseURL:nil];
-}
-
-- (instancetype)init {
- return [self initWithBaseURL:nil];
-}
-
-- (instancetype)initWithBaseURL:(NSURL *)url {
- return [self initWithBaseURL:url sessionConfiguration:nil];
-}
-
-- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
- return [self initWithBaseURL:nil sessionConfiguration:configuration];
-}
-
-- (instancetype)initWithBaseURL:(NSURL *)url
- sessionConfiguration:(NSURLSessionConfiguration *)configuration
-{
- self = [super initWithSessionConfiguration:configuration];
- if (!self) {
- return nil;
- }
-
- // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected
- if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) {
- url = [url URLByAppendingPathComponent:@""];
- }
-
- self.baseURL = url;
-
- self.requestSerializer = [AFHTTPRequestSerializer serializer];
- self.responseSerializer = [AFJSONResponseSerializer serializer];
-
- return self;
-}
-
-#pragma mark -
-
-- (void)setRequestSerializer:(AFHTTPRequestSerializer <AFURLRequestSerialization> *)requestSerializer {
- NSParameterAssert(requestSerializer);
-
- _requestSerializer = requestSerializer;
-}
-
-- (void)setResponseSerializer:(AFHTTPResponseSerializer <AFURLResponseSerialization> *)responseSerializer {
- NSParameterAssert(responseSerializer);
-
- [super setResponseSerializer:responseSerializer];
-}
-
-#pragma mark -
-
-- (NSURLSessionDataTask *)GET:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
-{
-
- return [self GET:URLString parameters:parameters progress:nil success:success failure:failure];
-}
-
-- (NSURLSessionDataTask *)GET:(NSString *)URLString
- parameters:(id)parameters
- progress:(void (^)(NSProgress * _Nonnull))downloadProgress
- success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
- failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
-{
-
- NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"GET"
- URLString:URLString
- parameters:parameters
- uploadProgress:nil
- downloadProgress:downloadProgress
- success:success
- failure:failure];
-
- [dataTask resume];
-
- return dataTask;
-}
-
-- (NSURLSessionDataTask *)HEAD:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task))success
- failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
-{
- NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"HEAD" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:^(NSURLSessionDataTask *task, __unused id responseObject) {
- if (success) {
- success(task);
- }
- } failure:failure];
-
- [dataTask resume];
-
- return dataTask;
-}
-
-- (NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
-{
- return [self POST:URLString parameters:parameters progress:nil success:success failure:failure];
-}
-
-- (NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(id)parameters
- progress:(void (^)(NSProgress * _Nonnull))uploadProgress
- success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
- failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
-{
- NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"POST" URLString:URLString parameters:parameters uploadProgress:uploadProgress downloadProgress:nil success:success failure:failure];
-
- [dataTask resume];
-
- return dataTask;
-}
-
-- (NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(nullable id)parameters
- constructingBodyWithBlock:(nullable void (^)(id<AFMultipartFormData> _Nonnull))block
- success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
- failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure
-{
- return [self POST:URLString parameters:parameters constructingBodyWithBlock:block progress:nil success:success failure:failure];
-}
-
-- (NSURLSessionDataTask *)POST:(NSString *)URLString
- parameters:(id)parameters
- constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
- progress:(nullable void (^)(NSProgress * _Nonnull))uploadProgress
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
-{
- NSError *serializationError = nil;
- NSMutableURLRequest *request = [self.requestSerializer multipartFormRequestWithMethod:@"POST" URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters constructingBodyWithBlock:block error:&serializationError];
- if (serializationError) {
- if (failure) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wgnu"
- dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
- failure(nil, serializationError);
- });
-#pragma clang diagnostic pop
- }
-
- return nil;
- }
-
- __block NSURLSessionDataTask *task = [self uploadTaskWithStreamedRequest:request progress:uploadProgress completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) {
- if (error) {
- if (failure) {
- failure(task, error);
- }
- } else {
- if (success) {
- success(task, responseObject);
- }
- }
- }];
-
- [task resume];
-
- return task;
-}
-
-- (NSURLSessionDataTask *)PUT:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
-{
- NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PUT" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
-
- [dataTask resume];
-
- return dataTask;
-}
-
-- (NSURLSessionDataTask *)PATCH:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
-{
- NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"PATCH" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
-
- [dataTask resume];
-
- return dataTask;
-}
-
-- (NSURLSessionDataTask *)DELETE:(NSString *)URLString
- parameters:(id)parameters
- success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
- failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure
-{
- NSURLSessionDataTask *dataTask = [self dataTaskWithHTTPMethod:@"DELETE" URLString:URLString parameters:parameters uploadProgress:nil downloadProgress:nil success:success failure:failure];
-
- [dataTask resume];
-
- return dataTask;
-}
-
-- (NSURLSessionDataTask *)dataTaskWithHTTPMethod:(NSString *)method
- URLString:(NSString *)URLString
- parameters:(id)parameters
- uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgress
- downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgress
- success:(void (^)(NSURLSessionDataTask *, id))success
- failure:(void (^)(NSURLSessionDataTask *, NSError *))failure
-{
- NSError *serializationError = nil;
- NSMutableURLRequest *request = [self.requestSerializer requestWithMethod:method URLString:[[NSURL URLWithString:URLString relativeToURL:self.baseURL] absoluteString] parameters:parameters error:&serializationError];
- if (serializationError) {
- if (failure) {
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wgnu"
- dispatch_async(self.completionQueue ?: dispatch_get_main_queue(), ^{
- failure(nil, serializationError);
- });
-#pragma clang diagnostic pop
- }
-
- return nil;
- }
-
- __block NSURLSessionDataTask *dataTask = nil;
- dataTask = [self dataTaskWithRequest:request
- uploadProgress:uploadProgress
- downloadProgress:downloadProgress
- completionHandler:^(NSURLResponse * __unused response, id responseObject, NSError *error) {
- if (error) {
- if (failure) {
- failure(dataTask, error);
- }
- } else {
- if (success) {
- success(dataTask, responseObject);
- }
- }
- }];
-
- return dataTask;
-}
-
-#pragma mark - NSObject
-
-- (NSString *)description {
- return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.session, self.operationQueue];
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- NSURL *baseURL = [decoder decodeObjectOfClass:[NSURL class] forKey:NSStringFromSelector(@selector(baseURL))];
- NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"];
- if (!configuration) {
- NSString *configurationIdentifier = [decoder decodeObjectOfClass:[NSString class] forKey:@"identifier"];
- if (configurationIdentifier) {
-#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 80000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1100)
- configuration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:configurationIdentifier];
-#else
- configuration = [NSURLSessionConfiguration backgroundSessionConfiguration:configurationIdentifier];
-#endif
- }
- }
-
- self = [self initWithBaseURL:baseURL sessionConfiguration:configuration];
- if (!self) {
- return nil;
- }
-
- self.requestSerializer = [decoder decodeObjectOfClass:[AFHTTPRequestSerializer class] forKey:NSStringFromSelector(@selector(requestSerializer))];
- self.responseSerializer = [decoder decodeObjectOfClass:[AFHTTPResponseSerializer class] forKey:NSStringFromSelector(@selector(responseSerializer))];
- AFSecurityPolicy *decodedPolicy = [decoder decodeObjectOfClass:[AFSecurityPolicy class] forKey:NSStringFromSelector(@selector(securityPolicy))];
- if (decodedPolicy) {
- self.securityPolicy = decodedPolicy;
- }
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [super encodeWithCoder:coder];
-
- [coder encodeObject:self.baseURL forKey:NSStringFromSelector(@selector(baseURL))];
- if ([self.session.configuration conformsToProtocol:@protocol(NSCoding)]) {
- [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"];
- } else {
- [coder encodeObject:self.session.configuration.identifier forKey:@"identifier"];
- }
- [coder encodeObject:self.requestSerializer forKey:NSStringFromSelector(@selector(requestSerializer))];
- [coder encodeObject:self.responseSerializer forKey:NSStringFromSelector(@selector(responseSerializer))];
- [coder encodeObject:self.securityPolicy forKey:NSStringFromSelector(@selector(securityPolicy))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFHTTPSessionManager *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL sessionConfiguration:self.session.configuration];
-
- HTTPClient.requestSerializer = [self.requestSerializer copyWithZone:zone];
- HTTPClient.responseSerializer = [self.responseSerializer copyWithZone:zone];
- HTTPClient.securityPolicy = [self.securityPolicy copyWithZone:zone];
- return HTTPClient;
-}
-
-@end
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworkReachabilityManager.h b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworkReachabilityManager.h
deleted file mode 100755
index 0feb18d39..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworkReachabilityManager.h
+++ /dev/null
@@ -1,206 +0,0 @@
-// AFNetworkReachabilityManager.h
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import <Foundation/Foundation.h>
-
-#if !TARGET_OS_WATCH
-#import <SystemConfiguration/SystemConfiguration.h>
-
-typedef NS_ENUM(NSInteger, AFNetworkReachabilityStatus) {
- AFNetworkReachabilityStatusUnknown = -1,
- AFNetworkReachabilityStatusNotReachable = 0,
- AFNetworkReachabilityStatusReachableViaWWAN = 1,
- AFNetworkReachabilityStatusReachableViaWiFi = 2,
-};
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- `AFNetworkReachabilityManager` monitors the reachability of domains, and addresses for both WWAN and WiFi network interfaces.
-
- Reachability can be used to determine background information about why a network operation failed, or to trigger a network operation retrying when a connection is established. It should not be used to prevent a user from initiating a network request, as it's possible that an initial request may be required to establish reachability.
-
- See Apple's Reachability Sample Code ( https://developer.apple.com/library/ios/samplecode/reachability/ )
-
- @warning Instances of `AFNetworkReachabilityManager` must be started with `-startMonitoring` before reachability status can be determined.
- */
-@interface AFNetworkReachabilityManager : NSObject
-
-/**
- The current network reachability status.
- */
-@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
-
-/**
- Whether or not the network is currently reachable.
- */
-@property (readonly, nonatomic, assign, getter = isReachable) BOOL reachable;
-
-/**
- Whether or not the network is currently reachable via WWAN.
- */
-@property (readonly, nonatomic, assign, getter = isReachableViaWWAN) BOOL reachableViaWWAN;
-
-/**
- Whether or not the network is currently reachable via WiFi.
- */
-@property (readonly, nonatomic, assign, getter = isReachableViaWiFi) BOOL reachableViaWiFi;
-
-///---------------------
-/// @name Initialization
-///---------------------
-
-/**
- Returns the shared network reachability manager.
- */
-+ (instancetype)sharedManager;
-
-/**
- Creates and returns a network reachability manager with the default socket address.
-
- @return An initialized network reachability manager, actively monitoring the default socket address.
- */
-+ (instancetype)manager;
-
-/**
- Creates and returns a network reachability manager for the specified domain.
-
- @param domain The domain used to evaluate network reachability.
-
- @return An initialized network reachability manager, actively monitoring the specified domain.
- */
-+ (instancetype)managerForDomain:(NSString *)domain;
-
-/**
- Creates and returns a network reachability manager for the socket address.
-
- @param address The socket address (`sockaddr_in6`) used to evaluate network reachability.
-
- @return An initialized network reachability manager, actively monitoring the specified socket address.
- */
-+ (instancetype)managerForAddress:(const void *)address;
-
-/**
- Initializes an instance of a network reachability manager from the specified reachability object.
-
- @param reachability The reachability object to monitor.
-
- @return An initialized network reachability manager, actively monitoring the specified reachability.
- */
-- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability NS_DESIGNATED_INITIALIZER;
-
-///--------------------------------------------------
-/// @name Starting & Stopping Reachability Monitoring
-///--------------------------------------------------
-
-/**
- Starts monitoring for changes in network reachability status.
- */
-- (void)startMonitoring;
-
-/**
- Stops monitoring for changes in network reachability status.
- */
-- (void)stopMonitoring;
-
-///-------------------------------------------------
-/// @name Getting Localized Reachability Description
-///-------------------------------------------------
-
-/**
- Returns a localized string representation of the current network reachability status.
- */
-- (NSString *)localizedNetworkReachabilityStatusString;
-
-///---------------------------------------------------
-/// @name Setting Network Reachability Change Callback
-///---------------------------------------------------
-
-/**
- Sets a callback to be executed when the network availability of the `baseURL` host changes.
-
- @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`.
- */
-- (void)setReachabilityStatusChangeBlock:(nullable void (^)(AFNetworkReachabilityStatus status))block;
-
-@end
-
-///----------------
-/// @name Constants
-///----------------
-
-/**
- ## Network Reachability
-
- The following constants are provided by `AFNetworkReachabilityManager` as possible network reachability statuses.
-
- enum {
- AFNetworkReachabilityStatusUnknown,
- AFNetworkReachabilityStatusNotReachable,
- AFNetworkReachabilityStatusReachableViaWWAN,
- AFNetworkReachabilityStatusReachableViaWiFi,
- }
-
- `AFNetworkReachabilityStatusUnknown`
- The `baseURL` host reachability is not known.
-
- `AFNetworkReachabilityStatusNotReachable`
- The `baseURL` host cannot be reached.
-
- `AFNetworkReachabilityStatusReachableViaWWAN`
- The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS.
-
- `AFNetworkReachabilityStatusReachableViaWiFi`
- The `baseURL` host can be reached via a Wi-Fi connection.
-
- ### Keys for Notification UserInfo Dictionary
-
- Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification.
-
- `AFNetworkingReachabilityNotificationStatusItem`
- A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification.
- The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status.
- */
-
-///--------------------
-/// @name Notifications
-///--------------------
-
-/**
- Posted when network reachability changes.
- This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability.
-
- @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import <SystemConfiguration/SystemConfiguration.h>` to the header prefix of the project (`Prefix.pch`).
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityDidChangeNotification;
-FOUNDATION_EXPORT NSString * const AFNetworkingReachabilityNotificationStatusItem;
-
-///--------------------
-/// @name Functions
-///--------------------
-
-/**
- Returns a localized string representation of an `AFNetworkReachabilityStatus` value.
- */
-FOUNDATION_EXPORT NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status);
-
-NS_ASSUME_NONNULL_END
-#endif
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworkReachabilityManager.m b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworkReachabilityManager.m
deleted file mode 100755
index d45836485..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworkReachabilityManager.m
+++ /dev/null
@@ -1,263 +0,0 @@
-// AFNetworkReachabilityManager.m
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import "AFNetworkReachabilityManager.h"
-#if !TARGET_OS_WATCH
-
-#import <netinet/in.h>
-#import <netinet6/in6.h>
-#import <arpa/inet.h>
-#import <ifaddrs.h>
-#import <netdb.h>
-
-NSString * const AFNetworkingReachabilityDidChangeNotification = @"com.alamofire.networking.reachability.change";
-NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworkingReachabilityNotificationStatusItem";
-
-typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status);
-
-NSString * AFStringFromNetworkReachabilityStatus(AFNetworkReachabilityStatus status) {
- switch (status) {
- case AFNetworkReachabilityStatusNotReachable:
- return NSLocalizedStringFromTable(@"Not Reachable", @"AFNetworking", nil);
- case AFNetworkReachabilityStatusReachableViaWWAN:
- return NSLocalizedStringFromTable(@"Reachable via WWAN", @"AFNetworking", nil);
- case AFNetworkReachabilityStatusReachableViaWiFi:
- return NSLocalizedStringFromTable(@"Reachable via WiFi", @"AFNetworking", nil);
- case AFNetworkReachabilityStatusUnknown:
- default:
- return NSLocalizedStringFromTable(@"Unknown", @"AFNetworking", nil);
- }
-}
-
-static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetworkReachabilityFlags flags) {
- BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0);
- BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0);
- BOOL canConnectionAutomatically = (((flags & kSCNetworkReachabilityFlagsConnectionOnDemand ) != 0) || ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0));
- BOOL canConnectWithoutUserInteraction = (canConnectionAutomatically && (flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0);
- BOOL isNetworkReachable = (isReachable && (!needsConnection || canConnectWithoutUserInteraction));
-
- AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusUnknown;
- if (isNetworkReachable == NO) {
- status = AFNetworkReachabilityStatusNotReachable;
- }
-#if TARGET_OS_IPHONE
- else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) {
- status = AFNetworkReachabilityStatusReachableViaWWAN;
- }
-#endif
- else {
- status = AFNetworkReachabilityStatusReachableViaWiFi;
- }
-
- return status;
-}
-
-/**
- * Queue a status change notification for the main thread.
- *
- * This is done to ensure that the notifications are received in the same order
- * as they are sent. If notifications are sent directly, it is possible that
- * a queued notification (for an earlier status condition) is processed after
- * the later update, resulting in the listener being left in the wrong state.
- */
-static void AFPostReachabilityStatusChange(SCNetworkReachabilityFlags flags, AFNetworkReachabilityStatusBlock block) {
- AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags);
- dispatch_async(dispatch_get_main_queue(), ^{
- if (block) {
- block(status);
- }
- NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter];
- NSDictionary *userInfo = @{ AFNetworkingReachabilityNotificationStatusItem: @(status) };
- [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:userInfo];
- });
-}
-
-static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) {
- AFPostReachabilityStatusChange(flags, (__bridge AFNetworkReachabilityStatusBlock)info);
-}
-
-
-static const void * AFNetworkReachabilityRetainCallback(const void *info) {
- return Block_copy(info);
-}
-
-static void AFNetworkReachabilityReleaseCallback(const void *info) {
- if (info) {
- Block_release(info);
- }
-}
-
-@interface AFNetworkReachabilityManager ()
-@property (readonly, nonatomic, assign) SCNetworkReachabilityRef networkReachability;
-@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus;
-@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock;
-@end
-
-@implementation AFNetworkReachabilityManager
-
-+ (instancetype)sharedManager {
- static AFNetworkReachabilityManager *_sharedManager = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- _sharedManager = [self manager];
- });
-
- return _sharedManager;
-}
-
-+ (instancetype)managerForDomain:(NSString *)domain {
- SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [domain UTF8String]);
-
- AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
-
- CFRelease(reachability);
-
- return manager;
-}
-
-+ (instancetype)managerForAddress:(const void *)address {
- SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)address);
- AFNetworkReachabilityManager *manager = [[self alloc] initWithReachability:reachability];
-
- CFRelease(reachability);
-
- return manager;
-}
-
-+ (instancetype)manager
-{
-#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000) || (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
- struct sockaddr_in6 address;
- bzero(&address, sizeof(address));
- address.sin6_len = sizeof(address);
- address.sin6_family = AF_INET6;
-#else
- struct sockaddr_in address;
- bzero(&address, sizeof(address));
- address.sin_len = sizeof(address);
- address.sin_family = AF_INET;
-#endif
- return [self managerForAddress:&address];
-}
-
-- (instancetype)initWithReachability:(SCNetworkReachabilityRef)reachability {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- _networkReachability = CFRetain(reachability);
- self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown;
-
- return self;
-}
-
-- (instancetype)init NS_UNAVAILABLE
-{
- return nil;
-}
-
-- (void)dealloc {
- [self stopMonitoring];
-
- if (_networkReachability != NULL) {
- CFRelease(_networkReachability);
- }
-}
-
-#pragma mark -
-
-- (BOOL)isReachable {
- return [self isReachableViaWWAN] || [self isReachableViaWiFi];
-}
-
-- (BOOL)isReachableViaWWAN {
- return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN;
-}
-
-- (BOOL)isReachableViaWiFi {
- return self.networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi;
-}
-
-#pragma mark -
-
-- (void)startMonitoring {
- [self stopMonitoring];
-
- if (!self.networkReachability) {
- return;
- }
-
- __weak __typeof(self)weakSelf = self;
- AFNetworkReachabilityStatusBlock callback = ^(AFNetworkReachabilityStatus status) {
- __strong __typeof(weakSelf)strongSelf = weakSelf;
-
- strongSelf.networkReachabilityStatus = status;
- if (strongSelf.networkReachabilityStatusBlock) {
- strongSelf.networkReachabilityStatusBlock(status);
- }
-
- };
-
- SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL};
- SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context);
- SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
-
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0),^{
- SCNetworkReachabilityFlags flags;
- if (SCNetworkReachabilityGetFlags(self.networkReachability, &flags)) {
- AFPostReachabilityStatusChange(flags, callback);
- }
- });
-}
-
-- (void)stopMonitoring {
- if (!self.networkReachability) {
- return;
- }
-
- SCNetworkReachabilityUnscheduleFromRunLoop(self.networkReachability, CFRunLoopGetMain(), kCFRunLoopCommonModes);
-}
-
-#pragma mark -
-
-- (NSString *)localizedNetworkReachabilityStatusString {
- return AFStringFromNetworkReachabilityStatus(self.networkReachabilityStatus);
-}
-
-#pragma mark -
-
-- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block {
- self.networkReachabilityStatusBlock = block;
-}
-
-#pragma mark - NSKeyValueObserving
-
-+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
- if ([key isEqualToString:@"reachable"] || [key isEqualToString:@"reachableViaWWAN"] || [key isEqualToString:@"reachableViaWiFi"]) {
- return [NSSet setWithObject:@"networkReachabilityStatus"];
- }
-
- return [super keyPathsForValuesAffectingValueForKey:key];
-}
-
-@end
-#endif
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworking.h b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworking.h
deleted file mode 100755
index e2fb2f44e..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFNetworking.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// AFNetworking.h
-//
-// Copyright (c) 2013 AFNetworking (http://afnetworking.com/)
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import <Foundation/Foundation.h>
-#import <Availability.h>
-#import <TargetConditionals.h>
-
-#ifndef _AFNETWORKING_
- #define _AFNETWORKING_
-
- #import "AFURLRequestSerialization.h"
- #import "AFURLResponseSerialization.h"
- #import "AFSecurityPolicy.h"
-
-#if !TARGET_OS_WATCH
- #import "AFNetworkReachabilityManager.h"
-#endif
-
- #import "AFURLSessionManager.h"
- #import "AFHTTPSessionManager.h"
-
-#endif /* _AFNETWORKING_ */
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFSecurityPolicy.h b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFSecurityPolicy.h
deleted file mode 100755
index c005efa81..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFSecurityPolicy.h
+++ /dev/null
@@ -1,154 +0,0 @@
-// AFSecurityPolicy.h
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import <Foundation/Foundation.h>
-#import <Security/Security.h>
-
-typedef NS_ENUM(NSUInteger, AFSSLPinningMode) {
- AFSSLPinningModeNone,
- AFSSLPinningModePublicKey,
- AFSSLPinningModeCertificate,
-};
-
-/**
- `AFSecurityPolicy` evaluates server trust against pinned X.509 certificates and public keys over secure connections.
-
- Adding pinned SSL certificates to your app helps prevent man-in-the-middle attacks and other vulnerabilities. Applications dealing with sensitive customer data or financial information are strongly encouraged to route all communication over an HTTPS connection with SSL pinning configured and enabled.
- */
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface AFSecurityPolicy : NSObject <NSSecureCoding, NSCopying>
-
-/**
- The criteria by which server trust should be evaluated against the pinned SSL certificates. Defaults to `AFSSLPinningModeNone`.
- */
-@property (readonly, nonatomic, assign) AFSSLPinningMode SSLPinningMode;
-
-/**
- The certificates used to evaluate server trust according to the SSL pinning mode.
-
- By default, this property is set to any (`.cer`) certificates included in the target compiling AFNetworking. Note that if you are using AFNetworking as embedded framework, no certificates will be pinned by default. Use `certificatesInBundle` to load certificates from your target, and then create a new policy by calling `policyWithPinningMode:withPinnedCertificates`.
-
- Note that if pinning is enabled, `evaluateServerTrust:forDomain:` will return true if any pinned certificate matches.
- */
-@property (nonatomic, strong, nullable) NSSet <NSData *> *pinnedCertificates;
-
-/**
- Whether or not to trust servers with an invalid or expired SSL certificates. Defaults to `NO`.
- */
-@property (nonatomic, assign) BOOL allowInvalidCertificates;
-
-/**
- Whether or not to validate the domain name in the certificate's CN field. Defaults to `YES`.
- */
-@property (nonatomic, assign) BOOL validatesDomainName;
-
-///-----------------------------------------
-/// @name Getting Certificates from the Bundle
-///-----------------------------------------
-
-/**
- Returns any certificates included in the bundle. If you are using AFNetworking as an embedded framework, you must use this method to find the certificates you have included in your app bundle, and use them when creating your security policy by calling `policyWithPinningMode:withPinnedCertificates`.
-
- @return The certificates included in the given bundle.
- */
-+ (NSSet <NSData *> *)certificatesInBundle:(NSBundle *)bundle;
-
-///-----------------------------------------
-/// @name Getting Specific Security Policies
-///-----------------------------------------
-
-/**
- Returns the shared default security policy, which does not allow invalid certificates, validates domain name, and does not validate against pinned certificates or public keys.
-
- @return The default security policy.
- */
-+ (instancetype)defaultPolicy;
-
-///---------------------
-/// @name Initialization
-///---------------------
-
-/**
- Creates and returns a security policy with the specified pinning mode.
-
- @param pinningMode The SSL pinning mode.
-
- @return A new security policy.
- */
-+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode;
-
-/**
- Creates and returns a security policy with the specified pinning mode.
-
- @param pinningMode The SSL pinning mode.
- @param pinnedCertificates The certificates to pin against.
-
- @return A new security policy.
- */
-+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet <NSData *> *)pinnedCertificates;
-
-///------------------------------
-/// @name Evaluating Server Trust
-///------------------------------
-
-/**
- Whether or not the specified server trust should be accepted, based on the security policy.
-
- This method should be used when responding to an authentication challenge from a server.
-
- @param serverTrust The X.509 certificate trust of the server.
- @param domain The domain of serverTrust. If `nil`, the domain will not be validated.
-
- @return Whether or not to trust the server.
- */
-- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
- forDomain:(nullable NSString *)domain;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-///----------------
-/// @name Constants
-///----------------
-
-/**
- ## SSL Pinning Modes
-
- The following constants are provided by `AFSSLPinningMode` as possible SSL pinning modes.
-
- enum {
- AFSSLPinningModeNone,
- AFSSLPinningModePublicKey,
- AFSSLPinningModeCertificate,
- }
-
- `AFSSLPinningModeNone`
- Do not used pinned certificates to validate servers.
-
- `AFSSLPinningModePublicKey`
- Validate host certificates against public keys of pinned certificates.
-
- `AFSSLPinningModeCertificate`
- Validate host certificates against pinned certificates.
-*/
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFSecurityPolicy.m b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFSecurityPolicy.m
deleted file mode 100755
index ec81d377c..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFSecurityPolicy.m
+++ /dev/null
@@ -1,353 +0,0 @@
-// AFSecurityPolicy.m
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import "AFSecurityPolicy.h"
-
-#import <AssertMacros.h>
-
-#if !TARGET_OS_IOS && !TARGET_OS_WATCH && !TARGET_OS_TV
-static NSData * AFSecKeyGetData(SecKeyRef key) {
- CFDataRef data = NULL;
-
- __Require_noErr_Quiet(SecItemExport(key, kSecFormatUnknown, kSecItemPemArmour, NULL, &data), _out);
-
- return (__bridge_transfer NSData *)data;
-
-_out:
- if (data) {
- CFRelease(data);
- }
-
- return nil;
-}
-#endif
-
-static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) {
-#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
- return [(__bridge id)key1 isEqual:(__bridge id)key2];
-#else
- return [AFSecKeyGetData(key1) isEqual:AFSecKeyGetData(key2)];
-#endif
-}
-
-static id AFPublicKeyForCertificate(NSData *certificate) {
- id allowedPublicKey = nil;
- SecCertificateRef allowedCertificate;
- SecCertificateRef allowedCertificates[1];
- CFArrayRef tempCertificates = nil;
- SecPolicyRef policy = nil;
- SecTrustRef allowedTrust = nil;
- SecTrustResultType result;
-
- allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificate);
- __Require_Quiet(allowedCertificate != NULL, _out);
-
- allowedCertificates[0] = allowedCertificate;
- tempCertificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL);
-
- policy = SecPolicyCreateBasicX509();
- __Require_noErr_Quiet(SecTrustCreateWithCertificates(tempCertificates, policy, &allowedTrust), _out);
- __Require_noErr_Quiet(SecTrustEvaluate(allowedTrust, &result), _out);
-
- allowedPublicKey = (__bridge_transfer id)SecTrustCopyPublicKey(allowedTrust);
-
-_out:
- if (allowedTrust) {
- CFRelease(allowedTrust);
- }
-
- if (policy) {
- CFRelease(policy);
- }
-
- if (tempCertificates) {
- CFRelease(tempCertificates);
- }
-
- if (allowedCertificate) {
- CFRelease(allowedCertificate);
- }
-
- return allowedPublicKey;
-}
-
-static BOOL AFServerTrustIsValid(SecTrustRef serverTrust) {
- BOOL isValid = NO;
- SecTrustResultType result;
- __Require_noErr_Quiet(SecTrustEvaluate(serverTrust, &result), _out);
-
- isValid = (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed);
-
-_out:
- return isValid;
-}
-
-static NSArray * AFCertificateTrustChainForServerTrust(SecTrustRef serverTrust) {
- CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
- NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount];
-
- for (CFIndex i = 0; i < certificateCount; i++) {
- SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);
- [trustChain addObject:(__bridge_transfer NSData *)SecCertificateCopyData(certificate)];
- }
-
- return [NSArray arrayWithArray:trustChain];
-}
-
-static NSArray * AFPublicKeyTrustChainForServerTrust(SecTrustRef serverTrust) {
- SecPolicyRef policy = SecPolicyCreateBasicX509();
- CFIndex certificateCount = SecTrustGetCertificateCount(serverTrust);
- NSMutableArray *trustChain = [NSMutableArray arrayWithCapacity:(NSUInteger)certificateCount];
- for (CFIndex i = 0; i < certificateCount; i++) {
- SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, i);
-
- SecCertificateRef someCertificates[] = {certificate};
- CFArrayRef certificates = CFArrayCreate(NULL, (const void **)someCertificates, 1, NULL);
-
- SecTrustRef trust;
- __Require_noErr_Quiet(SecTrustCreateWithCertificates(certificates, policy, &trust), _out);
-
- SecTrustResultType result;
- __Require_noErr_Quiet(SecTrustEvaluate(trust, &result), _out);
-
- [trustChain addObject:(__bridge_transfer id)SecTrustCopyPublicKey(trust)];
-
- _out:
- if (trust) {
- CFRelease(trust);
- }
-
- if (certificates) {
- CFRelease(certificates);
- }
-
- continue;
- }
- CFRelease(policy);
-
- return [NSArray arrayWithArray:trustChain];
-}
-
-#pragma mark -
-
-@interface AFSecurityPolicy()
-@property (readwrite, nonatomic, assign) AFSSLPinningMode SSLPinningMode;
-@property (readwrite, nonatomic, strong) NSSet *pinnedPublicKeys;
-@end
-
-@implementation AFSecurityPolicy
-
-+ (NSSet *)certificatesInBundle:(NSBundle *)bundle {
- NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."];
-
- NSMutableSet *certificates = [NSMutableSet setWithCapacity:[paths count]];
- for (NSString *path in paths) {
- NSData *certificateData = [NSData dataWithContentsOfFile:path];
- [certificates addObject:certificateData];
- }
-
- return [NSSet setWithSet:certificates];
-}
-
-+ (NSSet *)defaultPinnedCertificates {
- static NSSet *_defaultPinnedCertificates = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- NSBundle *bundle = [NSBundle bundleForClass:[self class]];
- _defaultPinnedCertificates = [self certificatesInBundle:bundle];
- });
-
- return _defaultPinnedCertificates;
-}
-
-+ (instancetype)defaultPolicy {
- AFSecurityPolicy *securityPolicy = [[self alloc] init];
- securityPolicy.SSLPinningMode = AFSSLPinningModeNone;
-
- return securityPolicy;
-}
-
-+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode {
- return [self policyWithPinningMode:pinningMode withPinnedCertificates:[self defaultPinnedCertificates]];
-}
-
-+ (instancetype)policyWithPinningMode:(AFSSLPinningMode)pinningMode withPinnedCertificates:(NSSet *)pinnedCertificates {
- AFSecurityPolicy *securityPolicy = [[self alloc] init];
- securityPolicy.SSLPinningMode = pinningMode;
-
- [securityPolicy setPinnedCertificates:pinnedCertificates];
-
- return securityPolicy;
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.validatesDomainName = YES;
-
- return self;
-}
-
-- (void)setPinnedCertificates:(NSSet *)pinnedCertificates {
- _pinnedCertificates = pinnedCertificates;
-
- if (self.pinnedCertificates) {
- NSMutableSet *mutablePinnedPublicKeys = [NSMutableSet setWithCapacity:[self.pinnedCertificates count]];
- for (NSData *certificate in self.pinnedCertificates) {
- id publicKey = AFPublicKeyForCertificate(certificate);
- if (!publicKey) {
- continue;
- }
- [mutablePinnedPublicKeys addObject:publicKey];
- }
- self.pinnedPublicKeys = [NSSet setWithSet:mutablePinnedPublicKeys];
- } else {
- self.pinnedPublicKeys = nil;
- }
-}
-
-#pragma mark -
-
-- (BOOL)evaluateServerTrust:(SecTrustRef)serverTrust
- forDomain:(NSString *)domain
-{
- if (domain && self.allowInvalidCertificates && self.validatesDomainName && (self.SSLPinningMode == AFSSLPinningModeNone || [self.pinnedCertificates count] == 0)) {
- // https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/OverridingSSLChainValidationCorrectly.html
- // According to the docs, you should only trust your provided certs for evaluation.
- // Pinned certificates are added to the trust. Without pinned certificates,
- // there is nothing to evaluate against.
- //
- // From Apple Docs:
- // "Do not implicitly trust self-signed certificates as anchors (kSecTrustOptionImplicitAnchors).
- // Instead, add your own (self-signed) CA certificate to the list of trusted anchors."
- NSLog(@"In order to validate a domain name for self signed certificates, you MUST use pinning.");
- return NO;
- }
-
- NSMutableArray *policies = [NSMutableArray array];
- if (self.validatesDomainName) {
- [policies addObject:(__bridge_transfer id)SecPolicyCreateSSL(true, (__bridge CFStringRef)domain)];
- } else {
- [policies addObject:(__bridge_transfer id)SecPolicyCreateBasicX509()];
- }
-
- SecTrustSetPolicies(serverTrust, (__bridge CFArrayRef)policies);
-
- if (self.SSLPinningMode == AFSSLPinningModeNone) {
- return self.allowInvalidCertificates || AFServerTrustIsValid(serverTrust);
- } else if (!AFServerTrustIsValid(serverTrust) && !self.allowInvalidCertificates) {
- return NO;
- }
-
- switch (self.SSLPinningMode) {
- case AFSSLPinningModeNone:
- default:
- return NO;
- case AFSSLPinningModeCertificate: {
- NSMutableArray *pinnedCertificates = [NSMutableArray array];
- for (NSData *certificateData in self.pinnedCertificates) {
- [pinnedCertificates addObject:(__bridge_transfer id)SecCertificateCreateWithData(NULL, (__bridge CFDataRef)certificateData)];
- }
- SecTrustSetAnchorCertificates(serverTrust, (__bridge CFArrayRef)pinnedCertificates);
-
- if (!AFServerTrustIsValid(serverTrust)) {
- return NO;
- }
-
- // obtain the chain after being validated, which *should* contain the pinned certificate in the last position (if it's the Root CA)
- NSArray *serverCertificates = AFCertificateTrustChainForServerTrust(serverTrust);
-
- for (NSData *trustChainCertificate in [serverCertificates reverseObjectEnumerator]) {
- if ([self.pinnedCertificates containsObject:trustChainCertificate]) {
- return YES;
- }
- }
-
- return NO;
- }
- case AFSSLPinningModePublicKey: {
- NSUInteger trustedPublicKeyCount = 0;
- NSArray *publicKeys = AFPublicKeyTrustChainForServerTrust(serverTrust);
-
- for (id trustChainPublicKey in publicKeys) {
- for (id pinnedPublicKey in self.pinnedPublicKeys) {
- if (AFSecKeyIsEqualToKey((__bridge SecKeyRef)trustChainPublicKey, (__bridge SecKeyRef)pinnedPublicKey)) {
- trustedPublicKeyCount += 1;
- }
- }
- }
- return trustedPublicKeyCount > 0;
- }
- }
-
- return NO;
-}
-
-#pragma mark - NSKeyValueObserving
-
-+ (NSSet *)keyPathsForValuesAffectingPinnedPublicKeys {
- return [NSSet setWithObject:@"pinnedCertificates"];
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
-
- self = [self init];
- if (!self) {
- return nil;
- }
-
- self.SSLPinningMode = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(SSLPinningMode))] unsignedIntegerValue];
- self.allowInvalidCertificates = [decoder decodeBoolForKey:NSStringFromSelector(@selector(allowInvalidCertificates))];
- self.validatesDomainName = [decoder decodeBoolForKey:NSStringFromSelector(@selector(validatesDomainName))];
- self.pinnedCertificates = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(pinnedCertificates))];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [coder encodeObject:[NSNumber numberWithUnsignedInteger:self.SSLPinningMode] forKey:NSStringFromSelector(@selector(SSLPinningMode))];
- [coder encodeBool:self.allowInvalidCertificates forKey:NSStringFromSelector(@selector(allowInvalidCertificates))];
- [coder encodeBool:self.validatesDomainName forKey:NSStringFromSelector(@selector(validatesDomainName))];
- [coder encodeObject:self.pinnedCertificates forKey:NSStringFromSelector(@selector(pinnedCertificates))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFSecurityPolicy *securityPolicy = [[[self class] allocWithZone:zone] init];
- securityPolicy.SSLPinningMode = self.SSLPinningMode;
- securityPolicy.allowInvalidCertificates = self.allowInvalidCertificates;
- securityPolicy.validatesDomainName = self.validatesDomainName;
- securityPolicy.pinnedCertificates = [self.pinnedCertificates copyWithZone:zone];
-
- return securityPolicy;
-}
-
-@end
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLRequestSerialization.h b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLRequestSerialization.h
deleted file mode 100755
index 694696b9a..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLRequestSerialization.h
+++ /dev/null
@@ -1,479 +0,0 @@
-// AFURLRequestSerialization.h
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import <Foundation/Foundation.h>
-#import <TargetConditionals.h>
-
-#if TARGET_OS_IOS || TARGET_OS_TV
-#import <UIKit/UIKit.h>
-#elif TARGET_OS_WATCH
-#import <WatchKit/WatchKit.h>
-#endif
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- Returns a percent-escaped string following RFC 3986 for a query string key or value.
- RFC 3986 states that the following characters are "reserved" characters.
- - General Delimiters: ":", "#", "[", "]", "@", "?", "/"
- - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
-
- In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
- query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
- should be percent-escaped in the query string.
-
- @param string The string to be percent-escaped.
-
- @return The percent-escaped string.
- */
-FOUNDATION_EXPORT NSString * AFPercentEscapedStringFromString(NSString *string);
-
-/**
- A helper method to generate encoded url query parameters for appending to the end of a URL.
-
- @param parameters A dictionary of key/values to be encoded.
-
- @return A url encoded query string
- */
-FOUNDATION_EXPORT NSString * AFQueryStringFromParameters(NSDictionary *parameters);
-
-/**
- The `AFURLRequestSerialization` protocol is adopted by an object that encodes parameters for a specified HTTP requests. Request serializers may encode parameters as query strings, HTTP bodies, setting the appropriate HTTP header fields as necessary.
-
- For example, a JSON request serializer may set the HTTP body of the request to a JSON representation, and set the `Content-Type` HTTP header field value to `application/json`.
- */
-@protocol AFURLRequestSerialization <NSObject, NSSecureCoding, NSCopying>
-
-/**
- Returns a request with the specified parameters encoded into a copy of the original request.
-
- @param request The original request.
- @param parameters The parameters to be encoded.
- @param error The error that occurred while attempting to encode the request parameters.
-
- @return A serialized request.
- */
-- (nullable NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
- withParameters:(nullable id)parameters
- error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW;
-
-@end
-
-#pragma mark -
-
-/**
-
- */
-typedef NS_ENUM(NSUInteger, AFHTTPRequestQueryStringSerializationStyle) {
- AFHTTPRequestQueryStringDefaultStyle = 0,
-};
-
-@protocol AFMultipartFormData;
-
-/**
- `AFHTTPRequestSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation.
-
- Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPRequestSerializer` in order to ensure consistent default behavior.
- */
-@interface AFHTTPRequestSerializer : NSObject <AFURLRequestSerialization>
-
-/**
- The string encoding used to serialize parameters. `NSUTF8StringEncoding` by default.
- */
-@property (nonatomic, assign) NSStringEncoding stringEncoding;
-
-/**
- Whether created requests can use the device’s cellular radio (if present). `YES` by default.
-
- @see NSMutableURLRequest -setAllowsCellularAccess:
- */
-@property (nonatomic, assign) BOOL allowsCellularAccess;
-
-/**
- The cache policy of created requests. `NSURLRequestUseProtocolCachePolicy` by default.
-
- @see NSMutableURLRequest -setCachePolicy:
- */
-@property (nonatomic, assign) NSURLRequestCachePolicy cachePolicy;
-
-/**
- Whether created requests should use the default cookie handling. `YES` by default.
-
- @see NSMutableURLRequest -setHTTPShouldHandleCookies:
- */
-@property (nonatomic, assign) BOOL HTTPShouldHandleCookies;
-
-/**
- Whether created requests can continue transmitting data before receiving a response from an earlier transmission. `NO` by default
-
- @see NSMutableURLRequest -setHTTPShouldUsePipelining:
- */
-@property (nonatomic, assign) BOOL HTTPShouldUsePipelining;
-
-/**
- The network service type for created requests. `NSURLNetworkServiceTypeDefault` by default.
-
- @see NSMutableURLRequest -setNetworkServiceType:
- */
-@property (nonatomic, assign) NSURLRequestNetworkServiceType networkServiceType;
-
-/**
- The timeout interval, in seconds, for created requests. The default timeout interval is 60 seconds.
-
- @see NSMutableURLRequest -setTimeoutInterval:
- */
-@property (nonatomic, assign) NSTimeInterval timeoutInterval;
-
-///---------------------------------------
-/// @name Configuring HTTP Request Headers
-///---------------------------------------
-
-/**
- Default HTTP header field values to be applied to serialized requests. By default, these include the following:
-
- - `Accept-Language` with the contents of `NSLocale +preferredLanguages`
- - `User-Agent` with the contents of various bundle identifiers and OS designations
-
- @discussion To add or remove default request headers, use `setValue:forHTTPHeaderField:`.
- */
-@property (readonly, nonatomic, strong) NSDictionary <NSString *, NSString *> *HTTPRequestHeaders;
-
-/**
- Creates and returns a serializer with default configuration.
- */
-+ (instancetype)serializer;
-
-/**
- Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header.
-
- @param field The HTTP header to set a default value for
- @param value The value set as default for the specified header, or `nil`
- */
-- (void)setValue:(nullable NSString *)value
-forHTTPHeaderField:(NSString *)field;
-
-/**
- Returns the value for the HTTP headers set in the request serializer.
-
- @param field The HTTP header to retrieve the default value for
-
- @return The value set as default for the specified header, or `nil`
- */
-- (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;
-
-/**
- Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header.
-
- @param username The HTTP basic auth username
- @param password The HTTP basic auth password
- */
-- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
- password:(NSString *)password;
-
-/**
- Clears any existing value for the "Authorization" HTTP header.
- */
-- (void)clearAuthorizationHeader;
-
-///-------------------------------------------------------
-/// @name Configuring Query String Parameter Serialization
-///-------------------------------------------------------
-
-/**
- HTTP methods for which serialized requests will encode parameters as a query string. `GET`, `HEAD`, and `DELETE` by default.
- */
-@property (nonatomic, strong) NSSet <NSString *> *HTTPMethodsEncodingParametersInURI;
-
-/**
- Set the method of query string serialization according to one of the pre-defined styles.
-
- @param style The serialization style.
-
- @see AFHTTPRequestQueryStringSerializationStyle
- */
-- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style;
-
-/**
- Set the a custom method of query string serialization according to the specified block.
-
- @param block A block that defines a process of encoding parameters into a query string. This block returns the query string and takes three arguments: the request, the parameters to encode, and the error that occurred when attempting to encode parameters for the given request.
- */
-- (void)setQueryStringSerializationWithBlock:(nullable NSString * (^)(NSURLRequest *request, id parameters, NSError * __autoreleasing *error))block;
-
-///-------------------------------
-/// @name Creating Request Objects
-///-------------------------------
-
-/**
- Creates an `NSMutableURLRequest` object with the specified HTTP method and URL string.
-
- If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body.
-
- @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`.
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body.
- @param error The error that occurred while constructing the request.
-
- @return An `NSMutableURLRequest` object.
- */
-- (NSMutableURLRequest *)requestWithMethod:(NSString *)method
- URLString:(NSString *)URLString
- parameters:(nullable id)parameters
- error:(NSError * _Nullable __autoreleasing *)error;
-
-/**
- Creates an `NSMutableURLRequest` object with the specified HTTP method and URLString, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2
-
- Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream.
-
- @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`.
- @param URLString The URL string used to create the request URL.
- @param parameters The parameters to be encoded and set in the request HTTP body.
- @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol.
- @param error The error that occurred while constructing the request.
-
- @return An `NSMutableURLRequest` object
- */
-- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
- URLString:(NSString *)URLString
- parameters:(nullable NSDictionary <NSString *, id> *)parameters
- constructingBodyWithBlock:(nullable void (^)(id <AFMultipartFormData> formData))block
- error:(NSError * _Nullable __autoreleasing *)error;
-
-/**
- Creates an `NSMutableURLRequest` by removing the `HTTPBodyStream` from a request, and asynchronously writing its contents into the specified file, invoking the completion handler when finished.
-
- @param request The multipart form request. The `HTTPBodyStream` property of `request` must not be `nil`.
- @param fileURL The file URL to write multipart form contents to.
- @param handler A handler block to execute.
-
- @discussion There is a bug in `NSURLSessionTask` that causes requests to not send a `Content-Length` header when streaming contents from an HTTP body, which is notably problematic when interacting with the Amazon S3 webservice. As a workaround, this method takes a request constructed with `multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:error:`, or any other request with an `HTTPBodyStream`, writes the contents to the specified file and returns a copy of the original request with the `HTTPBodyStream` property set to `nil`. From here, the file can either be passed to `AFURLSessionManager -uploadTaskWithRequest:fromFile:progress:completionHandler:`, or have its contents read into an `NSData` that's assigned to the `HTTPBody` property of the request.
-
- @see https://github.com/AFNetworking/AFNetworking/issues/1398
- */
-- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request
- writingStreamContentsToFile:(NSURL *)fileURL
- completionHandler:(nullable void (^)(NSError * _Nullable error))handler;
-
-@end
-
-#pragma mark -
-
-/**
- The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPRequestSerializer -multipartFormRequestWithMethod:URLString:parameters:constructingBodyWithBlock:`.
- */
-@protocol AFMultipartFormData
-
-/**
- Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary.
-
- The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively.
-
- @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.
- @param name The name to be associated with the specified data. This parameter must not be `nil`.
- @param error If an error occurs, upon return contains an `NSError` object that describes the problem.
-
- @return `YES` if the file data was successfully appended, otherwise `NO`.
- */
-- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
- name:(NSString *)name
- error:(NSError * _Nullable __autoreleasing *)error;
-
-/**
- Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.
-
- @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`.
- @param name The name to be associated with the specified data. This parameter must not be `nil`.
- @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`.
- @param mimeType The declared MIME type of the file data. This parameter must not be `nil`.
- @param error If an error occurs, upon return contains an `NSError` object that describes the problem.
-
- @return `YES` if the file data was successfully appended otherwise `NO`.
- */
-- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
- name:(NSString *)name
- fileName:(NSString *)fileName
- mimeType:(NSString *)mimeType
- error:(NSError * _Nullable __autoreleasing *)error;
-
-/**
- Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary.
-
- @param inputStream The input stream to be appended to the form data
- @param name The name to be associated with the specified input stream. This parameter must not be `nil`.
- @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`.
- @param length The length of the specified input stream in bytes.
- @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.
- */
-- (void)appendPartWithInputStream:(nullable NSInputStream *)inputStream
- name:(NSString *)name
- fileName:(NSString *)fileName
- length:(int64_t)length
- mimeType:(NSString *)mimeType;
-
-/**
- Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary.
-
- @param data The data to be encoded and appended to the form data.
- @param name The name to be associated with the specified data. This parameter must not be `nil`.
- @param fileName The filename to be associated with the specified data. This parameter must not be `nil`.
- @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`.
- */
-- (void)appendPartWithFileData:(NSData *)data
- name:(NSString *)name
- fileName:(NSString *)fileName
- mimeType:(NSString *)mimeType;
-
-/**
- Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary.
-
- @param data The data to be encoded and appended to the form data.
- @param name The name to be associated with the specified data. This parameter must not be `nil`.
- */
-
-- (void)appendPartWithFormData:(NSData *)data
- name:(NSString *)name;
-
-
-/**
- Appends HTTP headers, followed by the encoded data and the multipart form boundary.
-
- @param headers The HTTP headers to be appended to the form data.
- @param body The data to be encoded and appended to the form data. This parameter must not be `nil`.
- */
-- (void)appendPartWithHeaders:(nullable NSDictionary <NSString *, NSString *> *)headers
- body:(NSData *)body;
-
-/**
- Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream.
-
- When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, there is no definite way to distinguish between a 3G, EDGE, or LTE connection over `NSURLConnection`. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth.
-
- @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 16kb.
- @param delay Duration of delay each time a packet is read. By default, no delay is set.
- */
-- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes
- delay:(NSTimeInterval)delay;
-
-@end
-
-#pragma mark -
-
-/**
- `AFJSONRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSJSONSerialization`, setting the `Content-Type` of the encoded request to `application/json`.
- */
-@interface AFJSONRequestSerializer : AFHTTPRequestSerializer
-
-/**
- Options for writing the request JSON data from Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONWritingOptions". `0` by default.
- */
-@property (nonatomic, assign) NSJSONWritingOptions writingOptions;
-
-/**
- Creates and returns a JSON serializer with specified reading and writing options.
-
- @param writingOptions The specified JSON writing options.
- */
-+ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions;
-
-@end
-
-#pragma mark -
-
-/**
- `AFPropertyListRequestSerializer` is a subclass of `AFHTTPRequestSerializer` that encodes parameters as JSON using `NSPropertyListSerializer`, setting the `Content-Type` of the encoded request to `application/x-plist`.
- */
-@interface AFPropertyListRequestSerializer : AFHTTPRequestSerializer
-
-/**
- The property list format. Possible values are described in "NSPropertyListFormat".
- */
-@property (nonatomic, assign) NSPropertyListFormat format;
-
-/**
- @warning The `writeOptions` property is currently unused.
- */
-@property (nonatomic, assign) NSPropertyListWriteOptions writeOptions;
-
-/**
- Creates and returns a property list serializer with a specified format, read options, and write options.
-
- @param format The property list format.
- @param writeOptions The property list write options.
-
- @warning The `writeOptions` property is currently unused.
- */
-+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
- writeOptions:(NSPropertyListWriteOptions)writeOptions;
-
-@end
-
-#pragma mark -
-
-///----------------
-/// @name Constants
-///----------------
-
-/**
- ## Error Domains
-
- The following error domain is predefined.
-
- - `NSString * const AFURLRequestSerializationErrorDomain`
-
- ### Constants
-
- `AFURLRequestSerializationErrorDomain`
- AFURLRequestSerializer errors. Error codes for `AFURLRequestSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`.
- */
-FOUNDATION_EXPORT NSString * const AFURLRequestSerializationErrorDomain;
-
-/**
- ## User info dictionary keys
-
- These keys may exist in the user info dictionary, in addition to those defined for NSError.
-
- - `NSString * const AFNetworkingOperationFailingURLRequestErrorKey`
-
- ### Constants
-
- `AFNetworkingOperationFailingURLRequestErrorKey`
- The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFURLRequestSerializationErrorDomain`.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLRequestErrorKey;
-
-/**
- ## Throttling Bandwidth for HTTP Request Input Streams
-
- @see -throttleBandwidthWithPacketSize:delay:
-
- ### Constants
-
- `kAFUploadStream3GSuggestedPacketSize`
- Maximum packet size, in number of bytes. Equal to 16kb.
-
- `kAFUploadStream3GSuggestedDelay`
- Duration of delay each time a packet is read. Equal to 0.2 seconds.
- */
-FOUNDATION_EXPORT NSUInteger const kAFUploadStream3GSuggestedPacketSize;
-FOUNDATION_EXPORT NSTimeInterval const kAFUploadStream3GSuggestedDelay;
-
-NS_ASSUME_NONNULL_END
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLRequestSerialization.m b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLRequestSerialization.m
deleted file mode 100755
index 9a2ac9809..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLRequestSerialization.m
+++ /dev/null
@@ -1,1376 +0,0 @@
-// AFURLRequestSerialization.m
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import "AFURLRequestSerialization.h"
-
-#if TARGET_OS_IOS || TARGET_OS_WATCH || TARGET_OS_TV
-#import <MobileCoreServices/MobileCoreServices.h>
-#else
-#import <CoreServices/CoreServices.h>
-#endif
-
-NSString * const AFURLRequestSerializationErrorDomain = @"com.alamofire.error.serialization.request";
-NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"com.alamofire.serialization.request.error.response";
-
-typedef NSString * (^AFQueryStringSerializationBlock)(NSURLRequest *request, id parameters, NSError *__autoreleasing *error);
-
-/**
- Returns a percent-escaped string following RFC 3986 for a query string key or value.
- RFC 3986 states that the following characters are "reserved" characters.
- - General Delimiters: ":", "#", "[", "]", "@", "?", "/"
- - Sub-Delimiters: "!", "$", "&", "'", "(", ")", "*", "+", ",", ";", "="
-
- In RFC 3986 - Section 3.4, it states that the "?" and "/" characters should not be escaped to allow
- query strings to include a URL. Therefore, all "reserved" characters with the exception of "?" and "/"
- should be percent-escaped in the query string.
- - parameter string: The string to be percent-escaped.
- - returns: The percent-escaped string.
- */
-NSString * AFPercentEscapedStringFromString(NSString *string) {
- static NSString * const kAFCharactersGeneralDelimitersToEncode = @":#[]@"; // does not include "?" or "/" due to RFC 3986 - Section 3.4
- static NSString * const kAFCharactersSubDelimitersToEncode = @"!$&'()*+,;=";
-
- NSMutableCharacterSet * allowedCharacterSet = [[NSCharacterSet URLQueryAllowedCharacterSet] mutableCopy];
- [allowedCharacterSet removeCharactersInString:[kAFCharactersGeneralDelimitersToEncode stringByAppendingString:kAFCharactersSubDelimitersToEncode]];
-
- // FIXME: https://github.com/AFNetworking/AFNetworking/pull/3028
- // return [string stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet];
-
- static NSUInteger const batchSize = 50;
-
- NSUInteger index = 0;
- NSMutableString *escaped = @"".mutableCopy;
-
- while (index < string.length) {
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wgnu"
- NSUInteger length = MIN(string.length - index, batchSize);
-#pragma GCC diagnostic pop
- NSRange range = NSMakeRange(index, length);
-
- // To avoid breaking up character sequences such as 👴🏻👮🏽
- range = [string rangeOfComposedCharacterSequencesForRange:range];
-
- NSString *substring = [string substringWithRange:range];
- NSString *encoded = [substring stringByAddingPercentEncodingWithAllowedCharacters:allowedCharacterSet];
- [escaped appendString:encoded];
-
- index += range.length;
- }
-
- return escaped;
-}
-
-#pragma mark -
-
-@interface AFQueryStringPair : NSObject
-@property (readwrite, nonatomic, strong) id field;
-@property (readwrite, nonatomic, strong) id value;
-
-- (instancetype)initWithField:(id)field value:(id)value;
-
-- (NSString *)URLEncodedStringValue;
-@end
-
-@implementation AFQueryStringPair
-
-- (instancetype)initWithField:(id)field value:(id)value {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.field = field;
- self.value = value;
-
- return self;
-}
-
-- (NSString *)URLEncodedStringValue {
- if (!self.value || [self.value isEqual:[NSNull null]]) {
- return AFPercentEscapedStringFromString([self.field description]);
- } else {
- return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedStringFromString([self.field description]), AFPercentEscapedStringFromString([self.value description])];
- }
-}
-
-@end
-
-#pragma mark -
-
-FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary);
-FOUNDATION_EXPORT NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value);
-
-NSString * AFQueryStringFromParameters(NSDictionary *parameters) {
- NSMutableArray *mutablePairs = [NSMutableArray array];
- for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {
- [mutablePairs addObject:[pair URLEncodedStringValue]];
- }
-
- return [mutablePairs componentsJoinedByString:@"&"];
-}
-
-NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary) {
- return AFQueryStringPairsFromKeyAndValue(nil, dictionary);
-}
-
-NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) {
- NSMutableArray *mutableQueryStringComponents = [NSMutableArray array];
-
- NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(compare:)];
-
- if ([value isKindOfClass:[NSDictionary class]]) {
- NSDictionary *dictionary = value;
- // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries
- for (id nestedKey in [dictionary.allKeys sortedArrayUsingDescriptors:@[ sortDescriptor ]]) {
- id nestedValue = dictionary[nestedKey];
- if (nestedValue) {
- [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)];
- }
- }
- } else if ([value isKindOfClass:[NSArray class]]) {
- NSArray *array = value;
- for (id nestedValue in array) {
- [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)];
- }
- } else if ([value isKindOfClass:[NSSet class]]) {
- NSSet *set = value;
- for (id obj in [set sortedArrayUsingDescriptors:@[ sortDescriptor ]]) {
- [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue(key, obj)];
- }
- } else {
- [mutableQueryStringComponents addObject:[[AFQueryStringPair alloc] initWithField:key value:value]];
- }
-
- return mutableQueryStringComponents;
-}
-
-#pragma mark -
-
-@interface AFStreamingMultipartFormData : NSObject <AFMultipartFormData>
-- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest
- stringEncoding:(NSStringEncoding)encoding;
-
-- (NSMutableURLRequest *)requestByFinalizingMultipartFormData;
-@end
-
-#pragma mark -
-
-static NSArray * AFHTTPRequestSerializerObservedKeyPaths() {
- static NSArray *_AFHTTPRequestSerializerObservedKeyPaths = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- _AFHTTPRequestSerializerObservedKeyPaths = @[NSStringFromSelector(@selector(allowsCellularAccess)), NSStringFromSelector(@selector(cachePolicy)), NSStringFromSelector(@selector(HTTPShouldHandleCookies)), NSStringFromSelector(@selector(HTTPShouldUsePipelining)), NSStringFromSelector(@selector(networkServiceType)), NSStringFromSelector(@selector(timeoutInterval))];
- });
-
- return _AFHTTPRequestSerializerObservedKeyPaths;
-}
-
-static void *AFHTTPRequestSerializerObserverContext = &AFHTTPRequestSerializerObserverContext;
-
-@interface AFHTTPRequestSerializer ()
-@property (readwrite, nonatomic, strong) NSMutableSet *mutableObservedChangedKeyPaths;
-@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableHTTPRequestHeaders;
-@property (readwrite, nonatomic, assign) AFHTTPRequestQueryStringSerializationStyle queryStringSerializationStyle;
-@property (readwrite, nonatomic, copy) AFQueryStringSerializationBlock queryStringSerialization;
-@end
-
-@implementation AFHTTPRequestSerializer
-
-+ (instancetype)serializer {
- return [[self alloc] init];
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.stringEncoding = NSUTF8StringEncoding;
-
- self.mutableHTTPRequestHeaders = [NSMutableDictionary dictionary];
-
- // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
- NSMutableArray *acceptLanguagesComponents = [NSMutableArray array];
- [[NSLocale preferredLanguages] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
- float q = 1.0f - (idx * 0.1f);
- [acceptLanguagesComponents addObject:[NSString stringWithFormat:@"%@;q=%0.1g", obj, q]];
- *stop = q <= 0.5f;
- }];
- [self setValue:[acceptLanguagesComponents componentsJoinedByString:@", "] forHTTPHeaderField:@"Accept-Language"];
-
- NSString *userAgent = nil;
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wgnu"
-#if TARGET_OS_IOS
- // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
- userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];
-#elif TARGET_OS_WATCH
- // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
- userAgent = [NSString stringWithFormat:@"%@/%@ (%@; watchOS %@; Scale/%0.2f)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[WKInterfaceDevice currentDevice] model], [[WKInterfaceDevice currentDevice] systemVersion], [[WKInterfaceDevice currentDevice] screenScale]];
-#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
- userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleExecutableKey] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleIdentifierKey], [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"] ?: [[NSBundle mainBundle] infoDictionary][(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]];
-#endif
-#pragma clang diagnostic pop
- if (userAgent) {
- if (![userAgent canBeConvertedToEncoding:NSASCIIStringEncoding]) {
- NSMutableString *mutableUserAgent = [userAgent mutableCopy];
- if (CFStringTransform((__bridge CFMutableStringRef)(mutableUserAgent), NULL, (__bridge CFStringRef)@"Any-Latin; Latin-ASCII; [:^ASCII:] Remove", false)) {
- userAgent = mutableUserAgent;
- }
- }
- [self setValue:userAgent forHTTPHeaderField:@"User-Agent"];
- }
-
- // HTTP Method Definitions; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
- self.HTTPMethodsEncodingParametersInURI = [NSSet setWithObjects:@"GET", @"HEAD", @"DELETE", nil];
-
- self.mutableObservedChangedKeyPaths = [NSMutableSet set];
- for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {
- if ([self respondsToSelector:NSSelectorFromString(keyPath)]) {
- [self addObserver:self forKeyPath:keyPath options:NSKeyValueObservingOptionNew context:AFHTTPRequestSerializerObserverContext];
- }
- }
-
- return self;
-}
-
-- (void)dealloc {
- for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {
- if ([self respondsToSelector:NSSelectorFromString(keyPath)]) {
- [self removeObserver:self forKeyPath:keyPath context:AFHTTPRequestSerializerObserverContext];
- }
- }
-}
-
-#pragma mark -
-
-// Workarounds for crashing behavior using Key-Value Observing with XCTest
-// See https://github.com/AFNetworking/AFNetworking/issues/2523
-
-- (void)setAllowsCellularAccess:(BOOL)allowsCellularAccess {
- [self willChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))];
- _allowsCellularAccess = allowsCellularAccess;
- [self didChangeValueForKey:NSStringFromSelector(@selector(allowsCellularAccess))];
-}
-
-- (void)setCachePolicy:(NSURLRequestCachePolicy)cachePolicy {
- [self willChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))];
- _cachePolicy = cachePolicy;
- [self didChangeValueForKey:NSStringFromSelector(@selector(cachePolicy))];
-}
-
-- (void)setHTTPShouldHandleCookies:(BOOL)HTTPShouldHandleCookies {
- [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))];
- _HTTPShouldHandleCookies = HTTPShouldHandleCookies;
- [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldHandleCookies))];
-}
-
-- (void)setHTTPShouldUsePipelining:(BOOL)HTTPShouldUsePipelining {
- [self willChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))];
- _HTTPShouldUsePipelining = HTTPShouldUsePipelining;
- [self didChangeValueForKey:NSStringFromSelector(@selector(HTTPShouldUsePipelining))];
-}
-
-- (void)setNetworkServiceType:(NSURLRequestNetworkServiceType)networkServiceType {
- [self willChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))];
- _networkServiceType = networkServiceType;
- [self didChangeValueForKey:NSStringFromSelector(@selector(networkServiceType))];
-}
-
-- (void)setTimeoutInterval:(NSTimeInterval)timeoutInterval {
- [self willChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))];
- _timeoutInterval = timeoutInterval;
- [self didChangeValueForKey:NSStringFromSelector(@selector(timeoutInterval))];
-}
-
-#pragma mark -
-
-- (NSDictionary *)HTTPRequestHeaders {
- return [NSDictionary dictionaryWithDictionary:self.mutableHTTPRequestHeaders];
-}
-
-- (void)setValue:(NSString *)value
-forHTTPHeaderField:(NSString *)field
-{
- [self.mutableHTTPRequestHeaders setValue:value forKey:field];
-}
-
-- (NSString *)valueForHTTPHeaderField:(NSString *)field {
- return [self.mutableHTTPRequestHeaders valueForKey:field];
-}
-
-- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username
- password:(NSString *)password
-{
- NSData *basicAuthCredentials = [[NSString stringWithFormat:@"%@:%@", username, password] dataUsingEncoding:NSUTF8StringEncoding];
- NSString *base64AuthCredentials = [basicAuthCredentials base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)0];
- [self setValue:[NSString stringWithFormat:@"Basic %@", base64AuthCredentials] forHTTPHeaderField:@"Authorization"];
-}
-
-- (void)clearAuthorizationHeader {
- [self.mutableHTTPRequestHeaders removeObjectForKey:@"Authorization"];
-}
-
-#pragma mark -
-
-- (void)setQueryStringSerializationWithStyle:(AFHTTPRequestQueryStringSerializationStyle)style {
- self.queryStringSerializationStyle = style;
- self.queryStringSerialization = nil;
-}
-
-- (void)setQueryStringSerializationWithBlock:(NSString *(^)(NSURLRequest *, id, NSError *__autoreleasing *))block {
- self.queryStringSerialization = block;
-}
-
-#pragma mark -
-
-- (NSMutableURLRequest *)requestWithMethod:(NSString *)method
- URLString:(NSString *)URLString
- parameters:(id)parameters
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(method);
- NSParameterAssert(URLString);
-
- NSURL *url = [NSURL URLWithString:URLString];
-
- NSParameterAssert(url);
-
- NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:url];
- mutableRequest.HTTPMethod = method;
-
- for (NSString *keyPath in AFHTTPRequestSerializerObservedKeyPaths()) {
- if ([self.mutableObservedChangedKeyPaths containsObject:keyPath]) {
- [mutableRequest setValue:[self valueForKeyPath:keyPath] forKey:keyPath];
- }
- }
-
- mutableRequest = [[self requestBySerializingRequest:mutableRequest withParameters:parameters error:error] mutableCopy];
-
- return mutableRequest;
-}
-
-- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
- URLString:(NSString *)URLString
- parameters:(NSDictionary *)parameters
- constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> formData))block
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(method);
- NSParameterAssert(![method isEqualToString:@"GET"] && ![method isEqualToString:@"HEAD"]);
-
- NSMutableURLRequest *mutableRequest = [self requestWithMethod:method URLString:URLString parameters:nil error:error];
-
- __block AFStreamingMultipartFormData *formData = [[AFStreamingMultipartFormData alloc] initWithURLRequest:mutableRequest stringEncoding:NSUTF8StringEncoding];
-
- if (parameters) {
- for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) {
- NSData *data = nil;
- if ([pair.value isKindOfClass:[NSData class]]) {
- data = pair.value;
- } else if ([pair.value isEqual:[NSNull null]]) {
- data = [NSData data];
- } else {
- data = [[pair.value description] dataUsingEncoding:self.stringEncoding];
- }
-
- if (data) {
- [formData appendPartWithFormData:data name:[pair.field description]];
- }
- }
- }
-
- if (block) {
- block(formData);
- }
-
- return [formData requestByFinalizingMultipartFormData];
-}
-
-- (NSMutableURLRequest *)requestWithMultipartFormRequest:(NSURLRequest *)request
- writingStreamContentsToFile:(NSURL *)fileURL
- completionHandler:(void (^)(NSError *error))handler
-{
- NSParameterAssert(request.HTTPBodyStream);
- NSParameterAssert([fileURL isFileURL]);
-
- NSInputStream *inputStream = request.HTTPBodyStream;
- NSOutputStream *outputStream = [[NSOutputStream alloc] initWithURL:fileURL append:NO];
- __block NSError *error = nil;
-
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
- [inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
- [outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
-
- [inputStream open];
- [outputStream open];
-
- while ([inputStream hasBytesAvailable] && [outputStream hasSpaceAvailable]) {
- uint8_t buffer[1024];
-
- NSInteger bytesRead = [inputStream read:buffer maxLength:1024];
- if (inputStream.streamError || bytesRead < 0) {
- error = inputStream.streamError;
- break;
- }
-
- NSInteger bytesWritten = [outputStream write:buffer maxLength:(NSUInteger)bytesRead];
- if (outputStream.streamError || bytesWritten < 0) {
- error = outputStream.streamError;
- break;
- }
-
- if (bytesRead == 0 && bytesWritten == 0) {
- break;
- }
- }
-
- [outputStream close];
- [inputStream close];
-
- if (handler) {
- dispatch_async(dispatch_get_main_queue(), ^{
- handler(error);
- });
- }
- });
-
- NSMutableURLRequest *mutableRequest = [request mutableCopy];
- mutableRequest.HTTPBodyStream = nil;
-
- return mutableRequest;
-}
-
-#pragma mark - AFURLRequestSerialization
-
-- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
- withParameters:(id)parameters
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(request);
-
- NSMutableURLRequest *mutableRequest = [request mutableCopy];
-
- [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {
- if (![request valueForHTTPHeaderField:field]) {
- [mutableRequest setValue:value forHTTPHeaderField:field];
- }
- }];
-
- NSString *query = nil;
- if (parameters) {
- if (self.queryStringSerialization) {
- NSError *serializationError;
- query = self.queryStringSerialization(request, parameters, &serializationError);
-
- if (serializationError) {
- if (error) {
- *error = serializationError;
- }
-
- return nil;
- }
- } else {
- switch (self.queryStringSerializationStyle) {
- case AFHTTPRequestQueryStringDefaultStyle:
- query = AFQueryStringFromParameters(parameters);
- break;
- }
- }
- }
-
- if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
- if (query && query.length > 0) {
- mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]];
- }
- } else {
- // #2864: an empty string is a valid x-www-form-urlencoded payload
- if (!query) {
- query = @"";
- }
- if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) {
- [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
- }
- [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]];
- }
-
- return mutableRequest;
-}
-
-#pragma mark - NSKeyValueObserving
-
-+ (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key {
- if ([AFHTTPRequestSerializerObservedKeyPaths() containsObject:key]) {
- return NO;
- }
-
- return [super automaticallyNotifiesObserversForKey:key];
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath
- ofObject:(__unused id)object
- change:(NSDictionary *)change
- context:(void *)context
-{
- if (context == AFHTTPRequestSerializerObserverContext) {
- if ([change[NSKeyValueChangeNewKey] isEqual:[NSNull null]]) {
- [self.mutableObservedChangedKeyPaths removeObject:keyPath];
- } else {
- [self.mutableObservedChangedKeyPaths addObject:keyPath];
- }
- }
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [self init];
- if (!self) {
- return nil;
- }
-
- self.mutableHTTPRequestHeaders = [[decoder decodeObjectOfClass:[NSDictionary class] forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))] mutableCopy];
- self.queryStringSerializationStyle = (AFHTTPRequestQueryStringSerializationStyle)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))] unsignedIntegerValue];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [coder encodeObject:self.mutableHTTPRequestHeaders forKey:NSStringFromSelector(@selector(mutableHTTPRequestHeaders))];
- [coder encodeInteger:self.queryStringSerializationStyle forKey:NSStringFromSelector(@selector(queryStringSerializationStyle))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFHTTPRequestSerializer *serializer = [[[self class] allocWithZone:zone] init];
- serializer.mutableHTTPRequestHeaders = [self.mutableHTTPRequestHeaders mutableCopyWithZone:zone];
- serializer.queryStringSerializationStyle = self.queryStringSerializationStyle;
- serializer.queryStringSerialization = self.queryStringSerialization;
-
- return serializer;
-}
-
-@end
-
-#pragma mark -
-
-static NSString * AFCreateMultipartFormBoundary() {
- return [NSString stringWithFormat:@"Boundary+%08X%08X", arc4random(), arc4random()];
-}
-
-static NSString * const kAFMultipartFormCRLF = @"\r\n";
-
-static inline NSString * AFMultipartFormInitialBoundary(NSString *boundary) {
- return [NSString stringWithFormat:@"--%@%@", boundary, kAFMultipartFormCRLF];
-}
-
-static inline NSString * AFMultipartFormEncapsulationBoundary(NSString *boundary) {
- return [NSString stringWithFormat:@"%@--%@%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF];
-}
-
-static inline NSString * AFMultipartFormFinalBoundary(NSString *boundary) {
- return [NSString stringWithFormat:@"%@--%@--%@", kAFMultipartFormCRLF, boundary, kAFMultipartFormCRLF];
-}
-
-static inline NSString * AFContentTypeForPathExtension(NSString *extension) {
- NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL);
- NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType);
- if (!contentType) {
- return @"application/octet-stream";
- } else {
- return contentType;
- }
-}
-
-NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16;
-NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2;
-
-@interface AFHTTPBodyPart : NSObject
-@property (nonatomic, assign) NSStringEncoding stringEncoding;
-@property (nonatomic, strong) NSDictionary *headers;
-@property (nonatomic, copy) NSString *boundary;
-@property (nonatomic, strong) id body;
-@property (nonatomic, assign) unsigned long long bodyContentLength;
-@property (nonatomic, strong) NSInputStream *inputStream;
-
-@property (nonatomic, assign) BOOL hasInitialBoundary;
-@property (nonatomic, assign) BOOL hasFinalBoundary;
-
-@property (readonly, nonatomic, assign, getter = hasBytesAvailable) BOOL bytesAvailable;
-@property (readonly, nonatomic, assign) unsigned long long contentLength;
-
-- (NSInteger)read:(uint8_t *)buffer
- maxLength:(NSUInteger)length;
-@end
-
-@interface AFMultipartBodyStream : NSInputStream <NSStreamDelegate>
-@property (nonatomic, assign) NSUInteger numberOfBytesInPacket;
-@property (nonatomic, assign) NSTimeInterval delay;
-@property (nonatomic, strong) NSInputStream *inputStream;
-@property (readonly, nonatomic, assign) unsigned long long contentLength;
-@property (readonly, nonatomic, assign, getter = isEmpty) BOOL empty;
-
-- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding;
-- (void)setInitialAndFinalBoundaries;
-- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart;
-@end
-
-#pragma mark -
-
-@interface AFStreamingMultipartFormData ()
-@property (readwrite, nonatomic, copy) NSMutableURLRequest *request;
-@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding;
-@property (readwrite, nonatomic, copy) NSString *boundary;
-@property (readwrite, nonatomic, strong) AFMultipartBodyStream *bodyStream;
-@end
-
-@implementation AFStreamingMultipartFormData
-
-- (instancetype)initWithURLRequest:(NSMutableURLRequest *)urlRequest
- stringEncoding:(NSStringEncoding)encoding
-{
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.request = urlRequest;
- self.stringEncoding = encoding;
- self.boundary = AFCreateMultipartFormBoundary();
- self.bodyStream = [[AFMultipartBodyStream alloc] initWithStringEncoding:encoding];
-
- return self;
-}
-
-- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
- name:(NSString *)name
- error:(NSError * __autoreleasing *)error
-{
- NSParameterAssert(fileURL);
- NSParameterAssert(name);
-
- NSString *fileName = [fileURL lastPathComponent];
- NSString *mimeType = AFContentTypeForPathExtension([fileURL pathExtension]);
-
- return [self appendPartWithFileURL:fileURL name:name fileName:fileName mimeType:mimeType error:error];
-}
-
-- (BOOL)appendPartWithFileURL:(NSURL *)fileURL
- name:(NSString *)name
- fileName:(NSString *)fileName
- mimeType:(NSString *)mimeType
- error:(NSError * __autoreleasing *)error
-{
- NSParameterAssert(fileURL);
- NSParameterAssert(name);
- NSParameterAssert(fileName);
- NSParameterAssert(mimeType);
-
- if (![fileURL isFileURL]) {
- NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"Expected URL to be a file URL", @"AFNetworking", nil)};
- if (error) {
- *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo];
- }
-
- return NO;
- } else if ([fileURL checkResourceIsReachableAndReturnError:error] == NO) {
- NSDictionary *userInfo = @{NSLocalizedFailureReasonErrorKey: NSLocalizedStringFromTable(@"File URL not reachable.", @"AFNetworking", nil)};
- if (error) {
- *error = [[NSError alloc] initWithDomain:AFURLRequestSerializationErrorDomain code:NSURLErrorBadURL userInfo:userInfo];
- }
-
- return NO;
- }
-
- NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:error];
- if (!fileAttributes) {
- return NO;
- }
-
- NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
- [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"];
- [mutableHeaders setValue:mimeType forKey:@"Content-Type"];
-
- AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];
- bodyPart.stringEncoding = self.stringEncoding;
- bodyPart.headers = mutableHeaders;
- bodyPart.boundary = self.boundary;
- bodyPart.body = fileURL;
- bodyPart.bodyContentLength = [fileAttributes[NSFileSize] unsignedLongLongValue];
- [self.bodyStream appendHTTPBodyPart:bodyPart];
-
- return YES;
-}
-
-- (void)appendPartWithInputStream:(NSInputStream *)inputStream
- name:(NSString *)name
- fileName:(NSString *)fileName
- length:(int64_t)length
- mimeType:(NSString *)mimeType
-{
- NSParameterAssert(name);
- NSParameterAssert(fileName);
- NSParameterAssert(mimeType);
-
- NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
- [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"];
- [mutableHeaders setValue:mimeType forKey:@"Content-Type"];
-
- AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];
- bodyPart.stringEncoding = self.stringEncoding;
- bodyPart.headers = mutableHeaders;
- bodyPart.boundary = self.boundary;
- bodyPart.body = inputStream;
-
- bodyPart.bodyContentLength = (unsigned long long)length;
-
- [self.bodyStream appendHTTPBodyPart:bodyPart];
-}
-
-- (void)appendPartWithFileData:(NSData *)data
- name:(NSString *)name
- fileName:(NSString *)fileName
- mimeType:(NSString *)mimeType
-{
- NSParameterAssert(name);
- NSParameterAssert(fileName);
- NSParameterAssert(mimeType);
-
- NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
- [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"];
- [mutableHeaders setValue:mimeType forKey:@"Content-Type"];
-
- [self appendPartWithHeaders:mutableHeaders body:data];
-}
-
-- (void)appendPartWithFormData:(NSData *)data
- name:(NSString *)name
-{
- NSParameterAssert(name);
-
- NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary];
- [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"", name] forKey:@"Content-Disposition"];
-
- [self appendPartWithHeaders:mutableHeaders body:data];
-}
-
-- (void)appendPartWithHeaders:(NSDictionary *)headers
- body:(NSData *)body
-{
- NSParameterAssert(body);
-
- AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init];
- bodyPart.stringEncoding = self.stringEncoding;
- bodyPart.headers = headers;
- bodyPart.boundary = self.boundary;
- bodyPart.bodyContentLength = [body length];
- bodyPart.body = body;
-
- [self.bodyStream appendHTTPBodyPart:bodyPart];
-}
-
-- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes
- delay:(NSTimeInterval)delay
-{
- self.bodyStream.numberOfBytesInPacket = numberOfBytes;
- self.bodyStream.delay = delay;
-}
-
-- (NSMutableURLRequest *)requestByFinalizingMultipartFormData {
- if ([self.bodyStream isEmpty]) {
- return self.request;
- }
-
- // Reset the initial and final boundaries to ensure correct Content-Length
- [self.bodyStream setInitialAndFinalBoundaries];
- [self.request setHTTPBodyStream:self.bodyStream];
-
- [self.request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", self.boundary] forHTTPHeaderField:@"Content-Type"];
- [self.request setValue:[NSString stringWithFormat:@"%llu", [self.bodyStream contentLength]] forHTTPHeaderField:@"Content-Length"];
-
- return self.request;
-}
-
-@end
-
-#pragma mark -
-
-@interface NSStream ()
-@property (readwrite) NSStreamStatus streamStatus;
-@property (readwrite, copy) NSError *streamError;
-@end
-
-@interface AFMultipartBodyStream () <NSCopying>
-@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding;
-@property (readwrite, nonatomic, strong) NSMutableArray *HTTPBodyParts;
-@property (readwrite, nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator;
-@property (readwrite, nonatomic, strong) AFHTTPBodyPart *currentHTTPBodyPart;
-@property (readwrite, nonatomic, strong) NSOutputStream *outputStream;
-@property (readwrite, nonatomic, strong) NSMutableData *buffer;
-@end
-
-@implementation AFMultipartBodyStream
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wimplicit-atomic-properties"
-#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000) || (defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1100)
-@synthesize delegate;
-#endif
-@synthesize streamStatus;
-@synthesize streamError;
-#pragma clang diagnostic pop
-
-- (instancetype)initWithStringEncoding:(NSStringEncoding)encoding {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.stringEncoding = encoding;
- self.HTTPBodyParts = [NSMutableArray array];
- self.numberOfBytesInPacket = NSIntegerMax;
-
- return self;
-}
-
-- (void)setInitialAndFinalBoundaries {
- if ([self.HTTPBodyParts count] > 0) {
- for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {
- bodyPart.hasInitialBoundary = NO;
- bodyPart.hasFinalBoundary = NO;
- }
-
- [[self.HTTPBodyParts firstObject] setHasInitialBoundary:YES];
- [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES];
- }
-}
-
-- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart {
- [self.HTTPBodyParts addObject:bodyPart];
-}
-
-- (BOOL)isEmpty {
- return [self.HTTPBodyParts count] == 0;
-}
-
-#pragma mark - NSInputStream
-
-- (NSInteger)read:(uint8_t *)buffer
- maxLength:(NSUInteger)length
-{
- if ([self streamStatus] == NSStreamStatusClosed) {
- return 0;
- }
-
- NSInteger totalNumberOfBytesRead = 0;
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wgnu"
- while ((NSUInteger)totalNumberOfBytesRead < MIN(length, self.numberOfBytesInPacket)) {
- if (!self.currentHTTPBodyPart || ![self.currentHTTPBodyPart hasBytesAvailable]) {
- if (!(self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject])) {
- break;
- }
- } else {
- NSUInteger maxLength = MIN(length, self.numberOfBytesInPacket) - (NSUInteger)totalNumberOfBytesRead;
- NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:&buffer[totalNumberOfBytesRead] maxLength:maxLength];
- if (numberOfBytesRead == -1) {
- self.streamError = self.currentHTTPBodyPart.inputStream.streamError;
- break;
- } else {
- totalNumberOfBytesRead += numberOfBytesRead;
-
- if (self.delay > 0.0f) {
- [NSThread sleepForTimeInterval:self.delay];
- }
- }
- }
- }
-#pragma clang diagnostic pop
-
- return totalNumberOfBytesRead;
-}
-
-- (BOOL)getBuffer:(__unused uint8_t **)buffer
- length:(__unused NSUInteger *)len
-{
- return NO;
-}
-
-- (BOOL)hasBytesAvailable {
- return [self streamStatus] == NSStreamStatusOpen;
-}
-
-#pragma mark - NSStream
-
-- (void)open {
- if (self.streamStatus == NSStreamStatusOpen) {
- return;
- }
-
- self.streamStatus = NSStreamStatusOpen;
-
- [self setInitialAndFinalBoundaries];
- self.HTTPBodyPartEnumerator = [self.HTTPBodyParts objectEnumerator];
-}
-
-- (void)close {
- self.streamStatus = NSStreamStatusClosed;
-}
-
-- (id)propertyForKey:(__unused NSString *)key {
- return nil;
-}
-
-- (BOOL)setProperty:(__unused id)property
- forKey:(__unused NSString *)key
-{
- return NO;
-}
-
-- (void)scheduleInRunLoop:(__unused NSRunLoop *)aRunLoop
- forMode:(__unused NSString *)mode
-{}
-
-- (void)removeFromRunLoop:(__unused NSRunLoop *)aRunLoop
- forMode:(__unused NSString *)mode
-{}
-
-- (unsigned long long)contentLength {
- unsigned long long length = 0;
- for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {
- length += [bodyPart contentLength];
- }
-
- return length;
-}
-
-#pragma mark - Undocumented CFReadStream Bridged Methods
-
-- (void)_scheduleInCFRunLoop:(__unused CFRunLoopRef)aRunLoop
- forMode:(__unused CFStringRef)aMode
-{}
-
-- (void)_unscheduleFromCFRunLoop:(__unused CFRunLoopRef)aRunLoop
- forMode:(__unused CFStringRef)aMode
-{}
-
-- (BOOL)_setCFClientFlags:(__unused CFOptionFlags)inFlags
- callback:(__unused CFReadStreamClientCallBack)inCallback
- context:(__unused CFStreamClientContext *)inContext {
- return NO;
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFMultipartBodyStream *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding];
-
- for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) {
- [bodyStreamCopy appendHTTPBodyPart:[bodyPart copy]];
- }
-
- [bodyStreamCopy setInitialAndFinalBoundaries];
-
- return bodyStreamCopy;
-}
-
-@end
-
-#pragma mark -
-
-typedef enum {
- AFEncapsulationBoundaryPhase = 1,
- AFHeaderPhase = 2,
- AFBodyPhase = 3,
- AFFinalBoundaryPhase = 4,
-} AFHTTPBodyPartReadPhase;
-
-@interface AFHTTPBodyPart () <NSCopying> {
- AFHTTPBodyPartReadPhase _phase;
- NSInputStream *_inputStream;
- unsigned long long _phaseReadOffset;
-}
-
-- (BOOL)transitionToNextPhase;
-- (NSInteger)readData:(NSData *)data
- intoBuffer:(uint8_t *)buffer
- maxLength:(NSUInteger)length;
-@end
-
-@implementation AFHTTPBodyPart
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- [self transitionToNextPhase];
-
- return self;
-}
-
-- (void)dealloc {
- if (_inputStream) {
- [_inputStream close];
- _inputStream = nil;
- }
-}
-
-- (NSInputStream *)inputStream {
- if (!_inputStream) {
- if ([self.body isKindOfClass:[NSData class]]) {
- _inputStream = [NSInputStream inputStreamWithData:self.body];
- } else if ([self.body isKindOfClass:[NSURL class]]) {
- _inputStream = [NSInputStream inputStreamWithURL:self.body];
- } else if ([self.body isKindOfClass:[NSInputStream class]]) {
- _inputStream = self.body;
- } else {
- _inputStream = [NSInputStream inputStreamWithData:[NSData data]];
- }
- }
-
- return _inputStream;
-}
-
-- (NSString *)stringForHeaders {
- NSMutableString *headerString = [NSMutableString string];
- for (NSString *field in [self.headers allKeys]) {
- [headerString appendString:[NSString stringWithFormat:@"%@: %@%@", field, [self.headers valueForKey:field], kAFMultipartFormCRLF]];
- }
- [headerString appendString:kAFMultipartFormCRLF];
-
- return [NSString stringWithString:headerString];
-}
-
-- (unsigned long long)contentLength {
- unsigned long long length = 0;
-
- NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding];
- length += [encapsulationBoundaryData length];
-
- NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding];
- length += [headersData length];
-
- length += _bodyContentLength;
-
- NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]);
- length += [closingBoundaryData length];
-
- return length;
-}
-
-- (BOOL)hasBytesAvailable {
- // Allows `read:maxLength:` to be called again if `AFMultipartFormFinalBoundary` doesn't fit into the available buffer
- if (_phase == AFFinalBoundaryPhase) {
- return YES;
- }
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wcovered-switch-default"
- switch (self.inputStream.streamStatus) {
- case NSStreamStatusNotOpen:
- case NSStreamStatusOpening:
- case NSStreamStatusOpen:
- case NSStreamStatusReading:
- case NSStreamStatusWriting:
- return YES;
- case NSStreamStatusAtEnd:
- case NSStreamStatusClosed:
- case NSStreamStatusError:
- default:
- return NO;
- }
-#pragma clang diagnostic pop
-}
-
-- (NSInteger)read:(uint8_t *)buffer
- maxLength:(NSUInteger)length
-{
- NSInteger totalNumberOfBytesRead = 0;
-
- if (_phase == AFEncapsulationBoundaryPhase) {
- NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary(self.boundary) : AFMultipartFormEncapsulationBoundary(self.boundary)) dataUsingEncoding:self.stringEncoding];
- totalNumberOfBytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];
- }
-
- if (_phase == AFHeaderPhase) {
- NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding];
- totalNumberOfBytesRead += [self readData:headersData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];
- }
-
- if (_phase == AFBodyPhase) {
- NSInteger numberOfBytesRead = 0;
-
- numberOfBytesRead = [self.inputStream read:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];
- if (numberOfBytesRead == -1) {
- return -1;
- } else {
- totalNumberOfBytesRead += numberOfBytesRead;
-
- if ([self.inputStream streamStatus] >= NSStreamStatusAtEnd) {
- [self transitionToNextPhase];
- }
- }
- }
-
- if (_phase == AFFinalBoundaryPhase) {
- NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary(self.boundary) dataUsingEncoding:self.stringEncoding] : [NSData data]);
- totalNumberOfBytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[totalNumberOfBytesRead] maxLength:(length - (NSUInteger)totalNumberOfBytesRead)];
- }
-
- return totalNumberOfBytesRead;
-}
-
-- (NSInteger)readData:(NSData *)data
- intoBuffer:(uint8_t *)buffer
- maxLength:(NSUInteger)length
-{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wgnu"
- NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length));
- [data getBytes:buffer range:range];
-#pragma clang diagnostic pop
-
- _phaseReadOffset += range.length;
-
- if (((NSUInteger)_phaseReadOffset) >= [data length]) {
- [self transitionToNextPhase];
- }
-
- return (NSInteger)range.length;
-}
-
-- (BOOL)transitionToNextPhase {
- if (![[NSThread currentThread] isMainThread]) {
- dispatch_sync(dispatch_get_main_queue(), ^{
- [self transitionToNextPhase];
- });
- return YES;
- }
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wcovered-switch-default"
- switch (_phase) {
- case AFEncapsulationBoundaryPhase:
- _phase = AFHeaderPhase;
- break;
- case AFHeaderPhase:
- [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
- [self.inputStream open];
- _phase = AFBodyPhase;
- break;
- case AFBodyPhase:
- [self.inputStream close];
- _phase = AFFinalBoundaryPhase;
- break;
- case AFFinalBoundaryPhase:
- default:
- _phase = AFEncapsulationBoundaryPhase;
- break;
- }
- _phaseReadOffset = 0;
-#pragma clang diagnostic pop
-
- return YES;
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init];
-
- bodyPart.stringEncoding = self.stringEncoding;
- bodyPart.headers = self.headers;
- bodyPart.bodyContentLength = self.bodyContentLength;
- bodyPart.body = self.body;
- bodyPart.boundary = self.boundary;
-
- return bodyPart;
-}
-
-@end
-
-#pragma mark -
-
-@implementation AFJSONRequestSerializer
-
-+ (instancetype)serializer {
- return [self serializerWithWritingOptions:(NSJSONWritingOptions)0];
-}
-
-+ (instancetype)serializerWithWritingOptions:(NSJSONWritingOptions)writingOptions
-{
- AFJSONRequestSerializer *serializer = [[self alloc] init];
- serializer.writingOptions = writingOptions;
-
- return serializer;
-}
-
-#pragma mark - AFURLRequestSerialization
-
-- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
- withParameters:(id)parameters
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(request);
-
- if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
- return [super requestBySerializingRequest:request withParameters:parameters error:error];
- }
-
- NSMutableURLRequest *mutableRequest = [request mutableCopy];
-
- [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {
- if (![request valueForHTTPHeaderField:field]) {
- [mutableRequest setValue:value forHTTPHeaderField:field];
- }
- }];
-
- if (parameters) {
- if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) {
- [mutableRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
- }
-
- [mutableRequest setHTTPBody:[NSJSONSerialization dataWithJSONObject:parameters options:self.writingOptions error:error]];
- }
-
- return mutableRequest;
-}
-
-#pragma mark - NSSecureCoding
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [super initWithCoder:decoder];
- if (!self) {
- return nil;
- }
-
- self.writingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writingOptions))] unsignedIntegerValue];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [super encodeWithCoder:coder];
-
- [coder encodeInteger:self.writingOptions forKey:NSStringFromSelector(@selector(writingOptions))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFJSONRequestSerializer *serializer = [super copyWithZone:zone];
- serializer.writingOptions = self.writingOptions;
-
- return serializer;
-}
-
-@end
-
-#pragma mark -
-
-@implementation AFPropertyListRequestSerializer
-
-+ (instancetype)serializer {
- return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 writeOptions:0];
-}
-
-+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
- writeOptions:(NSPropertyListWriteOptions)writeOptions
-{
- AFPropertyListRequestSerializer *serializer = [[self alloc] init];
- serializer.format = format;
- serializer.writeOptions = writeOptions;
-
- return serializer;
-}
-
-#pragma mark - AFURLRequestSerializer
-
-- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
- withParameters:(id)parameters
- error:(NSError *__autoreleasing *)error
-{
- NSParameterAssert(request);
-
- if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
- return [super requestBySerializingRequest:request withParameters:parameters error:error];
- }
-
- NSMutableURLRequest *mutableRequest = [request mutableCopy];
-
- [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {
- if (![request valueForHTTPHeaderField:field]) {
- [mutableRequest setValue:value forHTTPHeaderField:field];
- }
- }];
-
- if (parameters) {
- if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) {
- [mutableRequest setValue:@"application/x-plist" forHTTPHeaderField:@"Content-Type"];
- }
-
- [mutableRequest setHTTPBody:[NSPropertyListSerialization dataWithPropertyList:parameters format:self.format options:self.writeOptions error:error]];
- }
-
- return mutableRequest;
-}
-
-#pragma mark - NSSecureCoding
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [super initWithCoder:decoder];
- if (!self) {
- return nil;
- }
-
- self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue];
- self.writeOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(writeOptions))] unsignedIntegerValue];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [super encodeWithCoder:coder];
-
- [coder encodeInteger:self.format forKey:NSStringFromSelector(@selector(format))];
- [coder encodeObject:@(self.writeOptions) forKey:NSStringFromSelector(@selector(writeOptions))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFPropertyListRequestSerializer *serializer = [super copyWithZone:zone];
- serializer.format = self.format;
- serializer.writeOptions = self.writeOptions;
-
- return serializer;
-}
-
-@end
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLResponseSerialization.h b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLResponseSerialization.h
deleted file mode 100755
index a9430addb..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLResponseSerialization.h
+++ /dev/null
@@ -1,311 +0,0 @@
-// AFURLResponseSerialization.h
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import <Foundation/Foundation.h>
-#import <CoreGraphics/CoreGraphics.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/**
- The `AFURLResponseSerialization` protocol is adopted by an object that decodes data into a more useful object representation, according to details in the server response. Response serializers may additionally perform validation on the incoming response and data.
-
- For example, a JSON response serializer may check for an acceptable status code (`2XX` range) and content type (`application/json`), decoding a valid JSON response into an object.
- */
-@protocol AFURLResponseSerialization <NSObject, NSSecureCoding, NSCopying>
-
-/**
- The response object decoded from the data associated with a specified response.
-
- @param response The response to be processed.
- @param data The response data to be decoded.
- @param error The error that occurred while attempting to decode the response data.
-
- @return The object decoded from the specified response data.
- */
-- (nullable id)responseObjectForResponse:(nullable NSURLResponse *)response
- data:(nullable NSData *)data
- error:(NSError * _Nullable __autoreleasing *)error NS_SWIFT_NOTHROW;
-
-@end
-
-#pragma mark -
-
-/**
- `AFHTTPResponseSerializer` conforms to the `AFURLRequestSerialization` & `AFURLResponseSerialization` protocols, offering a concrete base implementation of query string / URL form-encoded parameter serialization and default request headers, as well as response status code and content type validation.
-
- Any request or response serializer dealing with HTTP is encouraged to subclass `AFHTTPResponseSerializer` in order to ensure consistent default behavior.
- */
-@interface AFHTTPResponseSerializer : NSObject <AFURLResponseSerialization>
-
-- (instancetype)init;
-
-/**
- The string encoding used to serialize data received from the server, when no string encoding is specified by the response. `NSUTF8StringEncoding` by default.
- */
-@property (nonatomic, assign) NSStringEncoding stringEncoding;
-
-/**
- Creates and returns a serializer with default configuration.
- */
-+ (instancetype)serializer;
-
-///-----------------------------------------
-/// @name Configuring Response Serialization
-///-----------------------------------------
-
-/**
- The acceptable HTTP status codes for responses. When non-`nil`, responses with status codes not contained by the set will result in an error during validation.
-
- See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
- */
-@property (nonatomic, copy, nullable) NSIndexSet *acceptableStatusCodes;
-
-/**
- The acceptable MIME types for responses. When non-`nil`, responses with a `Content-Type` with MIME types that do not intersect with the set will result in an error during validation.
- */
-@property (nonatomic, copy, nullable) NSSet <NSString *> *acceptableContentTypes;
-
-/**
- Validates the specified response and data.
-
- In its base implementation, this method checks for an acceptable status code and content type. Subclasses may wish to add other domain-specific checks.
-
- @param response The response to be validated.
- @param data The data associated with the response.
- @param error The error that occurred while attempting to validate the response.
-
- @return `YES` if the response is valid, otherwise `NO`.
- */
-- (BOOL)validateResponse:(nullable NSHTTPURLResponse *)response
- data:(nullable NSData *)data
- error:(NSError * _Nullable __autoreleasing *)error;
-
-@end
-
-#pragma mark -
-
-
-/**
- `AFJSONResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes JSON responses.
-
- By default, `AFJSONResponseSerializer` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types:
-
- - `application/json`
- - `text/json`
- - `text/javascript`
- */
-@interface AFJSONResponseSerializer : AFHTTPResponseSerializer
-
-- (instancetype)init;
-
-/**
- Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
- */
-@property (nonatomic, assign) NSJSONReadingOptions readingOptions;
-
-/**
- Whether to remove keys with `NSNull` values from response JSON. Defaults to `NO`.
- */
-@property (nonatomic, assign) BOOL removesKeysWithNullValues;
-
-/**
- Creates and returns a JSON serializer with specified reading and writing options.
-
- @param readingOptions The specified JSON reading options.
- */
-+ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions;
-
-@end
-
-#pragma mark -
-
-/**
- `AFXMLParserResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLParser` objects.
-
- By default, `AFXMLParserResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:
-
- - `application/xml`
- - `text/xml`
- */
-@interface AFXMLParserResponseSerializer : AFHTTPResponseSerializer
-
-@end
-
-#pragma mark -
-
-#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
-
-/**
- `AFXMLDocumentResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.
-
- By default, `AFXMLDocumentResponseSerializer` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types:
-
- - `application/xml`
- - `text/xml`
- */
-@interface AFXMLDocumentResponseSerializer : AFHTTPResponseSerializer
-
-- (instancetype)init;
-
-/**
- Input and output options specifically intended for `NSXMLDocument` objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". `0` by default.
- */
-@property (nonatomic, assign) NSUInteger options;
-
-/**
- Creates and returns an XML document serializer with the specified options.
-
- @param mask The XML document options.
- */
-+ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask;
-
-@end
-
-#endif
-
-#pragma mark -
-
-/**
- `AFPropertyListResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes XML responses as an `NSXMLDocument` objects.
-
- By default, `AFPropertyListResponseSerializer` accepts the following MIME types:
-
- - `application/x-plist`
- */
-@interface AFPropertyListResponseSerializer : AFHTTPResponseSerializer
-
-- (instancetype)init;
-
-/**
- The property list format. Possible values are described in "NSPropertyListFormat".
- */
-@property (nonatomic, assign) NSPropertyListFormat format;
-
-/**
- The property list reading options. Possible values are described in "NSPropertyListMutabilityOptions."
- */
-@property (nonatomic, assign) NSPropertyListReadOptions readOptions;
-
-/**
- Creates and returns a property list serializer with a specified format, read options, and write options.
-
- @param format The property list format.
- @param readOptions The property list reading options.
- */
-+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
- readOptions:(NSPropertyListReadOptions)readOptions;
-
-@end
-
-#pragma mark -
-
-/**
- `AFImageResponseSerializer` is a subclass of `AFHTTPResponseSerializer` that validates and decodes image responses.
-
- By default, `AFImageResponseSerializer` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage:
-
- - `image/tiff`
- - `image/jpeg`
- - `image/gif`
- - `image/png`
- - `image/ico`
- - `image/x-icon`
- - `image/bmp`
- - `image/x-bmp`
- - `image/x-xbitmap`
- - `image/x-win-bitmap`
- */
-@interface AFImageResponseSerializer : AFHTTPResponseSerializer
-
-#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
-/**
- The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance.
- */
-@property (nonatomic, assign) CGFloat imageScale;
-
-/**
- Whether to automatically inflate response image data for compressed formats (such as PNG or JPEG). Enabling this can significantly improve drawing performance on iOS when used with `setCompletionBlockWithSuccess:failure:`, as it allows a bitmap representation to be constructed in the background rather than on the main thread. `YES` by default.
- */
-@property (nonatomic, assign) BOOL automaticallyInflatesResponseImage;
-#endif
-
-@end
-
-#pragma mark -
-
-/**
- `AFCompoundSerializer` is a subclass of `AFHTTPResponseSerializer` that delegates the response serialization to the first `AFHTTPResponseSerializer` object that returns an object for `responseObjectForResponse:data:error:`, falling back on the default behavior of `AFHTTPResponseSerializer`. This is useful for supporting multiple potential types and structures of server responses with a single serializer.
- */
-@interface AFCompoundResponseSerializer : AFHTTPResponseSerializer
-
-/**
- The component response serializers.
- */
-@property (readonly, nonatomic, copy) NSArray <id<AFURLResponseSerialization>> *responseSerializers;
-
-/**
- Creates and returns a compound serializer comprised of the specified response serializers.
-
- @warning Each response serializer specified must be a subclass of `AFHTTPResponseSerializer`, and response to `-validateResponse:data:error:`.
- */
-+ (instancetype)compoundSerializerWithResponseSerializers:(NSArray <id<AFURLResponseSerialization>> *)responseSerializers;
-
-@end
-
-///----------------
-/// @name Constants
-///----------------
-
-/**
- ## Error Domains
-
- The following error domain is predefined.
-
- - `NSString * const AFURLResponseSerializationErrorDomain`
-
- ### Constants
-
- `AFURLResponseSerializationErrorDomain`
- AFURLResponseSerializer errors. Error codes for `AFURLResponseSerializationErrorDomain` correspond to codes in `NSURLErrorDomain`.
- */
-FOUNDATION_EXPORT NSString * const AFURLResponseSerializationErrorDomain;
-
-/**
- ## User info dictionary keys
-
- These keys may exist in the user info dictionary, in addition to those defined for NSError.
-
- - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey`
- - `NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey`
-
- ### Constants
-
- `AFNetworkingOperationFailingURLResponseErrorKey`
- The corresponding value is an `NSURLResponse` containing the response of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`.
-
- `AFNetworkingOperationFailingURLResponseDataErrorKey`
- The corresponding value is an `NSData` containing the original data of the operation associated with an error. This key is only present in the `AFURLResponseSerializationErrorDomain`.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseErrorKey;
-
-FOUNDATION_EXPORT NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey;
-
-NS_ASSUME_NONNULL_END
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLResponseSerialization.m b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLResponseSerialization.m
deleted file mode 100755
index 5e4679928..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLResponseSerialization.m
+++ /dev/null
@@ -1,805 +0,0 @@
-// AFURLResponseSerialization.m
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import "AFURLResponseSerialization.h"
-
-#import <TargetConditionals.h>
-
-#if TARGET_OS_IOS
-#import <UIKit/UIKit.h>
-#elif TARGET_OS_WATCH
-#import <WatchKit/WatchKit.h>
-#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-#import <Cocoa/Cocoa.h>
-#endif
-
-NSString * const AFURLResponseSerializationErrorDomain = @"com.alamofire.error.serialization.response";
-NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"com.alamofire.serialization.response.error.response";
-NSString * const AFNetworkingOperationFailingURLResponseDataErrorKey = @"com.alamofire.serialization.response.error.data";
-
-static NSError * AFErrorWithUnderlyingError(NSError *error, NSError *underlyingError) {
- if (!error) {
- return underlyingError;
- }
-
- if (!underlyingError || error.userInfo[NSUnderlyingErrorKey]) {
- return error;
- }
-
- NSMutableDictionary *mutableUserInfo = [error.userInfo mutableCopy];
- mutableUserInfo[NSUnderlyingErrorKey] = underlyingError;
-
- return [[NSError alloc] initWithDomain:error.domain code:error.code userInfo:mutableUserInfo];
-}
-
-static BOOL AFErrorOrUnderlyingErrorHasCodeInDomain(NSError *error, NSInteger code, NSString *domain) {
- if ([error.domain isEqualToString:domain] && error.code == code) {
- return YES;
- } else if (error.userInfo[NSUnderlyingErrorKey]) {
- return AFErrorOrUnderlyingErrorHasCodeInDomain(error.userInfo[NSUnderlyingErrorKey], code, domain);
- }
-
- return NO;
-}
-
-static id AFJSONObjectByRemovingKeysWithNullValues(id JSONObject, NSJSONReadingOptions readingOptions) {
- if ([JSONObject isKindOfClass:[NSArray class]]) {
- NSMutableArray *mutableArray = [NSMutableArray arrayWithCapacity:[(NSArray *)JSONObject count]];
- for (id value in (NSArray *)JSONObject) {
- [mutableArray addObject:AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions)];
- }
-
- return (readingOptions & NSJSONReadingMutableContainers) ? mutableArray : [NSArray arrayWithArray:mutableArray];
- } else if ([JSONObject isKindOfClass:[NSDictionary class]]) {
- NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:JSONObject];
- for (id <NSCopying> key in [(NSDictionary *)JSONObject allKeys]) {
- id value = (NSDictionary *)JSONObject[key];
- if (!value || [value isEqual:[NSNull null]]) {
- [mutableDictionary removeObjectForKey:key];
- } else if ([value isKindOfClass:[NSArray class]] || [value isKindOfClass:[NSDictionary class]]) {
- mutableDictionary[key] = AFJSONObjectByRemovingKeysWithNullValues(value, readingOptions);
- }
- }
-
- return (readingOptions & NSJSONReadingMutableContainers) ? mutableDictionary : [NSDictionary dictionaryWithDictionary:mutableDictionary];
- }
-
- return JSONObject;
-}
-
-@implementation AFHTTPResponseSerializer
-
-+ (instancetype)serializer {
- return [[self alloc] init];
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.stringEncoding = NSUTF8StringEncoding;
-
- self.acceptableStatusCodes = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)];
- self.acceptableContentTypes = nil;
-
- return self;
-}
-
-#pragma mark -
-
-- (BOOL)validateResponse:(NSHTTPURLResponse *)response
- data:(NSData *)data
- error:(NSError * __autoreleasing *)error
-{
- BOOL responseIsValid = YES;
- NSError *validationError = nil;
-
- if (response && [response isKindOfClass:[NSHTTPURLResponse class]]) {
- if (self.acceptableContentTypes && ![self.acceptableContentTypes containsObject:[response MIMEType]] &&
- !([response MIMEType] == nil && [data length] == 0)) {
-
- if ([data length] > 0 && [response URL]) {
- NSMutableDictionary *mutableUserInfo = [@{
- NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]],
- NSURLErrorFailingURLErrorKey:[response URL],
- AFNetworkingOperationFailingURLResponseErrorKey: response,
- } mutableCopy];
- if (data) {
- mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data;
- }
-
- validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:mutableUserInfo], validationError);
- }
-
- responseIsValid = NO;
- }
-
- if (self.acceptableStatusCodes && ![self.acceptableStatusCodes containsIndex:(NSUInteger)response.statusCode] && [response URL]) {
- NSMutableDictionary *mutableUserInfo = [@{
- NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode],
- NSURLErrorFailingURLErrorKey:[response URL],
- AFNetworkingOperationFailingURLResponseErrorKey: response,
- } mutableCopy];
-
- if (data) {
- mutableUserInfo[AFNetworkingOperationFailingURLResponseDataErrorKey] = data;
- }
-
- validationError = AFErrorWithUnderlyingError([NSError errorWithDomain:AFURLResponseSerializationErrorDomain code:NSURLErrorBadServerResponse userInfo:mutableUserInfo], validationError);
-
- responseIsValid = NO;
- }
- }
-
- if (error && !responseIsValid) {
- *error = validationError;
- }
-
- return responseIsValid;
-}
-
-#pragma mark - AFURLResponseSerialization
-
-- (id)responseObjectForResponse:(NSURLResponse *)response
- data:(NSData *)data
- error:(NSError *__autoreleasing *)error
-{
- [self validateResponse:(NSHTTPURLResponse *)response data:data error:error];
-
- return data;
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [self init];
- if (!self) {
- return nil;
- }
-
- self.acceptableStatusCodes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableStatusCodes))];
- self.acceptableContentTypes = [decoder decodeObjectOfClass:[NSIndexSet class] forKey:NSStringFromSelector(@selector(acceptableContentTypes))];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))];
- [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFHTTPResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
- serializer.acceptableStatusCodes = [self.acceptableStatusCodes copyWithZone:zone];
- serializer.acceptableContentTypes = [self.acceptableContentTypes copyWithZone:zone];
-
- return serializer;
-}
-
-@end
-
-#pragma mark -
-
-@implementation AFJSONResponseSerializer
-
-+ (instancetype)serializer {
- return [self serializerWithReadingOptions:(NSJSONReadingOptions)0];
-}
-
-+ (instancetype)serializerWithReadingOptions:(NSJSONReadingOptions)readingOptions {
- AFJSONResponseSerializer *serializer = [[self alloc] init];
- serializer.readingOptions = readingOptions;
-
- return serializer;
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.acceptableContentTypes = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil];
-
- return self;
-}
-
-#pragma mark - AFURLResponseSerialization
-
-- (id)responseObjectForResponse:(NSURLResponse *)response
- data:(NSData *)data
- error:(NSError *__autoreleasing *)error
-{
- if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
- if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
- return nil;
- }
- }
-
- id responseObject = nil;
- NSError *serializationError = nil;
- // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization.
- // See https://github.com/rails/rails/issues/1742
- BOOL isSpace = [data isEqualToData:[NSData dataWithBytes:" " length:1]];
- if (data.length > 0 && !isSpace) {
- responseObject = [NSJSONSerialization JSONObjectWithData:data options:self.readingOptions error:&serializationError];
- } else {
- return nil;
- }
-
- if (self.removesKeysWithNullValues && responseObject) {
- responseObject = AFJSONObjectByRemovingKeysWithNullValues(responseObject, self.readingOptions);
- }
-
- if (error) {
- *error = AFErrorWithUnderlyingError(serializationError, *error);
- }
-
- return responseObject;
-}
-
-#pragma mark - NSSecureCoding
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [super initWithCoder:decoder];
- if (!self) {
- return nil;
- }
-
- self.readingOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readingOptions))] unsignedIntegerValue];
- self.removesKeysWithNullValues = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))] boolValue];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [super encodeWithCoder:coder];
-
- [coder encodeObject:@(self.readingOptions) forKey:NSStringFromSelector(@selector(readingOptions))];
- [coder encodeObject:@(self.removesKeysWithNullValues) forKey:NSStringFromSelector(@selector(removesKeysWithNullValues))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFJSONResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
- serializer.readingOptions = self.readingOptions;
- serializer.removesKeysWithNullValues = self.removesKeysWithNullValues;
-
- return serializer;
-}
-
-@end
-
-#pragma mark -
-
-@implementation AFXMLParserResponseSerializer
-
-+ (instancetype)serializer {
- AFXMLParserResponseSerializer *serializer = [[self alloc] init];
-
- return serializer;
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil];
-
- return self;
-}
-
-#pragma mark - AFURLResponseSerialization
-
-- (id)responseObjectForResponse:(NSHTTPURLResponse *)response
- data:(NSData *)data
- error:(NSError *__autoreleasing *)error
-{
- if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
- if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
- return nil;
- }
- }
-
- return [[NSXMLParser alloc] initWithData:data];
-}
-
-@end
-
-#pragma mark -
-
-#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
-
-@implementation AFXMLDocumentResponseSerializer
-
-+ (instancetype)serializer {
- return [self serializerWithXMLDocumentOptions:0];
-}
-
-+ (instancetype)serializerWithXMLDocumentOptions:(NSUInteger)mask {
- AFXMLDocumentResponseSerializer *serializer = [[self alloc] init];
- serializer.options = mask;
-
- return serializer;
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/xml", @"text/xml", nil];
-
- return self;
-}
-
-#pragma mark - AFURLResponseSerialization
-
-- (id)responseObjectForResponse:(NSURLResponse *)response
- data:(NSData *)data
- error:(NSError *__autoreleasing *)error
-{
- if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
- if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
- return nil;
- }
- }
-
- NSError *serializationError = nil;
- NSXMLDocument *document = [[NSXMLDocument alloc] initWithData:data options:self.options error:&serializationError];
-
- if (error) {
- *error = AFErrorWithUnderlyingError(serializationError, *error);
- }
-
- return document;
-}
-
-#pragma mark - NSSecureCoding
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [super initWithCoder:decoder];
- if (!self) {
- return nil;
- }
-
- self.options = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(options))] unsignedIntegerValue];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [super encodeWithCoder:coder];
-
- [coder encodeObject:@(self.options) forKey:NSStringFromSelector(@selector(options))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFXMLDocumentResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
- serializer.options = self.options;
-
- return serializer;
-}
-
-@end
-
-#endif
-
-#pragma mark -
-
-@implementation AFPropertyListResponseSerializer
-
-+ (instancetype)serializer {
- return [self serializerWithFormat:NSPropertyListXMLFormat_v1_0 readOptions:0];
-}
-
-+ (instancetype)serializerWithFormat:(NSPropertyListFormat)format
- readOptions:(NSPropertyListReadOptions)readOptions
-{
- AFPropertyListResponseSerializer *serializer = [[self alloc] init];
- serializer.format = format;
- serializer.readOptions = readOptions;
-
- return serializer;
-}
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"application/x-plist", nil];
-
- return self;
-}
-
-#pragma mark - AFURLResponseSerialization
-
-- (id)responseObjectForResponse:(NSURLResponse *)response
- data:(NSData *)data
- error:(NSError *__autoreleasing *)error
-{
- if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
- if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
- return nil;
- }
- }
-
- id responseObject;
- NSError *serializationError = nil;
-
- if (data) {
- responseObject = [NSPropertyListSerialization propertyListWithData:data options:self.readOptions format:NULL error:&serializationError];
- }
-
- if (error) {
- *error = AFErrorWithUnderlyingError(serializationError, *error);
- }
-
- return responseObject;
-}
-
-#pragma mark - NSSecureCoding
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [super initWithCoder:decoder];
- if (!self) {
- return nil;
- }
-
- self.format = (NSPropertyListFormat)[[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(format))] unsignedIntegerValue];
- self.readOptions = [[decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(readOptions))] unsignedIntegerValue];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [super encodeWithCoder:coder];
-
- [coder encodeObject:@(self.format) forKey:NSStringFromSelector(@selector(format))];
- [coder encodeObject:@(self.readOptions) forKey:NSStringFromSelector(@selector(readOptions))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFPropertyListResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
- serializer.format = self.format;
- serializer.readOptions = self.readOptions;
-
- return serializer;
-}
-
-@end
-
-#pragma mark -
-
-#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
-#import <CoreGraphics/CoreGraphics.h>
-#import <UIKit/UIKit.h>
-
-@interface UIImage (AFNetworkingSafeImageLoading)
-+ (UIImage *)af_safeImageWithData:(NSData *)data;
-@end
-
-static NSLock* imageLock = nil;
-
-@implementation UIImage (AFNetworkingSafeImageLoading)
-
-+ (UIImage *)af_safeImageWithData:(NSData *)data {
- UIImage* image = nil;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- imageLock = [[NSLock alloc] init];
- });
-
- [imageLock lock];
- image = [UIImage imageWithData:data];
- [imageLock unlock];
- return image;
-}
-
-@end
-
-static UIImage * AFImageWithDataAtScale(NSData *data, CGFloat scale) {
- UIImage *image = [UIImage af_safeImageWithData:data];
- if (image.images) {
- return image;
- }
-
- return [[UIImage alloc] initWithCGImage:[image CGImage] scale:scale orientation:image.imageOrientation];
-}
-
-static UIImage * AFInflatedImageFromResponseWithDataAtScale(NSHTTPURLResponse *response, NSData *data, CGFloat scale) {
- if (!data || [data length] == 0) {
- return nil;
- }
-
- CGImageRef imageRef = NULL;
- CGDataProviderRef dataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
-
- if ([response.MIMEType isEqualToString:@"image/png"]) {
- imageRef = CGImageCreateWithPNGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault);
- } else if ([response.MIMEType isEqualToString:@"image/jpeg"]) {
- imageRef = CGImageCreateWithJPEGDataProvider(dataProvider, NULL, true, kCGRenderingIntentDefault);
-
- if (imageRef) {
- CGColorSpaceRef imageColorSpace = CGImageGetColorSpace(imageRef);
- CGColorSpaceModel imageColorSpaceModel = CGColorSpaceGetModel(imageColorSpace);
-
- // CGImageCreateWithJPEGDataProvider does not properly handle CMKY, so fall back to AFImageWithDataAtScale
- if (imageColorSpaceModel == kCGColorSpaceModelCMYK) {
- CGImageRelease(imageRef);
- imageRef = NULL;
- }
- }
- }
-
- CGDataProviderRelease(dataProvider);
-
- UIImage *image = AFImageWithDataAtScale(data, scale);
- if (!imageRef) {
- if (image.images || !image) {
- return image;
- }
-
- imageRef = CGImageCreateCopy([image CGImage]);
- if (!imageRef) {
- return nil;
- }
- }
-
- size_t width = CGImageGetWidth(imageRef);
- size_t height = CGImageGetHeight(imageRef);
- size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef);
-
- if (width * height > 1024 * 1024 || bitsPerComponent > 8) {
- CGImageRelease(imageRef);
-
- return image;
- }
-
- // CGImageGetBytesPerRow() calculates incorrectly in iOS 5.0, so defer to CGBitmapContextCreate
- size_t bytesPerRow = 0;
- CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
- CGColorSpaceModel colorSpaceModel = CGColorSpaceGetModel(colorSpace);
- CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef);
-
- if (colorSpaceModel == kCGColorSpaceModelRGB) {
- uint32_t alpha = (bitmapInfo & kCGBitmapAlphaInfoMask);
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wassign-enum"
- if (alpha == kCGImageAlphaNone) {
- bitmapInfo &= ~kCGBitmapAlphaInfoMask;
- bitmapInfo |= kCGImageAlphaNoneSkipFirst;
- } else if (!(alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast)) {
- bitmapInfo &= ~kCGBitmapAlphaInfoMask;
- bitmapInfo |= kCGImageAlphaPremultipliedFirst;
- }
-#pragma clang diagnostic pop
- }
-
- CGContextRef context = CGBitmapContextCreate(NULL, width, height, bitsPerComponent, bytesPerRow, colorSpace, bitmapInfo);
-
- CGColorSpaceRelease(colorSpace);
-
- if (!context) {
- CGImageRelease(imageRef);
-
- return image;
- }
-
- CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, width, height), imageRef);
- CGImageRef inflatedImageRef = CGBitmapContextCreateImage(context);
-
- CGContextRelease(context);
-
- UIImage *inflatedImage = [[UIImage alloc] initWithCGImage:inflatedImageRef scale:scale orientation:image.imageOrientation];
-
- CGImageRelease(inflatedImageRef);
- CGImageRelease(imageRef);
-
- return inflatedImage;
-}
-#endif
-
-
-@implementation AFImageResponseSerializer
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.acceptableContentTypes = [[NSSet alloc] initWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil];
-
-#if TARGET_OS_IOS || TARGET_OS_TV
- self.imageScale = [[UIScreen mainScreen] scale];
- self.automaticallyInflatesResponseImage = YES;
-#elif TARGET_OS_WATCH
- self.imageScale = [[WKInterfaceDevice currentDevice] screenScale];
- self.automaticallyInflatesResponseImage = YES;
-#endif
-
- return self;
-}
-
-#pragma mark - AFURLResponseSerializer
-
-- (id)responseObjectForResponse:(NSURLResponse *)response
- data:(NSData *)data
- error:(NSError *__autoreleasing *)error
-{
- if (![self validateResponse:(NSHTTPURLResponse *)response data:data error:error]) {
- if (!error || AFErrorOrUnderlyingErrorHasCodeInDomain(*error, NSURLErrorCannotDecodeContentData, AFURLResponseSerializationErrorDomain)) {
- return nil;
- }
- }
-
-#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
- if (self.automaticallyInflatesResponseImage) {
- return AFInflatedImageFromResponseWithDataAtScale((NSHTTPURLResponse *)response, data, self.imageScale);
- } else {
- return AFImageWithDataAtScale(data, self.imageScale);
- }
-#else
- // Ensure that the image is set to it's correct pixel width and height
- NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:data];
- NSImage *image = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])];
- [image addRepresentation:bitimage];
-
- return image;
-#endif
-
- return nil;
-}
-
-#pragma mark - NSSecureCoding
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [super initWithCoder:decoder];
- if (!self) {
- return nil;
- }
-
-#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
- NSNumber *imageScale = [decoder decodeObjectOfClass:[NSNumber class] forKey:NSStringFromSelector(@selector(imageScale))];
-#if CGFLOAT_IS_DOUBLE
- self.imageScale = [imageScale doubleValue];
-#else
- self.imageScale = [imageScale floatValue];
-#endif
-
- self.automaticallyInflatesResponseImage = [decoder decodeBoolForKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))];
-#endif
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [super encodeWithCoder:coder];
-
-#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
- [coder encodeObject:@(self.imageScale) forKey:NSStringFromSelector(@selector(imageScale))];
- [coder encodeBool:self.automaticallyInflatesResponseImage forKey:NSStringFromSelector(@selector(automaticallyInflatesResponseImage))];
-#endif
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFImageResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
-
-#if TARGET_OS_IOS || TARGET_OS_TV || TARGET_OS_WATCH
- serializer.imageScale = self.imageScale;
- serializer.automaticallyInflatesResponseImage = self.automaticallyInflatesResponseImage;
-#endif
-
- return serializer;
-}
-
-@end
-
-#pragma mark -
-
-@interface AFCompoundResponseSerializer ()
-@property (readwrite, nonatomic, copy) NSArray *responseSerializers;
-@end
-
-@implementation AFCompoundResponseSerializer
-
-+ (instancetype)compoundSerializerWithResponseSerializers:(NSArray *)responseSerializers {
- AFCompoundResponseSerializer *serializer = [[self alloc] init];
- serializer.responseSerializers = responseSerializers;
-
- return serializer;
-}
-
-#pragma mark - AFURLResponseSerialization
-
-- (id)responseObjectForResponse:(NSURLResponse *)response
- data:(NSData *)data
- error:(NSError *__autoreleasing *)error
-{
- for (id <AFURLResponseSerialization> serializer in self.responseSerializers) {
- if (![serializer isKindOfClass:[AFHTTPResponseSerializer class]]) {
- continue;
- }
-
- NSError *serializerError = nil;
- id responseObject = [serializer responseObjectForResponse:response data:data error:&serializerError];
- if (responseObject) {
- if (error) {
- *error = AFErrorWithUnderlyingError(serializerError, *error);
- }
-
- return responseObject;
- }
- }
-
- return [super responseObjectForResponse:response data:data error:error];
-}
-
-#pragma mark - NSSecureCoding
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- self = [super initWithCoder:decoder];
- if (!self) {
- return nil;
- }
-
- self.responseSerializers = [decoder decodeObjectOfClass:[NSArray class] forKey:NSStringFromSelector(@selector(responseSerializers))];
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [super encodeWithCoder:coder];
-
- [coder encodeObject:self.responseSerializers forKey:NSStringFromSelector(@selector(responseSerializers))];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- AFCompoundResponseSerializer *serializer = [[[self class] allocWithZone:zone] init];
- serializer.responseSerializers = self.responseSerializers;
-
- return serializer;
-}
-
-@end
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.h b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.h
deleted file mode 100755
index 89909fe49..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.h
+++ /dev/null
@@ -1,500 +0,0 @@
-// AFURLSessionManager.h
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-
-#import <Foundation/Foundation.h>
-
-#import "AFURLResponseSerialization.h"
-#import "AFURLRequestSerialization.h"
-#import "AFSecurityPolicy.h"
-#if !TARGET_OS_WATCH
-#import "AFNetworkReachabilityManager.h"
-#endif
-
-/**
- `AFURLSessionManager` creates and manages an `NSURLSession` object based on a specified `NSURLSessionConfiguration` object, which conforms to `<NSURLSessionTaskDelegate>`, `<NSURLSessionDataDelegate>`, `<NSURLSessionDownloadDelegate>`, and `<NSURLSessionDelegate>`.
-
- ## Subclassing Notes
-
- This is the base class for `AFHTTPSessionManager`, which adds functionality specific to making HTTP requests. If you are looking to extend `AFURLSessionManager` specifically for HTTP, consider subclassing `AFHTTPSessionManager` instead.
-
- ## NSURLSession & NSURLSessionTask Delegate Methods
-
- `AFURLSessionManager` implements the following delegate methods:
-
- ### `NSURLSessionDelegate`
-
- - `URLSession:didBecomeInvalidWithError:`
- - `URLSession:didReceiveChallenge:completionHandler:`
- - `URLSessionDidFinishEventsForBackgroundURLSession:`
-
- ### `NSURLSessionTaskDelegate`
-
- - `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`
- - `URLSession:task:didReceiveChallenge:completionHandler:`
- - `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`
- - `URLSession:task:needNewBodyStream:`
- - `URLSession:task:didCompleteWithError:`
-
- ### `NSURLSessionDataDelegate`
-
- - `URLSession:dataTask:didReceiveResponse:completionHandler:`
- - `URLSession:dataTask:didBecomeDownloadTask:`
- - `URLSession:dataTask:didReceiveData:`
- - `URLSession:dataTask:willCacheResponse:completionHandler:`
-
- ### `NSURLSessionDownloadDelegate`
-
- - `URLSession:downloadTask:didFinishDownloadingToURL:`
- - `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`
- - `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`
-
- If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first.
-
- ## Network Reachability Monitoring
-
- Network reachability status and change monitoring is available through the `reachabilityManager` property. Applications may choose to monitor network reachability conditions in order to prevent or suspend any outbound requests. See `AFNetworkReachabilityManager` for more details.
-
- ## NSCoding Caveats
-
- - Encoded managers do not include any block properties. Be sure to set delegate callback blocks when using `-initWithCoder:` or `NSKeyedUnarchiver`.
-
- ## NSCopying Caveats
-
- - `-copy` and `-copyWithZone:` return a new manager with a new `NSURLSession` created from the configuration of the original.
- - Operation copies do not include any delegate callback blocks, as they often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ session manager when copied.
-
- @warning Managers for background sessions must be owned for the duration of their use. This can be accomplished by creating an application-wide or shared singleton instance.
- */
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface AFURLSessionManager : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate, NSSecureCoding, NSCopying>
-
-/**
- The managed session.
- */
-@property (readonly, nonatomic, strong) NSURLSession *session;
-
-/**
- The operation queue on which delegate callbacks are run.
- */
-@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue;
-
-/**
- Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an instance of `AFJSONResponseSerializer`.
-
- @warning `responseSerializer` must not be `nil`.
- */
-@property (nonatomic, strong) id <AFURLResponseSerialization> responseSerializer;
-
-///-------------------------------
-/// @name Managing Security Policy
-///-------------------------------
-
-/**
- The security policy used by created session to evaluate server trust for secure connections. `AFURLSessionManager` uses the `defaultPolicy` unless otherwise specified.
- */
-@property (nonatomic, strong) AFSecurityPolicy *securityPolicy;
-
-#if !TARGET_OS_WATCH
-///--------------------------------------
-/// @name Monitoring Network Reachability
-///--------------------------------------
-
-/**
- The network reachability manager. `AFURLSessionManager` uses the `sharedManager` by default.
- */
-@property (readwrite, nonatomic, strong) AFNetworkReachabilityManager *reachabilityManager;
-#endif
-
-///----------------------------
-/// @name Getting Session Tasks
-///----------------------------
-
-/**
- The data, upload, and download tasks currently run by the managed session.
- */
-@property (readonly, nonatomic, strong) NSArray <NSURLSessionTask *> *tasks;
-
-/**
- The data tasks currently run by the managed session.
- */
-@property (readonly, nonatomic, strong) NSArray <NSURLSessionDataTask *> *dataTasks;
-
-/**
- The upload tasks currently run by the managed session.
- */
-@property (readonly, nonatomic, strong) NSArray <NSURLSessionUploadTask *> *uploadTasks;
-
-/**
- The download tasks currently run by the managed session.
- */
-@property (readonly, nonatomic, strong) NSArray <NSURLSessionDownloadTask *> *downloadTasks;
-
-///-------------------------------
-/// @name Managing Callback Queues
-///-------------------------------
-
-/**
- The dispatch queue for `completionBlock`. If `NULL` (default), the main queue is used.
- */
-@property (nonatomic, strong, nullable) dispatch_queue_t completionQueue;
-
-/**
- The dispatch group for `completionBlock`. If `NULL` (default), a private dispatch group is used.
- */
-@property (nonatomic, strong, nullable) dispatch_group_t completionGroup;
-
-///---------------------------------
-/// @name Working Around System Bugs
-///---------------------------------
-
-/**
- Whether to attempt to retry creation of upload tasks for background sessions when initial call returns `nil`. `NO` by default.
-
- @bug As of iOS 7.0, there is a bug where upload tasks created for background tasks are sometimes `nil`. As a workaround, if this property is `YES`, AFNetworking will follow Apple's recommendation to try creating the task again.
-
- @see https://github.com/AFNetworking/AFNetworking/issues/1675
- */
-@property (nonatomic, assign) BOOL attemptsToRecreateUploadTasksForBackgroundSessions;
-
-///---------------------
-/// @name Initialization
-///---------------------
-
-/**
- Creates and returns a manager for a session created with the specified configuration. This is the designated initializer.
-
- @param configuration The configuration used to create the managed session.
-
- @return A manager for a newly-created session.
- */
-- (instancetype)initWithSessionConfiguration:(nullable NSURLSessionConfiguration *)configuration NS_DESIGNATED_INITIALIZER;
-
-/**
- Invalidates the managed session, optionally canceling pending tasks.
-
- @param cancelPendingTasks Whether or not to cancel pending tasks.
- */
-- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks;
-
-///-------------------------
-/// @name Running Data Tasks
-///-------------------------
-
-/**
- Creates an `NSURLSessionDataTask` with the specified request.
-
- @param request The HTTP request for the request.
- @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
- */
-- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
- completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
-
-/**
- Creates an `NSURLSessionDataTask` with the specified request.
-
- @param request The HTTP request for the request.
- @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
- @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
- @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
- */
-- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
- uploadProgress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
- downloadProgress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
- completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
-
-///---------------------------
-/// @name Running Upload Tasks
-///---------------------------
-
-/**
- Creates an `NSURLSessionUploadTask` with the specified request for a local file.
-
- @param request The HTTP request for the request.
- @param fileURL A URL to the local file to be uploaded.
- @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
- @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
-
- @see `attemptsToRecreateUploadTasksForBackgroundSessions`
- */
-- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
- fromFile:(NSURL *)fileURL
- progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
- completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
-
-/**
- Creates an `NSURLSessionUploadTask` with the specified request for an HTTP body.
-
- @param request The HTTP request for the request.
- @param bodyData A data object containing the HTTP body to be uploaded.
- @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
- @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
- */
-- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
- fromData:(nullable NSData *)bodyData
- progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
- completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
-
-/**
- Creates an `NSURLSessionUploadTask` with the specified streaming request.
-
- @param request The HTTP request for the request.
- @param uploadProgressBlock A block object to be executed when the upload progress is updated. Note this block is called on the session queue, not the main queue.
- @param completionHandler A block object to be executed when the task finishes. This block has no return value and takes three arguments: the server response, the response object created by that serializer, and the error that occurred, if any.
- */
-- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request
- progress:(nullable void (^)(NSProgress *uploadProgress))uploadProgressBlock
- completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler;
-
-///-----------------------------
-/// @name Running Download Tasks
-///-----------------------------
-
-/**
- Creates an `NSURLSessionDownloadTask` with the specified request.
-
- @param request The HTTP request for the request.
- @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
- @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
- @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
-
- @warning If using a background `NSURLSessionConfiguration` on iOS, these blocks will be lost when the app is terminated. Background sessions may prefer to use `-setDownloadTaskDidFinishDownloadingBlock:` to specify the URL for saving the downloaded file, rather than the destination block of this method.
- */
-- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request
- progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
- destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
- completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler;
-
-/**
- Creates an `NSURLSessionDownloadTask` with the specified resume data.
-
- @param resumeData The data used to resume downloading.
- @param downloadProgressBlock A block object to be executed when the download progress is updated. Note this block is called on the session queue, not the main queue.
- @param destination A block object to be executed in order to determine the destination of the downloaded file. This block takes two arguments, the target path & the server response, and returns the desired file URL of the resulting download. The temporary file used during the download will be automatically deleted after being moved to the returned URL.
- @param completionHandler A block to be executed when a task finishes. This block has no return value and takes three arguments: the server response, the path of the downloaded file, and the error describing the network or parsing error that occurred, if any.
- */
-- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData
- progress:(nullable void (^)(NSProgress *downloadProgress))downloadProgressBlock
- destination:(nullable NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
- completionHandler:(nullable void (^)(NSURLResponse *response, NSURL * _Nullable filePath, NSError * _Nullable error))completionHandler;
-
-///---------------------------------
-/// @name Getting Progress for Tasks
-///---------------------------------
-
-/**
- Returns the upload progress of the specified task.
-
- @param task The session task. Must not be `nil`.
-
- @return An `NSProgress` object reporting the upload progress of a task, or `nil` if the progress is unavailable.
- */
-- (nullable NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task;
-
-/**
- Returns the download progress of the specified task.
-
- @param task The session task. Must not be `nil`.
-
- @return An `NSProgress` object reporting the download progress of a task, or `nil` if the progress is unavailable.
- */
-- (nullable NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task;
-
-///-----------------------------------------
-/// @name Setting Session Delegate Callbacks
-///-----------------------------------------
-
-/**
- Sets a block to be executed when the managed session becomes invalid, as handled by the `NSURLSessionDelegate` method `URLSession:didBecomeInvalidWithError:`.
-
- @param block A block object to be executed when the managed session becomes invalid. The block has no return value, and takes two arguments: the session, and the error related to the cause of invalidation.
- */
-- (void)setSessionDidBecomeInvalidBlock:(nullable void (^)(NSURLSession *session, NSError *error))block;
-
-/**
- Sets a block to be executed when a connection level authentication challenge has occurred, as handled by the `NSURLSessionDelegate` method `URLSession:didReceiveChallenge:completionHandler:`.
-
- @param block A block object to be executed when a connection level authentication challenge has occurred. The block returns the disposition of the authentication challenge, and takes three arguments: the session, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.
- */
-- (void)setSessionDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block;
-
-///--------------------------------------
-/// @name Setting Task Delegate Callbacks
-///--------------------------------------
-
-/**
- Sets a block to be executed when a task requires a new request body stream to send to the remote server, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:needNewBodyStream:`.
-
- @param block A block object to be executed when a task requires a new request body stream.
- */
-- (void)setTaskNeedNewBodyStreamBlock:(nullable NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block;
-
-/**
- Sets a block to be executed when an HTTP request is attempting to perform a redirection to a different URL, as handled by the `NSURLSessionTaskDelegate` method `URLSession:willPerformHTTPRedirection:newRequest:completionHandler:`.
-
- @param block A block object to be executed when an HTTP request is attempting to perform a redirection to a different URL. The block returns the request to be made for the redirection, and takes four arguments: the session, the task, the redirection response, and the request corresponding to the redirection response.
- */
-- (void)setTaskWillPerformHTTPRedirectionBlock:(nullable NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block;
-
-/**
- Sets a block to be executed when a session task has received a request specific authentication challenge, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didReceiveChallenge:completionHandler:`.
-
- @param block A block object to be executed when a session task has received a request specific authentication challenge. The block returns the disposition of the authentication challenge, and takes four arguments: the session, the task, the authentication challenge, and a pointer to the credential that should be used to resolve the challenge.
- */
-- (void)setTaskDidReceiveAuthenticationChallengeBlock:(nullable NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * _Nullable __autoreleasing * _Nullable credential))block;
-
-/**
- Sets a block to be executed periodically to track upload progress, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:`.
-
- @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes five arguments: the session, the task, the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread.
- */
-- (void)setTaskDidSendBodyDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block;
-
-/**
- Sets a block to be executed as the last message related to a specific task, as handled by the `NSURLSessionTaskDelegate` method `URLSession:task:didCompleteWithError:`.
-
- @param block A block object to be executed when a session task is completed. The block has no return value, and takes three arguments: the session, the task, and any error that occurred in the process of executing the task.
- */
-- (void)setTaskDidCompleteBlock:(nullable void (^)(NSURLSession *session, NSURLSessionTask *task, NSError * _Nullable error))block;
-
-///-------------------------------------------
-/// @name Setting Data Task Delegate Callbacks
-///-------------------------------------------
-
-/**
- Sets a block to be executed when a data task has received a response, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveResponse:completionHandler:`.
-
- @param block A block object to be executed when a data task has received a response. The block returns the disposition of the session response, and takes three arguments: the session, the data task, and the received response.
- */
-- (void)setDataTaskDidReceiveResponseBlock:(nullable NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block;
-
-/**
- Sets a block to be executed when a data task has become a download task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didBecomeDownloadTask:`.
-
- @param block A block object to be executed when a data task has become a download task. The block has no return value, and takes three arguments: the session, the data task, and the download task it has become.
- */
-- (void)setDataTaskDidBecomeDownloadTaskBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block;
-
-/**
- Sets a block to be executed when a data task receives data, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:didReceiveData:`.
-
- @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the session, the data task, and the data received. This block may be called multiple times, and will execute on the session manager operation queue.
- */
-- (void)setDataTaskDidReceiveDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block;
-
-/**
- Sets a block to be executed to determine the caching behavior of a data task, as handled by the `NSURLSessionDataDelegate` method `URLSession:dataTask:willCacheResponse:completionHandler:`.
-
- @param block A block object to be executed to determine the caching behavior of a data task. The block returns the response to cache, and takes three arguments: the session, the data task, and the proposed cached URL response.
- */
-- (void)setDataTaskWillCacheResponseBlock:(nullable NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block;
-
-/**
- Sets a block to be executed once all messages enqueued for a session have been delivered, as handled by the `NSURLSessionDataDelegate` method `URLSessionDidFinishEventsForBackgroundURLSession:`.
-
- @param block A block object to be executed once all messages enqueued for a session have been delivered. The block has no return value and takes a single argument: the session.
- */
-- (void)setDidFinishEventsForBackgroundURLSessionBlock:(nullable void (^)(NSURLSession *session))block;
-
-///-----------------------------------------------
-/// @name Setting Download Task Delegate Callbacks
-///-----------------------------------------------
-
-/**
- Sets a block to be executed when a download task has completed a download, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didFinishDownloadingToURL:`.
-
- @param block A block object to be executed when a download task has completed. The block returns the URL the download should be moved to, and takes three arguments: the session, the download task, and the temporary location of the downloaded file. If the file manager encounters an error while attempting to move the temporary file to the destination, an `AFURLSessionDownloadTaskDidFailToMoveFileNotification` will be posted, with the download task as its object, and the user info of the error.
- */
-- (void)setDownloadTaskDidFinishDownloadingBlock:(nullable NSURL * _Nullable (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block;
-
-/**
- Sets a block to be executed periodically to track download progress, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite:`.
-
- @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes five arguments: the session, the download task, the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the session manager operation queue.
- */
-- (void)setDownloadTaskDidWriteDataBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block;
-
-/**
- Sets a block to be executed when a download task has been resumed, as handled by the `NSURLSessionDownloadDelegate` method `URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:`.
-
- @param block A block object to be executed when a download task has been resumed. The block has no return value and takes four arguments: the session, the download task, the file offset of the resumed download, and the total number of bytes expected to be downloaded.
- */
-- (void)setDownloadTaskDidResumeBlock:(nullable void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block;
-
-@end
-
-///--------------------
-/// @name Notifications
-///--------------------
-
-/**
- Posted when a task resumes.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidResumeNotification;
-
-/**
- Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteNotification;
-
-/**
- Posted when a task suspends its execution.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidSuspendNotification;
-
-/**
- Posted when a session is invalidated.
- */
-FOUNDATION_EXPORT NSString * const AFURLSessionDidInvalidateNotification;
-
-/**
- Posted when a session download task encountered an error when moving the temporary download file to a specified destination.
- */
-FOUNDATION_EXPORT NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification;
-
-/**
- The raw response data of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if response data exists for the task.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseDataKey;
-
-/**
- The serialized response object of the task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the response was serialized.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey;
-
-/**
- The response serializer used to serialize the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if the task has an associated response serializer.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey;
-
-/**
- The file path associated with the download task. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an the response data has been stored directly to disk.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteAssetPathKey;
-
-/**
- Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the `AFNetworkingTaskDidCompleteNotification` if an error exists.
- */
-FOUNDATION_EXPORT NSString * const AFNetworkingTaskDidCompleteErrorKey;
-
-NS_ASSUME_NONNULL_END
diff --git a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.m b/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.m
deleted file mode 100755
index 4c426893b..000000000
--- a/iOSClient/Library/OCCommunicationLib/ExternalLibs/AFNetworking/AFURLSessionManager.m
+++ /dev/null
@@ -1,1247 +0,0 @@
-// AFURLSessionManager.m
-// Copyright (c) 2011–2016 Alamofire Software Foundation ( http://alamofire.org/ )
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-#import "AFURLSessionManager.h"
-#import <objc/runtime.h>
-
-#ifndef NSFoundationVersionNumber_iOS_8_0
-#define NSFoundationVersionNumber_With_Fixed_5871104061079552_bug 1140.11
-#else
-#define NSFoundationVersionNumber_With_Fixed_5871104061079552_bug NSFoundationVersionNumber_iOS_8_0
-#endif
-
-static dispatch_queue_t url_session_manager_creation_queue() {
- static dispatch_queue_t af_url_session_manager_creation_queue;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- af_url_session_manager_creation_queue = dispatch_queue_create("com.alamofire.networking.session.manager.creation", DISPATCH_QUEUE_SERIAL);
- });
-
- return af_url_session_manager_creation_queue;
-}
-
-static void url_session_manager_create_task_safely(dispatch_block_t block) {
- if (NSFoundationVersionNumber < NSFoundationVersionNumber_With_Fixed_5871104061079552_bug) {
- // Fix of bug
- // Open Radar:http://openradar.appspot.com/radar?id=5871104061079552 (status: Fixed in iOS8)
- // Issue about:https://github.com/AFNetworking/AFNetworking/issues/2093
- dispatch_sync(url_session_manager_creation_queue(), block);
- } else {
- block();
- }
-}
-
-static dispatch_queue_t url_session_manager_processing_queue() {
- static dispatch_queue_t af_url_session_manager_processing_queue;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- af_url_session_manager_processing_queue = dispatch_queue_create("com.alamofire.networking.session.manager.processing", DISPATCH_QUEUE_CONCURRENT);
- });
-
- return af_url_session_manager_processing_queue;
-}
-
-static dispatch_group_t url_session_manager_completion_group() {
- static dispatch_group_t af_url_session_manager_completion_group;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- af_url_session_manager_completion_group = dispatch_group_create();
- });
-
- return af_url_session_manager_completion_group;
-}
-
-NSString * const AFNetworkingTaskDidResumeNotification = @"com.alamofire.networking.task.resume";
-NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete";
-NSString * const AFNetworkingTaskDidSuspendNotification = @"com.alamofire.networking.task.suspend";
-NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate";
-NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @"com.alamofire.networking.session.download.file-manager-error";
-
-NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse";
-NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer";
-NSString * const AFNetworkingTaskDidCompleteResponseDataKey = @"com.alamofire.networking.complete.finish.responsedata";
-NSString * const AFNetworkingTaskDidCompleteErrorKey = @"com.alamofire.networking.task.complete.error";
-NSString * const AFNetworkingTaskDidCompleteAssetPathKey = @"com.alamofire.networking.task.complete.assetpath";
-
-static NSString * const AFURLSessionManagerLockName = @"com.alamofire.networking.session.manager.lock";
-
-static NSUInteger const AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask = 3;
-
-static void * AFTaskStateChangedContext = &AFTaskStateChangedContext;
-
-typedef void (^AFURLSessionDidBecomeInvalidBlock)(NSURLSession *session, NSError *error);
-typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);
-
-typedef NSURLRequest * (^AFURLSessionTaskWillPerformHTTPRedirectionBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request);
-typedef NSURLSessionAuthChallengeDisposition (^AFURLSessionTaskDidReceiveAuthenticationChallengeBlock)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential);
-typedef void (^AFURLSessionDidFinishEventsForBackgroundURLSessionBlock)(NSURLSession *session);
-
-typedef NSInputStream * (^AFURLSessionTaskNeedNewBodyStreamBlock)(NSURLSession *session, NSURLSessionTask *task);
-typedef void (^AFURLSessionTaskDidSendBodyDataBlock)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend);
-typedef void (^AFURLSessionTaskDidCompleteBlock)(NSURLSession *session, NSURLSessionTask *task, NSError *error);
-
-typedef NSURLSessionResponseDisposition (^AFURLSessionDataTaskDidReceiveResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response);
-typedef void (^AFURLSessionDataTaskDidBecomeDownloadTaskBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask);
-typedef void (^AFURLSessionDataTaskDidReceiveDataBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data);
-typedef NSCachedURLResponse * (^AFURLSessionDataTaskWillCacheResponseBlock)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse);
-
-typedef NSURL * (^AFURLSessionDownloadTaskDidFinishDownloadingBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location);
-typedef void (^AFURLSessionDownloadTaskDidWriteDataBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite);
-typedef void (^AFURLSessionDownloadTaskDidResumeBlock)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes);
-typedef void (^AFURLSessionTaskProgressBlock)(NSProgress *);
-
-typedef void (^AFURLSessionTaskCompletionHandler)(NSURLResponse *response, id responseObject, NSError *error);
-
-
-#pragma mark -
-
-@interface AFURLSessionManagerTaskDelegate : NSObject <NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate>
-@property (nonatomic, weak) AFURLSessionManager *manager;
-@property (nonatomic, strong) NSMutableData *mutableData;
-@property (nonatomic, strong) NSProgress *uploadProgress;
-@property (nonatomic, strong) NSProgress *downloadProgress;
-@property (nonatomic, copy) NSURL *downloadFileURL;
-@property (nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading;
-@property (nonatomic, copy) AFURLSessionTaskProgressBlock uploadProgressBlock;
-@property (nonatomic, copy) AFURLSessionTaskProgressBlock downloadProgressBlock;
-@property (nonatomic, copy) AFURLSessionTaskCompletionHandler completionHandler;
-@end
-
-@implementation AFURLSessionManagerTaskDelegate
-
-- (instancetype)init {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- self.mutableData = [NSMutableData data];
- self.uploadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
- self.uploadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;
-
- self.downloadProgress = [[NSProgress alloc] initWithParent:nil userInfo:nil];
- self.downloadProgress.totalUnitCount = NSURLSessionTransferSizeUnknown;
- return self;
-}
-
-#pragma mark - NSProgress Tracking
-
-- (void)setupProgressForTask:(NSURLSessionTask *)task {
- __weak __typeof__(task) weakTask = task;
-
- self.uploadProgress.totalUnitCount = task.countOfBytesExpectedToSend;
- self.downloadProgress.totalUnitCount = task.countOfBytesExpectedToReceive;
- [self.uploadProgress setCancellable:YES];
- [self.uploadProgress setCancellationHandler:^{
- __typeof__(weakTask) strongTask = weakTask;
- [strongTask cancel];
- }];
- [self.uploadProgress setPausable:YES];
- [self.uploadProgress setPausingHandler:^{
- __typeof__(weakTask) strongTask = weakTask;
- [strongTask suspend];
- }];
- if ([self.uploadProgress respondsToSelector:@selector(setResumingHandler:)]) {
- [self.uploadProgress setResumingHandler:^{
- __typeof__(weakTask) strongTask = weakTask;
- [strongTask resume];
- }];
- }
-
- [self.downloadProgress setCancellable:YES];
- [self.downloadProgress setCancellationHandler:^{
- __typeof__(weakTask) strongTask = weakTask;
- [strongTask cancel];
- }];
- [self.downloadProgress setPausable:YES];
- [self.downloadProgress setPausingHandler:^{
- __typeof__(weakTask) strongTask = weakTask;
- [strongTask suspend];
- }];
-
- if ([self.downloadProgress respondsToSelector:@selector(setResumingHandler:)]) {
- [self.downloadProgress setResumingHandler:^{
- __typeof__(weakTask) strongTask = weakTask;
- [strongTask resume];
- }];
- }
-
- [task addObserver:self
- forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))
- options:NSKeyValueObservingOptionNew
- context:NULL];
- [task addObserver:self
- forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))
- options:NSKeyValueObservingOptionNew
- context:NULL];
-
- [task addObserver:self
- forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))
- options:NSKeyValueObservingOptionNew
- context:NULL];
- [task addObserver:self
- forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToSend))
- options:NSKeyValueObservingOptionNew
- context:NULL];
-
- [self.downloadProgress addObserver:self
- forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
- options:NSKeyValueObservingOptionNew
- context:NULL];
- [self.uploadProgress addObserver:self
- forKeyPath:NSStringFromSelector(@selector(fractionCompleted))
- options:NSKeyValueObservingOptionNew
- context:NULL];
-}
-
-- (void)cleanUpProgressForTask:(NSURLSessionTask *)task {
- [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesReceived))];
- [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))];
- [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesSent))];
- [task removeObserver:self forKeyPath:NSStringFromSelector(@selector(countOfBytesExpectedToSend))];
- [self.downloadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
- [self.uploadProgress removeObserver:self forKeyPath:NSStringFromSelector(@selector(fractionCompleted))];
-}
-
-- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
- if ([object isKindOfClass:[NSURLSessionTask class]] || [object isKindOfClass:[NSURLSessionDownloadTask class]]) {
- if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesReceived))]) {
- self.downloadProgress.completedUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
- } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToReceive))]) {
- self.downloadProgress.totalUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
- } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesSent))]) {
- self.uploadProgress.completedUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
- } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(countOfBytesExpectedToSend))]) {
- self.uploadProgress.totalUnitCount = [change[NSKeyValueChangeNewKey] longLongValue];
- }
- }
- else if ([object isEqual:self.downloadProgress]) {
- if (self.downloadProgressBlock) {
- self.downloadProgressBlock(object);
- }
- }
- else if ([object isEqual:self.uploadProgress]) {
- if (self.uploadProgressBlock) {
- self.uploadProgressBlock(object);
- }
- }
-}
-
-#pragma mark - NSURLSessionTaskDelegate
-
-- (void)URLSession:(__unused NSURLSession *)session
- task:(NSURLSessionTask *)task
-didCompleteWithError:(NSError *)error
-{
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wgnu"
- __strong AFURLSessionManager *manager = self.manager;
-
- __block id responseObject = nil;
-
- __block NSMutableDictionary *userInfo = [NSMutableDictionary dictionary];
- userInfo[AFNetworkingTaskDidCompleteResponseSerializerKey] = manager.responseSerializer;
-
- //Performance Improvement from #2672
- NSData *data = nil;
- if (self.mutableData) {
- data = [self.mutableData copy];
- //We no longer need the reference, so nil it out to gain back some memory.
- self.mutableData = nil;
- }
-
- if (self.downloadFileURL) {
- userInfo[AFNetworkingTaskDidCompleteAssetPathKey] = self.downloadFileURL;
- } else if (data) {
- userInfo[AFNetworkingTaskDidCompleteResponseDataKey] = data;
- }
-
- if (error) {
- userInfo[AFNetworkingTaskDidCompleteErrorKey] = error;
-
- dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{
- if (self.completionHandler) {
- self.completionHandler(task.response, responseObject, error);
- }
-
- dispatch_async(dispatch_get_main_queue(), ^{
- [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo];
- });
- });
- } else {
- dispatch_async(url_session_manager_processing_queue(), ^{
- NSError *serializationError = nil;
- responseObject = [manager.responseSerializer responseObjectForResponse:task.response data:data error:&serializationError];
-
- if (self.downloadFileURL) {
- responseObject = self.downloadFileURL;
- }
-
- if (responseObject) {
- userInfo[AFNetworkingTaskDidCompleteSerializedResponseKey] = responseObject;
- }
-
- if (serializationError) {
- userInfo[AFNetworkingTaskDidCompleteErrorKey] = serializationError;
- }
-
- dispatch_group_async(manager.completionGroup ?: url_session_manager_completion_group(), manager.completionQueue ?: dispatch_get_main_queue(), ^{
- if (self.completionHandler) {
- self.completionHandler(task.response, responseObject, serializationError);
- }
-
- dispatch_async(dispatch_get_main_queue(), ^{
- [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidCompleteNotification object:task userInfo:userInfo];
- });
- });
- });
- }
-#pragma clang diagnostic pop
-}
-
-#pragma mark - NSURLSessionDataTaskDelegate
-
-- (void)URLSession:(__unused NSURLSession *)session
- dataTask:(__unused NSURLSessionDataTask *)dataTask
- didReceiveData:(NSData *)data
-{
- [self.mutableData appendData:data];
-}
-
-#pragma mark - NSURLSessionDownloadTaskDelegate
-
-- (void)URLSession:(NSURLSession *)session
- downloadTask:(NSURLSessionDownloadTask *)downloadTask
-didFinishDownloadingToURL:(NSURL *)location
-{
- NSError *fileManagerError = nil;
- self.downloadFileURL = nil;
-
- if (self.downloadTaskDidFinishDownloading) {
- self.downloadFileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);
- if (self.downloadFileURL) {
- [[NSFileManager defaultManager] removeItemAtPath:self.downloadFileURL.path error:nil];
- [[NSFileManager defaultManager] moveItemAtURL:location toURL:self.downloadFileURL error:&fileManagerError];
-
- if (fileManagerError) {
- [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:fileManagerError.userInfo];
- }
- }
- }
-}
-
-@end
-
-#pragma mark -
-
-/**
- * A workaround for issues related to key-value observing the `state` of an `NSURLSessionTask`.
- *
- * See:
- * - https://github.com/AFNetworking/AFNetworking/issues/1477
- * - https://github.com/AFNetworking/AFNetworking/issues/2638
- * - https://github.com/AFNetworking/AFNetworking/pull/2702
- */
-
-static inline void af_swizzleSelector(Class theClass, SEL originalSelector, SEL swizzledSelector) {
- Method originalMethod = class_getInstanceMethod(theClass, originalSelector);
- Method swizzledMethod = class_getInstanceMethod(theClass, swizzledSelector);
- method_exchangeImplementations(originalMethod, swizzledMethod);
-}
-
-static inline BOOL af_addMethod(Class theClass, SEL selector, Method method) {
- return class_addMethod(theClass, selector, method_getImplementation(method), method_getTypeEncoding(method));
-}
-
-static NSString * const AFNSURLSessionTaskDidResumeNotification = @"com.alamofire.networking.nsurlsessiontask.resume";
-static NSString * const AFNSURLSessionTaskDidSuspendNotification = @"com.alamofire.networking.nsurlsessiontask.suspend";
-
-@interface _AFURLSessionTaskSwizzling : NSObject
-
-@end
-
-@implementation _AFURLSessionTaskSwizzling
-
-+ (void)load {
- /**
- WARNING: Trouble Ahead
- https://github.com/AFNetworking/AFNetworking/pull/2702
- */
-
- if (NSClassFromString(@"NSURLSessionTask")) {
- /**
- iOS 7 and iOS 8 differ in NSURLSessionTask implementation, which makes the next bit of code a bit tricky.
- Many Unit Tests have been built to validate as much of this behavior has possible.
- Here is what we know:
- - NSURLSessionTasks are implemented with class clusters, meaning the class you request from the API isn't actually the type of class you will get back.
- - Simply referencing `[NSURLSessionTask class]` will not work. You need to ask an `NSURLSession` to actually create an object, and grab the class from there.
- - On iOS 7, `localDataTask` is a `__NSCFLocalDataTask`, which inherits from `__NSCFLocalSessionTask`, which inherits from `__NSCFURLSessionTask`.
- - On iOS 8, `localDataTask` is a `__NSCFLocalDataTask`, which inherits from `__NSCFLocalSessionTask`, which inherits from `NSURLSessionTask`.
- - On iOS 7, `__NSCFLocalSessionTask` and `__NSCFURLSessionTask` are the only two classes that have their own implementations of `resume` and `suspend`, and `__NSCFLocalSessionTask` DOES NOT CALL SUPER. This means both classes need to be swizzled.
- - On iOS 8, `NSURLSessionTask` is the only class that implements `resume` and `suspend`. This means this is the only class that needs to be swizzled.
- - Because `NSURLSessionTask` is not involved in the class hierarchy for every version of iOS, its easier to add the swizzled methods to a dummy class and manage them there.
-
- Some Assumptions:
- - No implementations of `resume` or `suspend` call super. If this were to change in a future version of iOS, we'd need to handle it.
- - No background task classes override `resume` or `suspend`
-
- The current solution:
- 1) Grab an instance of `__NSCFLocalDataTask` by asking an instance of `NSURLSession` for a data task.
- 2) Grab a pointer to the original implementation of `af_resume`
- 3) Check to see if the current class has an implementation of resume. If so, continue to step 4.
- 4) Grab the super class of the current class.
- 5) Grab a pointer for the current class to the current implementation of `resume`.
- 6) Grab a pointer for the super class to the current implementation of `resume`.
- 7) If the current class implementation of `resume` is not equal to the super class implementation of `resume` AND the current implementation of `resume` is not equal to the original implementation of `af_resume`, THEN swizzle the methods
- 8) Set the current class to the super class, and repeat steps 3-8
- */
- NSURLSessionConfiguration *configuration = [NSURLSessionConfiguration ephemeralSessionConfiguration];
- NSURLSession * session = [NSURLSession sessionWithConfiguration:configuration];
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wnonnull"
- NSURLSessionDataTask *localDataTask = [session dataTaskWithURL:nil];
-#pragma clang diagnostic pop
- IMP originalAFResumeIMP = method_getImplementation(class_getInstanceMethod([self class], @selector(af_resume)));
- Class currentClass = [localDataTask class];
-
- while (class_getInstanceMethod(currentClass, @selector(resume))) {
- Class superClass = [currentClass superclass];
- IMP classResumeIMP = method_getImplementation(class_getInstanceMethod(currentClass, @selector(resume)));
- IMP superclassResumeIMP = method_getImplementation(class_getInstanceMethod(superClass, @selector(resume)));
- if (classResumeIMP != superclassResumeIMP &&
- originalAFResumeIMP != classResumeIMP) {
- [self swizzleResumeAndSuspendMethodForClass:currentClass];
- }
- currentClass = [currentClass superclass];
- }
-
- [localDataTask cancel];
- [session finishTasksAndInvalidate];
- }
-}
-
-+ (void)swizzleResumeAndSuspendMethodForClass:(Class)theClass {
- Method afResumeMethod = class_getInstanceMethod(self, @selector(af_resume));
- Method afSuspendMethod = class_getInstanceMethod(self, @selector(af_suspend));
-
- if (af_addMethod(theClass, @selector(af_resume), afResumeMethod)) {
- af_swizzleSelector(theClass, @selector(resume), @selector(af_resume));
- }
-
- if (af_addMethod(theClass, @selector(af_suspend), afSuspendMethod)) {
- af_swizzleSelector(theClass, @selector(suspend), @selector(af_suspend));
- }
-}
-
-- (NSURLSessionTaskState)state {
- NSAssert(NO, @"State method should never be called in the actual dummy class");
- return NSURLSessionTaskStateCanceling;
-}
-
-- (void)af_resume {
- NSAssert([self respondsToSelector:@selector(state)], @"Does not respond to state");
- NSURLSessionTaskState state = [self state];
- [self af_resume];
-
- if (state != NSURLSessionTaskStateRunning) {
- [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidResumeNotification object:self];
- }
-}
-
-- (void)af_suspend {
- NSAssert([self respondsToSelector:@selector(state)], @"Does not respond to state");
- NSURLSessionTaskState state = [self state];
- [self af_suspend];
-
- if (state != NSURLSessionTaskStateSuspended) {
- [[NSNotificationCenter defaultCenter] postNotificationName:AFNSURLSessionTaskDidSuspendNotification object:self];
- }
-}
-@end
-
-#pragma mark -
-
-@interface AFURLSessionManager ()
-@property (readwrite, nonatomic, strong) NSURLSessionConfiguration *sessionConfiguration;
-@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue;
-@property (readwrite, nonatomic, strong) NSURLSession *session;
-@property (readwrite, nonatomic, strong) NSMutableDictionary *mutableTaskDelegatesKeyedByTaskIdentifier;
-@property (readonly, nonatomic, copy) NSString *taskDescriptionForSessionTasks;
-@property (readwrite, nonatomic, strong) NSLock *lock;
-@property (readwrite, nonatomic, copy) AFURLSessionDidBecomeInvalidBlock sessionDidBecomeInvalid;
-@property (readwrite, nonatomic, copy) AFURLSessionDidReceiveAuthenticationChallengeBlock sessionDidReceiveAuthenticationChallenge;
-@property (readwrite, nonatomic, copy) AFURLSessionDidFinishEventsForBackgroundURLSessionBlock didFinishEventsForBackgroundURLSession;
-@property (readwrite, nonatomic, copy) AFURLSessionTaskWillPerformHTTPRedirectionBlock taskWillPerformHTTPRedirection;
-@property (readwrite, nonatomic, copy) AFURLSessionTaskDidReceiveAuthenticationChallengeBlock taskDidReceiveAuthenticationChallenge;
-@property (readwrite, nonatomic, copy) AFURLSessionTaskNeedNewBodyStreamBlock taskNeedNewBodyStream;
-@property (readwrite, nonatomic, copy) AFURLSessionTaskDidSendBodyDataBlock taskDidSendBodyData;
-@property (readwrite, nonatomic, copy) AFURLSessionTaskDidCompleteBlock taskDidComplete;
-@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveResponseBlock dataTaskDidReceiveResponse;
-@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidBecomeDownloadTaskBlock dataTaskDidBecomeDownloadTask;
-@property (readwrite, nonatomic, copy) AFURLSessionDataTaskDidReceiveDataBlock dataTaskDidReceiveData;
-@property (readwrite, nonatomic, copy) AFURLSessionDataTaskWillCacheResponseBlock dataTaskWillCacheResponse;
-@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidFinishDownloadingBlock downloadTaskDidFinishDownloading;
-@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidWriteDataBlock downloadTaskDidWriteData;
-@property (readwrite, nonatomic, copy) AFURLSessionDownloadTaskDidResumeBlock downloadTaskDidResume;
-@end
-
-@implementation AFURLSessionManager
-
-- (instancetype)init {
- return [self initWithSessionConfiguration:nil];
-}
-
-- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration {
- self = [super init];
- if (!self) {
- return nil;
- }
-
- if (!configuration) {
- configuration = [NSURLSessionConfiguration defaultSessionConfiguration];
- }
-
- self.sessionConfiguration = configuration;
-
- self.operationQueue = [[NSOperationQueue alloc] init];
- self.operationQueue.maxConcurrentOperationCount = 1;
-
- self.session = [NSURLSession sessionWithConfiguration:self.sessionConfiguration delegate:self delegateQueue:self.operationQueue];
-
- self.responseSerializer = [AFJSONResponseSerializer serializer];
-
- self.securityPolicy = [AFSecurityPolicy defaultPolicy];
-
-#if !TARGET_OS_WATCH
- self.reachabilityManager = [AFNetworkReachabilityManager sharedManager];
-#endif
-
- self.mutableTaskDelegatesKeyedByTaskIdentifier = [[NSMutableDictionary alloc] init];
-
- self.lock = [[NSLock alloc] init];
- self.lock.name = AFURLSessionManagerLockName;
-
- [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) {
- for (NSURLSessionDataTask *task in dataTasks) {
- [self addDelegateForDataTask:task uploadProgress:nil downloadProgress:nil completionHandler:nil];
- }
-
- for (NSURLSessionUploadTask *uploadTask in uploadTasks) {
- [self addDelegateForUploadTask:uploadTask progress:nil completionHandler:nil];
- }
-
- for (NSURLSessionDownloadTask *downloadTask in downloadTasks) {
- [self addDelegateForDownloadTask:downloadTask progress:nil destination:nil completionHandler:nil];
- }
- }];
-
- return self;
-}
-
-- (void)dealloc {
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-}
-
-#pragma mark -
-
-- (NSString *)taskDescriptionForSessionTasks {
- return [NSString stringWithFormat:@"%p", self];
-}
-
-- (void)taskDidResume:(NSNotification *)notification {
- NSURLSessionTask *task = notification.object;
- if ([task respondsToSelector:@selector(taskDescription)]) {
- if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) {
- dispatch_async(dispatch_get_main_queue(), ^{
- [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidResumeNotification object:task];
- });
- }
- }
-}
-
-- (void)taskDidSuspend:(NSNotification *)notification {
- NSURLSessionTask *task = notification.object;
- if ([task respondsToSelector:@selector(taskDescription)]) {
- if ([task.taskDescription isEqualToString:self.taskDescriptionForSessionTasks]) {
- dispatch_async(dispatch_get_main_queue(), ^{
- [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingTaskDidSuspendNotification object:task];
- });
- }
- }
-}
-
-#pragma mark -
-
-- (AFURLSessionManagerTaskDelegate *)delegateForTask:(NSURLSessionTask *)task {
- NSParameterAssert(task);
-
- AFURLSessionManagerTaskDelegate *delegate = nil;
- [self.lock lock];
- delegate = self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)];
- [self.lock unlock];
-
- return delegate;
-}
-
-- (void)setDelegate:(AFURLSessionManagerTaskDelegate *)delegate
- forTask:(NSURLSessionTask *)task
-{
- NSParameterAssert(task);
- NSParameterAssert(delegate);
-
- [self.lock lock];
- self.mutableTaskDelegatesKeyedByTaskIdentifier[@(task.taskIdentifier)] = delegate;
- [delegate setupProgressForTask:task];
- [self addNotificationObserverForTask:task];
- [self.lock unlock];
-}
-
-- (void)addDelegateForDataTask:(NSURLSessionDataTask *)dataTask
- uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock
- downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock
- completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
-{
- AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
- delegate.manager = self;
- delegate.completionHandler = completionHandler;
-
- dataTask.taskDescription = self.taskDescriptionForSessionTasks;
- [self setDelegate:delegate forTask:dataTask];
-
- delegate.uploadProgressBlock = uploadProgressBlock;
- delegate.downloadProgressBlock = downloadProgressBlock;
-}
-
-- (void)addDelegateForUploadTask:(NSURLSessionUploadTask *)uploadTask
- progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
- completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
-{
- AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
- delegate.manager = self;
- delegate.completionHandler = completionHandler;
-
- uploadTask.taskDescription = self.taskDescriptionForSessionTasks;
-
- [self setDelegate:delegate forTask:uploadTask];
-
- delegate.uploadProgressBlock = uploadProgressBlock;
-}
-
-- (void)addDelegateForDownloadTask:(NSURLSessionDownloadTask *)downloadTask
- progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock
- destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
- completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
-{
- AFURLSessionManagerTaskDelegate *delegate = [[AFURLSessionManagerTaskDelegate alloc] init];
- delegate.manager = self;
- delegate.completionHandler = completionHandler;
-
- if (destination) {
- delegate.downloadTaskDidFinishDownloading = ^NSURL * (NSURLSession * __unused session, NSURLSessionDownloadTask *task, NSURL *location) {
- return destination(location, task.response);
- };
- }
-
- downloadTask.taskDescription = self.taskDescriptionForSessionTasks;
-
- [self setDelegate:delegate forTask:downloadTask];
-
- delegate.downloadProgressBlock = downloadProgressBlock;
-}
-
-- (void)removeDelegateForTask:(NSURLSessionTask *)task {
- NSParameterAssert(task);
-
- AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
- [self.lock lock];
- [delegate cleanUpProgressForTask:task];
- [self removeNotificationObserverForTask:task];
- [self.mutableTaskDelegatesKeyedByTaskIdentifier removeObjectForKey:@(task.taskIdentifier)];
- [self.lock unlock];
-}
-
-#pragma mark -
-
-- (NSArray *)tasksForKeyPath:(NSString *)keyPath {
- __block NSArray *tasks = nil;
- dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
- [self.session getTasksWithCompletionHandler:^(NSArray *dataTasks, NSArray *uploadTasks, NSArray *downloadTasks) {
- if ([keyPath isEqualToString:NSStringFromSelector(@selector(dataTasks))]) {
- tasks = dataTasks;
- } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(uploadTasks))]) {
- tasks = uploadTasks;
- } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(downloadTasks))]) {
- tasks = downloadTasks;
- } else if ([keyPath isEqualToString:NSStringFromSelector(@selector(tasks))]) {
- tasks = [@[dataTasks, uploadTasks, downloadTasks] valueForKeyPath:@"@unionOfArrays.self"];
- }
-
- dispatch_semaphore_signal(semaphore);
- }];
-
- dispatch_semaphore_wait(semaphore, DISPATCH_TIME_FOREVER);
-
- return tasks;
-}
-
-- (NSArray *)tasks {
- return [self tasksForKeyPath:NSStringFromSelector(_cmd)];
-}
-
-- (NSArray *)dataTasks {
- return [self tasksForKeyPath:NSStringFromSelector(_cmd)];
-}
-
-- (NSArray *)uploadTasks {
- return [self tasksForKeyPath:NSStringFromSelector(_cmd)];
-}
-
-- (NSArray *)downloadTasks {
- return [self tasksForKeyPath:NSStringFromSelector(_cmd)];
-}
-
-#pragma mark -
-
-- (void)invalidateSessionCancelingTasks:(BOOL)cancelPendingTasks {
- dispatch_async(dispatch_get_main_queue(), ^{
- if (cancelPendingTasks) {
- [self.session invalidateAndCancel];
- } else {
- [self.session finishTasksAndInvalidate];
- }
- });
-}
-
-#pragma mark -
-
-- (void)setResponseSerializer:(id <AFURLResponseSerialization>)responseSerializer {
- NSParameterAssert(responseSerializer);
-
- _responseSerializer = responseSerializer;
-}
-
-#pragma mark -
-- (void)addNotificationObserverForTask:(NSURLSessionTask *)task {
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidResume:) name:AFNSURLSessionTaskDidResumeNotification object:task];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(taskDidSuspend:) name:AFNSURLSessionTaskDidSuspendNotification object:task];
-}
-
-- (void)removeNotificationObserverForTask:(NSURLSessionTask *)task {
- [[NSNotificationCenter defaultCenter] removeObserver:self name:AFNSURLSessionTaskDidSuspendNotification object:task];
- [[NSNotificationCenter defaultCenter] removeObserver:self name:AFNSURLSessionTaskDidResumeNotification object:task];
-}
-
-#pragma mark -
-
-- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
- completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
-{
- return [self dataTaskWithRequest:request uploadProgress:nil downloadProgress:nil completionHandler:completionHandler];
-}
-
-- (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request
- uploadProgress:(nullable void (^)(NSProgress *uploadProgress)) uploadProgressBlock
- downloadProgress:(nullable void (^)(NSProgress *downloadProgress)) downloadProgressBlock
- completionHandler:(nullable void (^)(NSURLResponse *response, id _Nullable responseObject, NSError * _Nullable error))completionHandler {
-
- __block NSURLSessionDataTask *dataTask = nil;
- url_session_manager_create_task_safely(^{
- dataTask = [self.session dataTaskWithRequest:request];
- });
-
- [self addDelegateForDataTask:dataTask uploadProgress:uploadProgressBlock downloadProgress:downloadProgressBlock completionHandler:completionHandler];
-
- return dataTask;
-}
-
-#pragma mark -
-
-- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
- fromFile:(NSURL *)fileURL
- progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
- completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
-{
- __block NSURLSessionUploadTask *uploadTask = nil;
- url_session_manager_create_task_safely(^{
- uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
- });
-
- if (!uploadTask && self.attemptsToRecreateUploadTasksForBackgroundSessions && self.session.configuration.identifier) {
- for (NSUInteger attempts = 0; !uploadTask && attempts < AFMaximumNumberOfAttemptsToRecreateBackgroundSessionUploadTask; attempts++) {
- uploadTask = [self.session uploadTaskWithRequest:request fromFile:fileURL];
- }
- }
-
- [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
-
- return uploadTask;
-}
-
-- (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request
- fromData:(NSData *)bodyData
- progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
- completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
-{
- __block NSURLSessionUploadTask *uploadTask = nil;
- url_session_manager_create_task_safely(^{
- uploadTask = [self.session uploadTaskWithRequest:request fromData:bodyData];
- });
-
- [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
-
- return uploadTask;
-}
-
-- (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request
- progress:(void (^)(NSProgress *uploadProgress)) uploadProgressBlock
- completionHandler:(void (^)(NSURLResponse *response, id responseObject, NSError *error))completionHandler
-{
- __block NSURLSessionUploadTask *uploadTask = nil;
- url_session_manager_create_task_safely(^{
- uploadTask = [self.session uploadTaskWithStreamedRequest:request];
- });
-
- [self addDelegateForUploadTask:uploadTask progress:uploadProgressBlock completionHandler:completionHandler];
-
- return uploadTask;
-}
-
-#pragma mark -
-
-- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request
- progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock
- destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
- completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
-{
- __block NSURLSessionDownloadTask *downloadTask = nil;
- url_session_manager_create_task_safely(^{
- downloadTask = [self.session downloadTaskWithRequest:request];
- });
-
- [self addDelegateForDownloadTask:downloadTask progress:downloadProgressBlock destination:destination completionHandler:completionHandler];
-
- return downloadTask;
-}
-
-- (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData
- progress:(void (^)(NSProgress *downloadProgress)) downloadProgressBlock
- destination:(NSURL * (^)(NSURL *targetPath, NSURLResponse *response))destination
- completionHandler:(void (^)(NSURLResponse *response, NSURL *filePath, NSError *error))completionHandler
-{
- __block NSURLSessionDownloadTask *downloadTask = nil;
- url_session_manager_create_task_safely(^{
- downloadTask = [self.session downloadTaskWithResumeData:resumeData];
- });
-
- [self addDelegateForDownloadTask:downloadTask progress:downloadProgressBlock destination:destination completionHandler:completionHandler];
-
- return downloadTask;
-}
-
-#pragma mark -
-- (NSProgress *)uploadProgressForTask:(NSURLSessionTask *)task {
- return [[self delegateForTask:task] uploadProgress];
-}
-
-- (NSProgress *)downloadProgressForTask:(NSURLSessionTask *)task {
- return [[self delegateForTask:task] downloadProgress];
-}
-
-#pragma mark -
-
-- (void)setSessionDidBecomeInvalidBlock:(void (^)(NSURLSession *session, NSError *error))block {
- self.sessionDidBecomeInvalid = block;
-}
-
-- (void)setSessionDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block {
- self.sessionDidReceiveAuthenticationChallenge = block;
-}
-
-- (void)setDidFinishEventsForBackgroundURLSessionBlock:(void (^)(NSURLSession *session))block {
- self.didFinishEventsForBackgroundURLSession = block;
-}
-
-#pragma mark -
-
-- (void)setTaskNeedNewBodyStreamBlock:(NSInputStream * (^)(NSURLSession *session, NSURLSessionTask *task))block {
- self.taskNeedNewBodyStream = block;
-}
-
-- (void)setTaskWillPerformHTTPRedirectionBlock:(NSURLRequest * (^)(NSURLSession *session, NSURLSessionTask *task, NSURLResponse *response, NSURLRequest *request))block {
- self.taskWillPerformHTTPRedirection = block;
-}
-
-- (void)setTaskDidReceiveAuthenticationChallengeBlock:(NSURLSessionAuthChallengeDisposition (^)(NSURLSession *session, NSURLSessionTask *task, NSURLAuthenticationChallenge *challenge, NSURLCredential * __autoreleasing *credential))block {
- self.taskDidReceiveAuthenticationChallenge = block;
-}
-
-- (void)setTaskDidSendBodyDataBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))block {
- self.taskDidSendBodyData = block;
-}
-
-- (void)setTaskDidCompleteBlock:(void (^)(NSURLSession *session, NSURLSessionTask *task, NSError *error))block {
- self.taskDidComplete = block;
-}
-
-#pragma mark -
-
-- (void)setDataTaskDidReceiveResponseBlock:(NSURLSessionResponseDisposition (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLResponse *response))block {
- self.dataTaskDidReceiveResponse = block;
-}
-
-- (void)setDataTaskDidBecomeDownloadTaskBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSURLSessionDownloadTask *downloadTask))block {
- self.dataTaskDidBecomeDownloadTask = block;
-}
-
-- (void)setDataTaskDidReceiveDataBlock:(void (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSData *data))block {
- self.dataTaskDidReceiveData = block;
-}
-
-- (void)setDataTaskWillCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLSession *session, NSURLSessionDataTask *dataTask, NSCachedURLResponse *proposedResponse))block {
- self.dataTaskWillCacheResponse = block;
-}
-
-#pragma mark -
-
-- (void)setDownloadTaskDidFinishDownloadingBlock:(NSURL * (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location))block {
- self.downloadTaskDidFinishDownloading = block;
-}
-
-- (void)setDownloadTaskDidWriteDataBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite))block {
- self.downloadTaskDidWriteData = block;
-}
-
-- (void)setDownloadTaskDidResumeBlock:(void (^)(NSURLSession *session, NSURLSessionDownloadTask *downloadTask, int64_t fileOffset, int64_t expectedTotalBytes))block {
- self.downloadTaskDidResume = block;
-}
-
-#pragma mark - NSObject
-
-- (NSString *)description {
- return [NSString stringWithFormat:@"<%@: %p, session: %@, operationQueue: %@>", NSStringFromClass([self class]), self, self.session, self.operationQueue];
-}
-
-- (BOOL)respondsToSelector:(SEL)selector {
- if (selector == @selector(URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:)) {
- return self.taskWillPerformHTTPRedirection != nil;
- } else if (selector == @selector(URLSession:dataTask:didReceiveResponse:completionHandler:)) {
- return self.dataTaskDidReceiveResponse != nil;
- } else if (selector == @selector(URLSession:dataTask:willCacheResponse:completionHandler:)) {
- return self.dataTaskWillCacheResponse != nil;
- } else if (selector == @selector(URLSessionDidFinishEventsForBackgroundURLSession:)) {
- return self.didFinishEventsForBackgroundURLSession != nil;
- }
-
- return [[self class] instancesRespondToSelector:selector];
-}
-
-#pragma mark - NSURLSessionDelegate
-
-- (void)URLSession:(NSURLSession *)session
-didBecomeInvalidWithError:(NSError *)error
-{
- if (self.sessionDidBecomeInvalid) {
- self.sessionDidBecomeInvalid(session, error);
- }
-
- [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDidInvalidateNotification object:session];
-}
-
-- (void)URLSession:(NSURLSession *)session
-didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
- completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler
-{
- NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling;
- __block NSURLCredential *credential = nil;
-
- if (self.sessionDidReceiveAuthenticationChallenge) {
- disposition = self.sessionDidReceiveAuthenticationChallenge(session, challenge, &credential);
- } else {
- if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
- if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) {
- credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
- if (credential) {
- disposition = NSURLSessionAuthChallengeUseCredential;
- } else {
- disposition = NSURLSessionAuthChallengePerformDefaultHandling;
- }
- } else {
- disposition = NSURLSessionAuthChallengeRejectProtectionSpace;
- }
- } else {
- disposition = NSURLSessionAuthChallengePerformDefaultHandling;
- }
- }
-
- if (completionHandler) {
- completionHandler(disposition, credential);
- }
-}
-
-#pragma mark - NSURLSessionTaskDelegate
-
-- (void)URLSession:(NSURLSession *)session
- task:(NSURLSessionTask *)task
-willPerformHTTPRedirection:(NSHTTPURLResponse *)response
- newRequest:(NSURLRequest *)request
- completionHandler:(void (^)(NSURLRequest *))completionHandler
-{
- NSURLRequest *redirectRequest = request;
-
- if (self.taskWillPerformHTTPRedirection) {
- redirectRequest = self.taskWillPerformHTTPRedirection(session, task, response, request);
- }
-
- if (completionHandler) {
- completionHandler(redirectRequest);
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- task:(NSURLSessionTask *)task
-didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
- completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential))completionHandler
-{
- NSURLSessionAuthChallengeDisposition disposition = NSURLSessionAuthChallengePerformDefaultHandling;
- __block NSURLCredential *credential = nil;
-
- if (self.taskDidReceiveAuthenticationChallenge) {
- disposition = self.taskDidReceiveAuthenticationChallenge(session, task, challenge, &credential);
- } else {
- if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
- if ([self.securityPolicy evaluateServerTrust:challenge.protectionSpace.serverTrust forDomain:challenge.protectionSpace.host]) {
- disposition = NSURLSessionAuthChallengeUseCredential;
- credential = [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust];
- } else {
- disposition = NSURLSessionAuthChallengeRejectProtectionSpace;
- }
- } else {
- disposition = NSURLSessionAuthChallengePerformDefaultHandling;
- }
- }
-
- if (completionHandler) {
- completionHandler(disposition, credential);
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- task:(NSURLSessionTask *)task
- needNewBodyStream:(void (^)(NSInputStream *bodyStream))completionHandler
-{
- NSInputStream *inputStream = nil;
-
- if (self.taskNeedNewBodyStream) {
- inputStream = self.taskNeedNewBodyStream(session, task);
- } else if (task.originalRequest.HTTPBodyStream && [task.originalRequest.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) {
- inputStream = [task.originalRequest.HTTPBodyStream copy];
- }
-
- if (completionHandler) {
- completionHandler(inputStream);
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- task:(NSURLSessionTask *)task
- didSendBodyData:(int64_t)bytesSent
- totalBytesSent:(int64_t)totalBytesSent
-totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend
-{
-
- int64_t totalUnitCount = totalBytesExpectedToSend;
- if(totalUnitCount == NSURLSessionTransferSizeUnknown) {
- NSString *contentLength = [task.originalRequest valueForHTTPHeaderField:@"Content-Length"];
- if(contentLength) {
- totalUnitCount = (int64_t) [contentLength longLongValue];
- }
- }
-
- if (self.taskDidSendBodyData) {
- self.taskDidSendBodyData(session, task, bytesSent, totalBytesSent, totalUnitCount);
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- task:(NSURLSessionTask *)task
-didCompleteWithError:(NSError *)error
-{
- AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:task];
-
- // delegate may be nil when completing a task in the background
- if (delegate) {
- [delegate URLSession:session task:task didCompleteWithError:error];
-
- [self removeDelegateForTask:task];
- }
-
- if (self.taskDidComplete) {
- self.taskDidComplete(session, task, error);
- }
-}
-
-#pragma mark - NSURLSessionDataDelegate
-
-- (void)URLSession:(NSURLSession *)session
- dataTask:(NSURLSessionDataTask *)dataTask
-didReceiveResponse:(NSURLResponse *)response
- completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler
-{
- NSURLSessionResponseDisposition disposition = NSURLSessionResponseAllow;
-
- if (self.dataTaskDidReceiveResponse) {
- disposition = self.dataTaskDidReceiveResponse(session, dataTask, response);
- }
-
- if (completionHandler) {
- completionHandler(disposition);
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- dataTask:(NSURLSessionDataTask *)dataTask
-didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask
-{
- AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask];
- if (delegate) {
- [self removeDelegateForTask:dataTask];
- [self setDelegate:delegate forTask:downloadTask];
- }
-
- if (self.dataTaskDidBecomeDownloadTask) {
- self.dataTaskDidBecomeDownloadTask(session, dataTask, downloadTask);
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- dataTask:(NSURLSessionDataTask *)dataTask
- didReceiveData:(NSData *)data
-{
-
- AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:dataTask];
- [delegate URLSession:session dataTask:dataTask didReceiveData:data];
-
- if (self.dataTaskDidReceiveData) {
- self.dataTaskDidReceiveData(session, dataTask, data);
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- dataTask:(NSURLSessionDataTask *)dataTask
- willCacheResponse:(NSCachedURLResponse *)proposedResponse
- completionHandler:(void (^)(NSCachedURLResponse *cachedResponse))completionHandler
-{
- NSCachedURLResponse *cachedResponse = proposedResponse;
-
- if (self.dataTaskWillCacheResponse) {
- cachedResponse = self.dataTaskWillCacheResponse(session, dataTask, proposedResponse);
- }
-
- if (completionHandler) {
- completionHandler(cachedResponse);
- }
-}
-
-- (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session {
- if (self.didFinishEventsForBackgroundURLSession) {
- dispatch_async(dispatch_get_main_queue(), ^{
- self.didFinishEventsForBackgroundURLSession(session);
- });
- }
-}
-
-#pragma mark - NSURLSessionDownloadDelegate
-
-- (void)URLSession:(NSURLSession *)session
- downloadTask:(NSURLSessionDownloadTask *)downloadTask
-didFinishDownloadingToURL:(NSURL *)location
-{
- AFURLSessionManagerTaskDelegate *delegate = [self delegateForTask:downloadTask];
- if (self.downloadTaskDidFinishDownloading) {
- NSURL *fileURL = self.downloadTaskDidFinishDownloading(session, downloadTask, location);
- if (fileURL) {
- delegate.downloadFileURL = fileURL;
- NSError *error = nil;
- [[NSFileManager defaultManager] removeItemAtPath:fileURL.path error:nil];
- [[NSFileManager defaultManager] moveItemAtURL:location toURL:fileURL error:&error];
-
- if (error) {
- [[NSNotificationCenter defaultCenter] postNotificationName:AFURLSessionDownloadTaskDidFailToMoveFileNotification object:downloadTask userInfo:error.userInfo];
- }
-
- return;
- }
- }
-
- if (delegate) {
- [delegate URLSession:session downloadTask:downloadTask didFinishDownloadingToURL:location];
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- downloadTask:(NSURLSessionDownloadTask *)downloadTask
- didWriteData:(int64_t)bytesWritten
- totalBytesWritten:(int64_t)totalBytesWritten
-totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite
-{
- if (self.downloadTaskDidWriteData) {
- self.downloadTaskDidWriteData(session, downloadTask, bytesWritten, totalBytesWritten, totalBytesExpectedToWrite);
- }
-}
-
-- (void)URLSession:(NSURLSession *)session
- downloadTask:(NSURLSessionDownloadTask *)downloadTask
- didResumeAtOffset:(int64_t)fileOffset
-expectedTotalBytes:(int64_t)expectedTotalBytes
-{
- if (self.downloadTaskDidResume) {
- self.downloadTaskDidResume(session, downloadTask, fileOffset, expectedTotalBytes);
- }
-}
-
-#pragma mark - NSSecureCoding
-
-+ (BOOL)supportsSecureCoding {
- return YES;
-}
-
-- (instancetype)initWithCoder:(NSCoder *)decoder {
- NSURLSessionConfiguration *configuration = [decoder decodeObjectOfClass:[NSURLSessionConfiguration class] forKey:@"sessionConfiguration"];
-
- self = [self initWithSessionConfiguration:configuration];
- if (!self) {
- return nil;
- }
-
- return self;
-}
-
-- (void)encodeWithCoder:(NSCoder *)coder {
- [coder encodeObject:self.session.configuration forKey:@"sessionConfiguration"];
-}
-
-#pragma mark - NSCopying
-
-- (instancetype)copyWithZone:(NSZone *)zone {
- return [[[self class] allocWithZone:zone] initWithSessionConfiguration:self.session.configuration];
-}
-
-@end
diff --git a/iOSClient/Library/OCCommunicationLib/HCFeatures.h b/iOSClient/Library/OCCommunicationLib/HCFeatures.h
new file mode 100644
index 000000000..22e89cbee
--- /dev/null
+++ b/iOSClient/Library/OCCommunicationLib/HCFeatures.h
@@ -0,0 +1,37 @@
+//
+// HCFeatures.h
+//
+// Created by Marino Faggiana on 14/04/19.
+// Copyright © 2019 Marino Faggiana. All rights reserved.
+//
+// Author Marino Faggiana <marino.faggiana@nextcloud.com>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface HCFeatures : NSObject
+
+@property BOOL isTrial;
+@property BOOL trialExpired;
+@property double trialRemainingSec;
+@property double trialEndTime;
+@property (nonatomic, strong) NSString *trialEnd;
+@property BOOL accountRemoveExpired;
+@property double accountRemoveRemainingSec;
+@property double accountRemoveTime;
+@property (nonatomic, strong) NSString *accountRemove;
+
+@end
diff --git a/Notification Service Extension/NotificationServiceExtension-Bridging-Header.h b/iOSClient/Library/OCCommunicationLib/HCFeatures.m
index fa881e42c..c64a85939 100755..100644
--- a/Notification Service Extension/NotificationServiceExtension-Bridging-Header.h
+++ b/iOSClient/Library/OCCommunicationLib/HCFeatures.m
@@ -1,9 +1,8 @@
//
-// NotificationServiceExtension-Bridging-Header.h
-// Nextcloud
+// HCFeatures.m
//
-// Created by Marino Faggiana on 27/07/18.
-// Copyright © 2018 Marino Faggiana. All rights reserved.
+// Created by Marino Faggiana on 14/04/19.
+// Copyright © 2019 Marino Faggiana. All rights reserved.
//
// Author Marino Faggiana <marino.faggiana@nextcloud.com>
//
@@ -21,11 +20,17 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
-#import "CCUtility.h"
-#import "NCPushNotificationEncryption.h"
+#import "HCFeatures.h"
-#import "OCActivity.h"
-#import "OCUserProfile.h"
-#import "OCCapabilities.h"
-#import "OCExternalSites.h"
-#import "OCSharedDto.h"
+@implementation HCFeatures
+
+- (id)init
+{
+ self = [super init];
+
+ self.trialEnd = @"";
+ self.accountRemove = @"";
+
+ return self;
+}
+@end
diff --git a/iOSClient/Library/OCCommunicationLib/OCCommunication.h b/iOSClient/Library/OCCommunicationLib/OCCommunication.h
index 6076ae447..1499f948e 100755
--- a/iOSClient/Library/OCCommunicationLib/OCCommunication.h
+++ b/iOSClient/Library/OCCommunicationLib/OCCommunication.h
@@ -39,6 +39,7 @@
@class AFSecurityPolicy;
@class OCCapabilities;
@class OCUserProfile;
+@class HCFeatures;
@interface OCCommunication : NSObject
@@ -965,6 +966,14 @@ typedef enum {
- (void)emptyTrash:(NSString *)path onCommunication:(OCCommunication *)sharedOCCommunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest;
+#pragma mark - Third Parts
+
+- (void)getHCUserProfile:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication successRequest:(void(^)(NSHTTPURLResponse *response, OCUserProfile *userProfile, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest;
+
+- (void)putHCUserProfile:(NSString*)serverPath data:(NSString *)data onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer))successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest;
+
+- (void)getHCFeatures:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication successRequest:(void(^)(NSHTTPURLResponse *response, HCFeatures *features, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest;
+
@end
diff --git a/iOSClient/Library/OCCommunicationLib/OCCommunication.m b/iOSClient/Library/OCCommunicationLib/OCCommunication.m
index 113dc51f4..5cb4f190c 100644
--- a/iOSClient/Library/OCCommunicationLib/OCCommunication.m
+++ b/iOSClient/Library/OCCommunicationLib/OCCommunication.m
@@ -45,7 +45,6 @@
#import "OCWebDAVClient.h"
#import "OCXMLShareByLinkParser.h"
#import "OCErrorMsg.h"
-#import "AFURLSessionManager.h"
#import "OCShareUser.h"
#import "OCActivity.h"
#import "OCExternalSites.h"
@@ -55,6 +54,7 @@
#import "OCRichObjectStrings.h"
#import "OCUserProfile.h"
#import "NCRichDocumentTemplate.h"
+#import "HCFeatures.h"
@interface OCCommunication ()
@@ -3086,7 +3086,221 @@
}];
}
+#pragma mark - Third Parts
+- (void)getHCUserProfile:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication successRequest:(void(^)(NSHTTPURLResponse *response, OCUserProfile *userProfile, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest
+{
+ serverPath = [serverPath encodeString:NSUTF8StringEncoding];
+
+ OCWebDAVClient *request = [OCWebDAVClient new];
+ request = [self getRequestWithCredentials:request];
+
+ [request getHCUserProfile:serverPath onCommunication:sharedOCCommunication success:^(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response) {
+
+ NSData *responseData = (NSData*) response;
+ OCUserProfile *userProfile = [OCUserProfile new];
+
+ //Parse
+ NSError *error;
+ NSDictionary *jsongParsed = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];
+ NSLog(@"[LOG] User Profile : %@",jsongParsed);
+
+ if (jsongParsed && jsongParsed.allKeys > 0) {
+
+ NSDictionary *ocs = [jsongParsed valueForKey:@"ocs"];
+ NSDictionary *meta = [ocs valueForKey:@"meta"];
+ NSDictionary *data = [ocs valueForKey:@"data"];
+ NSInteger statusCode = [[meta valueForKey:@"statuscode"] integerValue];
+
+ data = [data valueForKey:@"data"];
+
+ if (statusCode == kOCUserProfileAPISuccessful) {
+
+ if ([data valueForKey:@"address"] && ![[data valueForKey:@"address"] isKindOfClass:[NSNull class]])
+ userProfile.address = [data valueForKey:@"address"];
+
+ if ([data valueForKey:@"displayname"] && ![[data valueForKey:@"displayname"] isKindOfClass:[NSNull class]])
+ userProfile.displayName = [data valueForKey:@"displayname"];
+
+ if ([data valueForKey:@"businesssize"] && ![[data valueForKey:@"businesssize"] isKindOfClass:[NSNull class]]) {
+ switch ([[data valueForKey:@"businesssize"] integerValue]) {
+ case 1:
+ userProfile.businessSize = @"1-4";
+ break;
+ case 5:
+ userProfile.businessSize = @"5-9";
+ break;
+ case 10:
+ userProfile.businessSize = @"10-19";
+ break;
+ case 20:
+ userProfile.businessSize = @"20-49";
+ break;
+ case 50:
+ userProfile.businessSize = @"50-99";
+ break;
+ case 100:
+ userProfile.businessSize = @"100-249";
+ break;
+ case 250:
+ userProfile.businessSize = @"250-499";
+ break;
+ case 500:
+ userProfile.businessSize = @"500-999";
+ break;
+ case 1000:
+ userProfile.businessSize = @"1000+";
+ break;
+ default:
+ break;
+ }
+ }
+
+ if ([data valueForKey:@"businesstype"] && ![[data valueForKey:@"businesstype"] isKindOfClass:[NSNull class]])
+ userProfile.businessType = [data valueForKey:@"businesstype"];
+
+ if ([data valueForKey:@"city"] && ![[data valueForKey:@"city"] isKindOfClass:[NSNull class]])
+ userProfile.city = [data valueForKey:@"city"];
+
+ if ([data valueForKey:@"company"] && ![[data valueForKey:@"company"] isKindOfClass:[NSNull class]])
+ userProfile.company = [data valueForKey:@"company"];
+
+ if ([data valueForKey:@"country"] && ![[data valueForKey:@"country"] isKindOfClass:[NSNull class]])
+ userProfile.country = [data valueForKey:@"country"];
+
+ if ([data valueForKey:@"email"] && ![[data valueForKey:@"email"] isKindOfClass:[NSNull class]])
+ userProfile.email = [data valueForKey:@"email"];
+
+ if ([data valueForKey:@"phone"] && ![[data valueForKey:@"phone"] isKindOfClass:[NSNull class]])
+ userProfile.phone = [data valueForKey:@"phone"];
+
+ if ([data valueForKey:@"role"] && ![[data valueForKey:@"role"] isKindOfClass:[NSNull class]])
+ userProfile.role = [data valueForKey:@"role"];
+
+ if ([data valueForKey:@"twitter"] && ![[data valueForKey:@"twitter"] isKindOfClass:[NSNull class]])
+ userProfile.twitter = [data valueForKey:@"twitter"];
+
+ if ([data valueForKey:@"website"] && ![[data valueForKey:@"website"] isKindOfClass:[NSNull class]])
+ userProfile.webpage = [data valueForKey:@"website"];
+
+ if ([data valueForKey:@"zip"] && ![[data valueForKey:@"zip"] isKindOfClass:[NSNull class]])
+ userProfile.zip = [data valueForKey:@"zip"];
+
+ successRequest(response, userProfile, request.redirectedServer);
+
+ } else {
+
+ NSString *message = (NSString *)[meta objectForKey:@"message"];
+ if ([message isKindOfClass:[NSNull class]]) {
+ message = NSLocalizedString(@"_server_response_error_", nil);
+ }
+ failureRequest(response, [UtilsFramework getErrorWithCode:statusCode andCustomMessageFromTheServer:message], request.redirectedServer);
+ }
+
+ } else {
+ failureRequest(response, [UtilsFramework getErrorWithCode:k_CCErrorWebdavResponseError andCustomMessageFromTheServer:NSLocalizedString(@"_server_response_error_", nil)], request.redirectedServer);
+ }
+
+ } failure:^(NSHTTPURLResponse *response, NSData *responseData, NSError *error) {
+
+ failureRequest(response, error, request.redirectedServer);
+ }];
+
+}
+
+- (void)putHCUserProfile:(NSString*)serverPath data:(NSString *)data onCommunication:(OCCommunication *)sharedOCComunication successRequest:(void(^)(NSHTTPURLResponse *response, NSString *redirectedServer))successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest {
+
+ serverPath = [serverPath encodeString:NSUTF8StringEncoding];
+
+ OCWebDAVClient *request = [[OCWebDAVClient alloc] init];
+ request = [self getRequestWithCredentials:request];
+
+ [request putHCUserProfile:serverPath data:data onCommunication:sharedOCComunication success:^(NSHTTPURLResponse *operation, id response) {
+
+ successRequest(response, request.redirectedServer);
+
+ } failure:^(NSHTTPURLResponse *response, id responseObject, NSError *error) {
+
+ failureRequest(response, error, request.redirectedServer);
+ }];
+}
+
+- (void)getHCFeatures:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication successRequest:(void(^)(NSHTTPURLResponse *response, HCFeatures *features, NSString *redirectedServer)) successRequest failureRequest:(void(^)(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer)) failureRequest
+{
+ serverPath = [serverPath encodeString:NSUTF8StringEncoding];
+
+ OCWebDAVClient *request = [OCWebDAVClient new];
+ request = [self getRequestWithCredentials:request];
+
+ [request getHCUserProfile:serverPath onCommunication:sharedOCCommunication success:^(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response) {
+
+ NSData *responseData = (NSData*) response;
+ HCFeatures *features = [HCFeatures new];
+
+ //Parse
+ NSError *error;
+ NSDictionary *jsongParsed = [NSJSONSerialization JSONObjectWithData:responseData options:NSJSONReadingMutableContainers error:&error];
+ NSLog(@"[LOG] User Profile : %@",jsongParsed);
+
+ if (jsongParsed && jsongParsed.allKeys > 0) {
+
+ NSDictionary *ocs = [jsongParsed valueForKey:@"ocs"];
+ NSDictionary *meta = [ocs valueForKey:@"meta"];
+ NSDictionary *data = [ocs valueForKey:@"data"];
+ NSInteger statusCode = [[meta valueForKey:@"statuscode"] integerValue];
+
+ data = [data valueForKey:@"data"];
+
+ if (statusCode == kOCUserProfileAPISuccessful) {
+
+ if ([data valueForKey:@"is_trial"] && ![[data valueForKey:@"is_trial"] isKindOfClass:[NSNull class]])
+ features.isTrial = [[data valueForKey:@"is_trial"] boolValue];
+
+ if ([data valueForKey:@"trial_expired"] && ![[data valueForKey:@"trial_expired"] isKindOfClass:[NSNull class]])
+ features.trialExpired = [[data valueForKey:@"trial_expired"] boolValue];
+
+ if ([data valueForKey:@"trial_remaining_sec"] && ![[data valueForKey:@"trial_remaining_sec"] isKindOfClass:[NSNull class]])
+ features.trialRemainingSec = [[data valueForKey:@"trial_remaining_sec"] integerValue];
+
+ if ([data valueForKey:@"trial_end_time"] && ![[data valueForKey:@"trial_end_time"] isKindOfClass:[NSNull class]])
+ features.trialEndTime = [[data valueForKey:@"trial_end_time"] integerValue];
+
+ if ([data valueForKey:@"trial_end"] && ![[data valueForKey:@"trial_end"] isKindOfClass:[NSNull class]])
+ features.trialEnd = [data valueForKey:@"trial_end"];
+
+ if ([data valueForKey:@"account_remove_expired"] && ![[data valueForKey:@"account_remove_expired"] isKindOfClass:[NSNull class]])
+ features.accountRemoveExpired = [[data valueForKey:@"account_remove_expired"] boolValue];
+
+ if ([data valueForKey:@"account_remove_remaining_sec"] && ![[data valueForKey:@"account_remove_remaining_sec"] isKindOfClass:[NSNull class]])
+ features.accountRemoveRemainingSec = [[data valueForKey:@"account_remove_remaining_sec"] integerValue];
+
+ if ([data valueForKey:@"account_remove_time"] && ![[data valueForKey:@"account_remove_time"] isKindOfClass:[NSNull class]])
+ features.accountRemoveTime = [[data valueForKey:@"account_remove_time"] integerValue];
+
+ if ([data valueForKey:@"account_remove"] && ![[data valueForKey:@"account_remove"] isKindOfClass:[NSNull class]])
+ features.accountRemove = [data valueForKey:@"account_remove"];
+
+ successRequest(response, features, request.redirectedServer);
+
+ } else {
+
+ NSString *message = (NSString *)[meta objectForKey:@"message"];
+ if ([message isKindOfClass:[NSNull class]]) {
+ message = NSLocalizedString(@"_server_response_error_", nil);
+ }
+ failureRequest(response, [UtilsFramework getErrorWithCode:statusCode andCustomMessageFromTheServer:message], request.redirectedServer);
+ }
+
+ } else {
+ failureRequest(response, [UtilsFramework getErrorWithCode:k_CCErrorWebdavResponseError andCustomMessageFromTheServer:NSLocalizedString(@"_server_response_error_", nil)], request.redirectedServer);
+ }
+
+ } failure:^(NSHTTPURLResponse *response, NSData *responseData, NSError *error) {
+
+ failureRequest(response, error, request.redirectedServer);
+ }];
+
+}
#pragma mark - Manage Mobile Editor OCS API
diff --git a/iOSClient/Library/OCCommunicationLib/OCUserProfile.h b/iOSClient/Library/OCCommunicationLib/OCUserProfile.h
index 0a46abfd9..97542628a 100644
--- a/iOSClient/Library/OCCommunicationLib/OCUserProfile.h
+++ b/iOSClient/Library/OCCommunicationLib/OCUserProfile.h
@@ -29,11 +29,18 @@
@property BOOL enabled;
@property (nonatomic, strong) NSString *address;
+@property (nonatomic, strong) NSString *businessSize;
+@property (nonatomic, strong) NSString *businessType;
+@property (nonatomic, strong) NSString *city;
+@property (nonatomic, strong) NSString *company;
+@property (nonatomic, strong) NSString *country;
@property (nonatomic, strong) NSString *displayName;
@property (nonatomic, strong) NSString *email;
@property (nonatomic, strong) NSString *phone;
+@property (nonatomic, strong) NSString *role;
@property (nonatomic, strong) NSString *twitter;
@property (nonatomic, strong) NSString *webpage;
+@property (nonatomic, strong) NSString *zip;
@property double quota;
@property double quotaFree;
diff --git a/iOSClient/Library/OCCommunicationLib/OCUserProfile.m b/iOSClient/Library/OCCommunicationLib/OCUserProfile.m
index 66e3ef77d..34032e9d2 100644
--- a/iOSClient/Library/OCCommunicationLib/OCUserProfile.m
+++ b/iOSClient/Library/OCCommunicationLib/OCUserProfile.m
@@ -30,12 +30,20 @@
self = [super init];
self.id = @"";
+
self.address = @"";
+ self.businessSize = @"";
+ self.businessType = @"";
+ self.city = @"";
+ self.company = @"";
+ self.country = @"";
self.displayName = @"";
self.email = @"";
self.phone = @"";
+ self.role = @"";
self.twitter = @"";
self.webpage = @"";
+ self.zip = @"";
return self;
}
diff --git a/iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.h b/iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.h
index 49f70a7e5..1a77ac90a 100755
--- a/iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.h
+++ b/iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.h
@@ -35,8 +35,8 @@
//
-#import "AFHTTPSessionManager.h"
#import "OCHTTPRequestOperation.h"
+@import AFNetworking;
@class OCCommunication;
@class OCChunkDto;
@@ -196,8 +196,12 @@ extern NSString * _Nullable OCWebDAVModificationDateKey;
*/
+NS_ASSUME_NONNULL_BEGIN
+
- (void)search:(NSString * _Nonnull)path folder:(NSString * _Nonnull)folder fileName:(NSString * _Nonnull)fileName depth:(NSString * _Nonnull)depth lteDateLastModified:(NSString *)lteDateLastModified gteDateLastModified:(NSString *)gteDateLastModified contentType:(NSArray * _Nonnull)contentType user:(NSString * _Nonnull)user userID:(NSString * _Nonnull)userID onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication withUserSessionToken:(NSString * _Nonnull)token success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nonnull, NSString * _Nonnull token))success failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull, id _Nullable responseObject, NSError * _Nonnull, NSString * _Nonnull token))failure;
+NS_ASSUME_NONNULL_END
+
/**
*/
@@ -506,10 +510,14 @@ extern NSString * _Nullable OCWebDAVModificationDateKey;
success:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nonnull response))success
failure:(void(^ _Nonnull)(NSHTTPURLResponse * _Nonnull operation, id _Nullable responseObject, NSError * _Nonnull error))failure;
+NS_ASSUME_NONNULL_BEGIN
+
- (OCHTTPRequestOperation *) getRemotePreviewByServer:(NSString * _Nonnull)serverPath ofFilePath:(NSString *_Nonnull)filePath withWidth:(NSInteger)fileWidth andHeight:(NSInteger)fileHeight andA:(NSInteger)a andMode:(NSString * _Nonnull)mode path:(NSString * _Nonnull)path onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
- (OCHTTPRequestOperation *) getRemotePreviewTrashByServer:(NSString * _Nonnull)serverPath ofFileID:(NSString *_Nonnull)fileID onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
+NS_ASSUME_NONNULL_END
+
#pragma mark - Notification
///-----------------------------------
@@ -656,6 +664,8 @@ extern NSString * _Nullable OCWebDAVModificationDateKey;
/// Manage Mobile Editor OCS API
///-----------------------------------
+NS_ASSUME_NONNULL_BEGIN
+
- (void)createLinkRichdocuments:(NSString *_Nonnull)serverPath fileID:(NSString * _Nonnull)fileID onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
- (void)geTemplatesRichdocuments:(NSString *_Nonnull)serverPath onCommunication:(OCCommunication * _Nonnull)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
@@ -664,13 +674,21 @@ extern NSString * _Nullable OCWebDAVModificationDateKey;
- (void)createAssetRichdocuments:(NSString *_Nonnull)serverPath path:(NSString *_Nonnull)path onCommunication:(OCCommunication *_Nonnull)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
-
-///-----------------------------------
-/// Trash
-///-----------------------------------
+#pragma mark - Trash
- (void)listTrash:(NSString *)path depth:(NSString *)depth onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *response, id _Nullable responseObject, NSError *error))failure;
- (void)emptyTrash:(NSString*)path onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id _Nullable responseObject, NSError *error))failure;
+
+#pragma mark - Third Parts
+
+- (void)getHCUserProfile:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCComunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
+
+- (void)putHCUserProfile:(NSString *)serverPath data:(NSString *)data onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
+
+- (void)getHCFeatures:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure;
+
+NS_ASSUME_NONNULL_END
+
@end
diff --git a/iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m b/iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m
index e42dcbe3e..b954d2cbb 100755
--- a/iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m
+++ b/iOSClient/Library/OCCommunicationLib/OCWebDavClient/OCWebDAVClient.m
@@ -39,7 +39,6 @@
#import "OCFrameworkConstants.h"
#import "OCCommunication.h"
#import "UtilsFramework.h"
-#import "AFURLSessionManager.h"
#import "NSString+Encode.h"
#import "OCConstants.h"
@@ -49,7 +48,6 @@
#define k_api_header_request @"OCS-APIREQUEST"
#define k_group_sharee_type 1
-
NSString const *OCWebDAVContentTypeKey = @"getcontenttype";
NSString const *OCWebDAVETagKey = @"getetag";
NSString const *OCWebDAVCTagKey = @"getctag";
@@ -1329,6 +1327,50 @@ NSString const *OCWebDAVModificationDateKey = @"modificationdate";
[operation resume];
}
+#pragma mark - Third Parts
+
+- (void)getHCUserProfile:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure {
+
+ _requestMethod = @"GET";
+
+ serverPath = [serverPath stringByAppendingString:[NSString stringWithFormat:@"?format=json"]];
+
+ NSMutableURLRequest *request = [self sharedRequestWithMethod:_requestMethod path:serverPath parameters:nil timeout:k_timeout_webdav];
+ OCHTTPRequestOperation *operation = [self mr_operationWithRequest:request onCommunication:sharedOCCommunication success:success failure:failure];
+ [self setRedirectionBlockOnDatataskWithOCCommunication:sharedOCCommunication andSessionManager:sharedOCCommunication.networkSessionManager];
+
+ [operation resume];
+}
+
+- (void)putHCUserProfile:(NSString*)serverPath data:(NSString *)data onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure {
+
+ NSParameterAssert(success);
+
+ _requestMethod = @"POST";
+
+ NSMutableURLRequest *request = [self sharedRequestWithMethod:_requestMethod path:serverPath parameters:nil timeout:k_timeout_webdav];
+ [request setValue:@"true" forHTTPHeaderField:@"OCS-APIRequest"];
+ [request setHTTPBody:[[NSString stringWithFormat: @"data=%@",data] dataUsingEncoding:NSUTF8StringEncoding]];
+
+ OCHTTPRequestOperation *operation = [self mr_operationWithRequest:request onCommunication:sharedOCCommunication success:success failure:failure];
+ [self setRedirectionBlockOnDatataskWithOCCommunication:sharedOCCommunication andSessionManager:sharedOCCommunication.networkSessionManager];
+
+ [operation resume];
+}
+
+- (void)getHCFeatures:(NSString *)serverPath onCommunication:(OCCommunication *)sharedOCCommunication success:(void(^)(NSHTTPURLResponse *operation, id response))success failure:(void(^)(NSHTTPURLResponse *operation, id responseObject, NSError *error))failure {
+
+ _requestMethod = @"GET";
+
+ serverPath = [serverPath stringByAppendingString:[NSString stringWithFormat:@"?format=json"]];
+
+ NSMutableURLRequest *request = [self sharedRequestWithMethod:_requestMethod path:serverPath parameters:nil timeout:k_timeout_webdav];
+ OCHTTPRequestOperation *operation = [self mr_operationWithRequest:request onCommunication:sharedOCCommunication success:success failure:failure];
+ [self setRedirectionBlockOnDatataskWithOCCommunication:sharedOCCommunication andSessionManager:sharedOCCommunication.networkSessionManager];
+
+ [operation resume];
+}
+
#pragma mark - Manage Redirections
- (void)setRedirectionBlockOnDatataskWithOCCommunication: (OCCommunication *) sharedOCCommunication andSessionManager:(AFURLSessionManager *) sessionManager{
diff --git a/iOSClient/Login/CCLogin.m b/iOSClient/Login/CCLogin.m
index 59b4b382d..789fe6cc0 100644
--- a/iOSClient/Login/CCLogin.m
+++ b/iOSClient/Login/CCLogin.m
@@ -344,11 +344,13 @@
if (_loginType == k_login_Modify_Password) {
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] setAccountActive:account];
+
// Change Password
- tableAccount *tbAccount = [[NCManageDatabase sharedInstance] setAccountPassword:account password:password];
+ [CCUtility setPassword:account password:password];
// Setting appDelegate active account
- [appDelegate settingActiveAccount:tbAccount.account activeUrl:tbAccount.url activeUser:tbAccount.user activeUserID:tbAccount.userID activePassword:tbAccount.password];
+ [appDelegate settingActiveAccount:account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:password];
[self.delegate loginSuccess:_loginType];
@@ -365,7 +367,7 @@
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] setAccountActive:account];
// Setting appDelegate active account
- [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:tableAccount.password];
+ [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:[CCUtility getPassword:tableAccount.account]];
[self.delegate loginSuccess:_loginType];
diff --git a/iOSClient/Login/CCLoginWeb.swift b/iOSClient/Login/CCLoginWeb.swift
index d87aa3a8f..9bc2326c3 100644
--- a/iOSClient/Login/CCLoginWeb.swift
+++ b/iOSClient/Login/CCLoginWeb.swift
@@ -105,13 +105,9 @@ extension CCLoginWeb: SwiftModalWebVCDelegate {
return
}
- // Change Password
- guard let tableAccount = NCManageDatabase.sharedInstance.setAccountPassword(account, password: password) else {
- self.viewController?.dismiss(animated: true, completion: nil)
- return
- }
-
- appDelegate.settingActiveAccount(account, activeUrl: serverUrl, activeUser: username, activeUserID: tableAccount.userID, activePassword: password)
+ // Change Password & setting active account
+ CCUtility.setPassword(account, password: password)
+ appDelegate.settingActiveAccount(account, activeUrl: serverUrl, activeUser: username, activeUserID: appDelegate.activeUserID, activePassword: password)
self.delegate?.loginSuccess(NSInteger(loginType))
self.delegate?.webDismiss?()
diff --git a/iOSClient/Main/CCMain.m b/iOSClient/Main/CCMain.m
index 3f963e9c3..2deb70e7a 100644
--- a/iOSClient/Main/CCMain.m
+++ b/iOSClient/Main/CCMain.m
@@ -1213,7 +1213,7 @@
if ([CCUtility isEndToEndEnabled:account]) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
NSString *metadata;
- NSError *error = [[NCNetworkingEndToEnd sharedManager] getEndToEndMetadata:&metadata fileID:metadataFolderFileID user:tableAccount.user userID:tableAccount.userID password:tableAccount.password url:tableAccount.url];
+ NSError *error = [[NCNetworkingEndToEnd sharedManager] getEndToEndMetadata:&metadata fileID:metadataFolderFileID user:tableAccount.user userID:tableAccount.userID password:[CCUtility getPassword:tableAccount.account] url:tableAccount.url];
dispatch_async(dispatch_get_main_queue(), ^{
if (error) {
if (error.code != kOCErrorServerPathNotFound)
@@ -1851,7 +1851,7 @@
tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID == %@", metadataSection.fileID]];
if (metadata)
- [[NCMainCommon sharedInstance] cancelTransferMetadata:metadata reloadDatasource:true];
+ [[NCMainCommon sharedInstance] cancelTransferMetadata:metadata reloadDatasource:true uploadStatusForcedStart:false];
}
}
}
@@ -2293,8 +2293,7 @@
if (tableAccount) {
// LOGIN
-
- [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:tableAccount.password];
+ [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:[CCUtility getPassword:tableAccount.account]];
// go to home sweet home
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
diff --git a/iOSClient/Main/Cell/NCGridMediaCell.swift b/iOSClient/Main/Cell/NCGridMediaCell.swift
index 181992a70..4df8ecff2 100644
--- a/iOSClient/Main/Cell/NCGridMediaCell.swift
+++ b/iOSClient/Main/Cell/NCGridMediaCell.swift
@@ -28,6 +28,8 @@ class NCGridMediaCell: UICollectionViewCell {
@IBOutlet weak var imageItem: UIImageView!
+ @IBOutlet weak var imageVisualEffect: UIVisualEffectView!
+
@IBOutlet weak var imageSelect: UIImageView!
@IBOutlet weak var imageStatus: UIImageView!
@IBOutlet weak var imageFavorite: UIImageView!
diff --git a/iOSClient/Main/Cell/NCGridMediaCell.xib b/iOSClient/Main/Cell/NCGridMediaCell.xib
index 34c47a84a..468af8004 100644
--- a/iOSClient/Main/Cell/NCGridMediaCell.xib
+++ b/iOSClient/Main/Cell/NCGridMediaCell.xib
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@@ -22,13 +22,6 @@
<imageView autoresizesSubviews="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="5Ci-V1-hf5" userLabel="imageItem">
<rect key="frame" x="0.0" y="0.0" width="220" height="220"/>
</imageView>
- <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DHy-Up-3Bh" userLabel="imageSelect">
- <rect key="frame" x="5" y="5" width="25" height="25"/>
- <constraints>
- <constraint firstAttribute="height" constant="25" id="SoZ-J3-98x"/>
- <constraint firstAttribute="width" constant="25" id="cZG-gx-gwt"/>
- </constraints>
- </imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="AYs-f2-vve" userLabel="imageFavorite">
<rect key="frame" x="200" y="5" width="15" height="15"/>
<constraints>
@@ -50,13 +43,33 @@
<constraint firstAttribute="width" constant="15" id="xLe-lb-N1p"/>
</constraints>
</imageView>
+ <visualEffectView hidden="YES" opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="r1K-4X-gNd" userLabel="VisualEffect">
+ <rect key="frame" x="0.0" y="0.0" width="220" height="220"/>
+ <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="3h4-qt-b9E">
+ <rect key="frame" x="0.0" y="0.0" width="220" height="220"/>
+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+ </view>
+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+ <blurEffect style="extraLight"/>
+ </visualEffectView>
+ <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="DHy-Up-3Bh" userLabel="imageSelect">
+ <rect key="frame" x="5" y="5" width="25" height="25"/>
+ <constraints>
+ <constraint firstAttribute="height" constant="25" id="SoZ-J3-98x"/>
+ <constraint firstAttribute="width" constant="25" id="cZG-gx-gwt"/>
+ </constraints>
+ </imageView>
</subviews>
</view>
<constraints>
+ <constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="r1K-4X-gNd" secondAttribute="trailing" id="1Hu-GT-dJv"/>
<constraint firstItem="DHy-Up-3Bh" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" constant="5" id="1T3-8p-uIW"/>
+ <constraint firstItem="r1K-4X-gNd" firstAttribute="leading" secondItem="VXh-sQ-LeX" secondAttribute="leading" id="3bv-Dh-iih"/>
<constraint firstItem="AYs-f2-vve" firstAttribute="leading" secondItem="5Ci-V1-hf5" secondAttribute="trailing" constant="-20" id="3e3-0A-NSl"/>
<constraint firstItem="DHy-Up-3Bh" firstAttribute="top" secondItem="VXh-sQ-LeX" secondAttribute="top" constant="5" id="ESV-qE-tbO"/>
<constraint firstItem="5Ci-V1-hf5" firstAttribute="top" secondItem="VXh-sQ-LeX" secondAttribute="top" id="Ouj-ZD-UFm"/>
+ <constraint firstItem="VXh-sQ-LeX" firstAttribute="bottom" secondItem="r1K-4X-gNd" secondAttribute="bottom" id="QAj-Am-H9V"/>
+ <constraint firstItem="r1K-4X-gNd" firstAttribute="top" secondItem="VXh-sQ-LeX" secondAttribute="top" id="Rou-vT-GPt"/>
<constraint firstItem="5Ci-V1-hf5" firstAttribute="leading" secondItem="a0p-rj-jnV" secondAttribute="trailing" constant="-20" id="UtQ-6D-cYc"/>
<constraint firstItem="81G-wH-fjN" firstAttribute="top" secondItem="5Ci-V1-hf5" secondAttribute="bottom" constant="-20" id="aEb-vq-8sk"/>
<constraint firstItem="VXh-sQ-LeX" firstAttribute="trailing" secondItem="5Ci-V1-hf5" secondAttribute="trailing" id="cHT-cP-NN6"/>
@@ -74,6 +87,7 @@
<outlet property="imageLocal" destination="81G-wH-fjN" id="bqj-wQ-CBV"/>
<outlet property="imageSelect" destination="DHy-Up-3Bh" id="mo9-rP-P4I"/>
<outlet property="imageStatus" destination="a0p-rj-jnV" id="6Dg-tf-evd"/>
+ <outlet property="imageVisualEffect" destination="r1K-4X-gNd" id="uf3-P1-F4o"/>
</connections>
<point key="canvasLocation" x="88" y="141.67916041979012"/>
</collectionViewCell>
diff --git a/iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift b/iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift
index 0bf7c403b..a3d210326 100644
--- a/iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift
+++ b/iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift
@@ -215,7 +215,7 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate {
return
}
if name as! String == "" {
- name = CCUtility.createFileNameDate("scan", extension: "pdf")
+ name = CCUtility.createFileNameDate("scan", extension: "pdf") ?? "scan.pdf"
}
let ext = (name as! NSString).pathExtension.uppercased()
@@ -513,7 +513,7 @@ class NCCreateScanDocument : NSObject, ImageScannerControllerDelegate {
let fileName = CCUtility.createFileName("scan.png", fileDate: Date(), fileType: PHAssetMediaType.image, keyFileName: k_keyFileNameMask, keyFileNameType: k_keyFileNameType, keyFileNameOriginal: k_keyFileNameOriginal)!
let fileNamePath = CCUtility.getDirectoryScan() + "/" + fileName
- /* V 1.0
+ // V 1.0
if (results.doesUserPreferEnhancedImage && results.enhancedImage != nil) {
do {
try results.enhancedImage!.pngData()?.write(to: NSURL.fileURL(withPath: fileNamePath), options: .atomic)
@@ -523,12 +523,13 @@ class NCCreateScanDocument : NSObject, ImageScannerControllerDelegate {
try results.scannedImage.pngData()?.write(to: NSURL.fileURL(withPath: fileNamePath), options: .atomic)
} catch { }
}
- */
-
+
// 0.9.1
+ /*
do {
try results.scannedImage.pngData()?.write(to: NSURL.fileURL(withPath: fileNamePath), options: .atomic)
} catch { }
+ */
scanner.dismiss(animated: true, completion: {
if (self.openScan) {
diff --git a/iOSClient/Main/NCMainCommon.swift b/iOSClient/Main/NCMainCommon.swift
index 5fb06e3e8..96af503d1 100644
--- a/iOSClient/Main/NCMainCommon.swift
+++ b/iOSClient/Main/NCMainCommon.swift
@@ -23,7 +23,7 @@
import Foundation
import TLPhotoPicker
-import Zip
+import ZIPFoundation
//MARK: - Main Common
@@ -97,9 +97,10 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
}
}
- @objc func cancelTransferMetadata(_ metadata: tableMetadata, reloadDatasource: Bool) {
+ @objc func cancelTransferMetadata(_ metadata: tableMetadata, reloadDatasource: Bool, uploadStatusForcedStart: Bool) {
var actionReloadDatasource = k_action_NULL
+ var metadata = metadata
if metadata.session.count == 0 {
return
@@ -156,6 +157,10 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
if metadata.session.count > 0 && metadata.session.contains("upload") {
for task in uploadTasks {
if task.taskIdentifier == metadata.sessionTaskIdentifier {
+ if uploadStatusForcedStart {
+ metadata.status = Int(k_metadataStatusUploadForcedStart)
+ metadata = NCManageDatabase.sharedInstance.addMetadata(metadata) ?? metadata
+ }
task.cancel()
cancel = true
}
@@ -199,7 +204,7 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
// Cancel Task
if metadata.status == k_metadataStatusDownloading || metadata.status == k_metadataStatusUploading {
- self.cancelTransferMetadata(metadata, reloadDatasource: false)
+ self.cancelTransferMetadata(metadata, reloadDatasource: false, uploadStatusForcedStart: false)
}
}
}
@@ -475,14 +480,15 @@ class NCMainCommon: NSObject, PhotoEditorDelegate, NCAudioRecorderViewController
cell.imageSelect.isHidden = false
if selectFileID.contains(metadata.fileID) {
cell.imageSelect.image = CCGraphics.scale(UIImage.init(named: "checkedYes"), to: CGSize(width: 50, height: 50), isAspectRation: true)
- cell.backgroundView = NCUtility.sharedInstance.cellBlurEffect(with: cell.bounds)
+ cell.imageVisualEffect.isHidden = false
+ cell.imageVisualEffect.alpha = 0.4
} else {
cell.imageSelect.isHidden = true
- cell.backgroundView = nil
+ cell.imageVisualEffect.isHidden = true
}
} else {
cell.imageSelect.isHidden = true
- cell.backgroundView = nil
+ cell.imageVisualEffect.isHidden = true
}
}
}
@@ -1093,7 +1099,7 @@ class CCMainTabBarController : UITabBarController, UITabBarControllerDelegate {
func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool {
let tabViewControllers = tabBarController.viewControllers!
- guard let toIndex = tabViewControllers.index(of: viewController) else {
+ guard let toIndex = tabViewControllers.firstIndex(of: viewController) else {
if let vc = viewController as? UINavigationController {
vc.popToRootViewController(animated: true);
@@ -1112,7 +1118,7 @@ class CCMainTabBarController : UITabBarController, UITabBarControllerDelegate {
let tabViewControllers = viewControllers!
let fromView = selectedViewController!.view!
let toView = tabViewControllers[toIndex].view!
- let fromIndex = tabViewControllers.index(of: selectedViewController!)
+ let fromIndex = tabViewControllers.firstIndex(of: selectedViewController!)
guard fromIndex != toIndex else {return}
@@ -1224,12 +1230,10 @@ class NCNetworkingMain: NSObject, CCNetworkingDelegate {
if metadata.typeFile == k_metadataTypeFile_imagemeter {
do {
- Zip.addCustomFileExtension("imi")
-
let source = URL(fileURLWithPath: CCUtility.getDirectoryProviderStorageFileID(metadata.fileID, fileNameView: metadata.fileNameView))
let destination = URL(fileURLWithPath: CCUtility.getDirectoryProviderStorageFileID(metadata.fileID))
- try Zip.unzipFile(source, destination: destination, overwrite: true, password: nil)
+ try FileManager().unzipItem(at: source, to: destination)
let nameArchiveImagemeter = (metadata.fileNameView as NSString).deletingPathExtension
let pathArchiveImagemeter = CCUtility.getDirectoryProviderStorageFileID(metadata.fileID) + "/" + nameArchiveImagemeter
@@ -1238,9 +1242,8 @@ class NCNetworkingMain: NSObject, CCNetworkingDelegate {
if let fileHandle = FileHandle(forReadingAtPath: annoPath) {
let data = fileHandle.readData(ofLength: 4)
if data.starts(with: [0x50, 0x4b, 0x03, 0x04]) {
- Zip.addCustomFileExtension("imm")
do {
- try Zip.unzipFile(annoPath.url, destination: pathArchiveImagemeter.url, overwrite: true, password: nil)
+ try FileManager().unzipItem(at: annoPath.url, to: pathArchiveImagemeter.url)
} catch {
appDelegate.messageNotification("_error_", description: "_error_decompressing_", visible: true, delay: TimeInterval(k_dismissAfterSecond), type: TWMessageBarMessageType.error, errorCode: errorCode)
return
diff --git a/iOSClient/Media/NCMedia.swift b/iOSClient/Media/NCMedia.swift
index ae139d29a..d55031000 100644
--- a/iOSClient/Media/NCMedia.swift
+++ b/iOSClient/Media/NCMedia.swift
@@ -396,7 +396,7 @@ extension NCMedia: UICollectionViewDelegate {
metadataPush = metadata
if isEditMode {
- if let index = selectFileID.index(of: metadata.fileID) {
+ if let index = selectFileID.firstIndex(of: metadata.fileID) {
selectFileID.remove(at: index)
} else {
selectFileID.append(metadata.fileID)
@@ -698,7 +698,7 @@ extension NCMedia {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
for item in self.collectionView.indexPathsForVisibleItems {
if let metadata = NCMainCommon.sharedInstance.getMetadataFromSectionDataSourceIndexPath(item, sectionDataSource: self.sectionDatasource) {
- NCNetworkingMain.sharedInstance.downloadThumbnail(with: metadata, view: self.collectionView, indexPath: item)
+ NCNetworkingMain.sharedInstance.downloadThumbnail(with: metadata, view: self.collectionView as Any, indexPath: item)
}
}
}
diff --git a/iOSClient/Move/CCMove.m b/iOSClient/Move/CCMove.m
index 6d6317aa9..ea097ffed 100644
--- a/iOSClient/Move/CCMove.m
+++ b/iOSClient/Move/CCMove.m
@@ -50,15 +50,15 @@
{
[super viewDidLoad];
- tableAccount *recordAccount = [[NCManageDatabase sharedInstance] getAccountActive];
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
- if (recordAccount) {
+ if (tableAccount) {
- activeAccount = recordAccount.account;
- activePassword = recordAccount.password;
- activeUrl = recordAccount.url;
- activeUser = recordAccount.user;
- activeUserID = recordAccount.userID;
+ activeAccount = tableAccount.account;
+ activePassword = [CCUtility getPassword:tableAccount.account];
+ activeUrl = tableAccount.url;
+ activeUser = tableAccount.user;
+ activeUserID = tableAccount.userID;
} else {
diff --git a/iOSClient/Networking/CCNetworking.h b/iOSClient/Networking/CCNetworking.h
index c9c7def7f..c07896fa5 100644
--- a/iOSClient/Networking/CCNetworking.h
+++ b/iOSClient/Networking/CCNetworking.h
@@ -23,11 +23,8 @@
#import <Foundation/Foundation.h>
#import <Photos/Photos.h>
-
#import "OCCommunication.h"
#import "OCFrameworkConstants.h"
-#import "AFURLSessionManager.h"
-#import "TWMessageBarManager.h"
#import "PHAsset+Utility.h"
#import "CCExifGeo.h"
#import "CCGraphics.h"
diff --git a/iOSClient/Networking/CCNetworking.m b/iOSClient/Networking/CCNetworking.m
index 474829fdf..59bea0991 100644
--- a/iOSClient/Networking/CCNetworking.m
+++ b/iOSClient/Networking/CCNetworking.m
@@ -425,7 +425,7 @@
url = [NSURL URLWithString:serverFileUrl];
request = [NSMutableURLRequest requestWithURL:url];
- NSData *authData = [[NSString stringWithFormat:@"%@:%@", tableAccount.user, tableAccount.password] dataUsingEncoding:NSUTF8StringEncoding];
+ NSData *authData = [[NSString stringWithFormat:@"%@:%@", tableAccount.user, [CCUtility getPassword:tableAccount.account]] dataUsingEncoding:NSUTF8StringEncoding];
NSString *authValue = [NSString stringWithFormat: @"Basic %@",[authData base64EncodedStringWithOptions:0]];
[request setValue:authValue forHTTPHeaderField:@"Authorization"];
[request setValue:[CCUtility getUserAgent] forHTTPHeaderField:@"User-Agent"];
@@ -655,8 +655,9 @@
if ([extensionAsset isEqualToString:@"HEIC"] && [CCUtility getFormatCompatibility]) {
- UIImage *image = [UIImage imageWithData:imageData];
- imageData = UIImageJPEGRepresentation(image, 1.0);
+ CIImage *ciImage = [CIImage imageWithData:imageData];
+ CIContext *context = [CIContext context];
+ imageData = [context JPEGRepresentationOfImage:ciImage colorSpace:ciImage.colorSpace options:@{}];
NSString *fileNameJPEG = [[metadata.fileName lastPathComponent] stringByDeletingPathExtension];
metadata.fileName = [fileNameJPEG stringByAppendingString:@".jpg"];
metadata.fileNameView = metadata.fileName;
@@ -827,7 +828,7 @@
// Get the last metadata
tableDirectory *directory = [[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@", tableAccount.account, metadata.serverUrl]];
- error = [[NCNetworkingEndToEnd sharedManager] getEndToEndMetadata:&e2eeMetadata fileID:directory.fileID user:tableAccount.user userID:tableAccount.userID password:tableAccount.password url:tableAccount.url];
+ error = [[NCNetworkingEndToEnd sharedManager] getEndToEndMetadata:&e2eeMetadata fileID:directory.fileID user:tableAccount.user userID:tableAccount.userID password: [CCUtility getPassword:tableAccount.account] url:tableAccount.url];
if (error == nil) {
if ([[NCEndToEndMetadata sharedInstance] decoderMetadata:e2eeMetadata privateKey:[CCUtility getEndToEndPrivateKey:tableAccount.account] serverUrl:metadata.serverUrl account:tableAccount.account url:tableAccount.url] == false) {
@@ -885,7 +886,7 @@
url = [NSURL URLWithString:[[NSString stringWithFormat:@"%@/%@", metadata.serverUrl, metadata.fileName] encodeString:NSUTF8StringEncoding]];
request = [NSMutableURLRequest requestWithURL:url];
- NSData *authData = [[NSString stringWithFormat:@"%@:%@", tableAccount.user, tableAccount.password] dataUsingEncoding:NSUTF8StringEncoding];
+ NSData *authData = [[NSString stringWithFormat:@"%@:%@", tableAccount.user, [CCUtility getPassword:tableAccount.account]] dataUsingEncoding:NSUTF8StringEncoding];
NSString *authValue = [NSString stringWithFormat: @"Basic %@",[authData base64EncodedStringWithOptions:0]];
[request setHTTPMethod:@"PUT"];
[request setValue:authValue forHTTPHeaderField:@"Authorization"];
@@ -936,7 +937,7 @@
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
// Send Metadata
- NSError *error = [[NCNetworkingEndToEnd sharedManager] sendEndToEndMetadataOnServerUrl:serverUrl fileNameRename:nil fileNameNewRename:nil account:tableAccount.account user:tableAccount.user userID:tableAccount.userID password:tableAccount.password url:tableAccount.url];
+ NSError *error = [[NCNetworkingEndToEnd sharedManager] sendEndToEndMetadataOnServerUrl:serverUrl fileNameRename:nil fileNameNewRename:nil account:tableAccount.account user:tableAccount.user userID:tableAccount.userID password:[CCUtility getPassword:tableAccount.account] url:tableAccount.url];
dispatch_async(dispatch_get_main_queue(), ^{
@@ -1059,16 +1060,33 @@
// Mark error only if not Cancelled Task
if (errorCode == kCFURLErrorCancelled) {
- [[NSFileManager defaultManager] removeItemAtPath:[CCUtility getDirectoryProviderStorageFileID:tempFileID] error:nil];
- [[NCManageDatabase sharedInstance] deleteMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID == %@", tempFileID]];
+ if (metadata.status == k_metadataStatusUploadForcedStart) {
+
+ errorCode = 0;
+
+ metadata.session = k_upload_session;
+ metadata.sessionError = @"";
+ metadata.sessionTaskIdentifier = 0;
+ metadata.status = k_metadataStatusInUpload;
+ metadata = [[NCManageDatabase sharedInstance] addMetadata:metadata];
+ [[CCNetworking sharedNetworking] uploadFile:metadata taskStatus:k_taskStatusResume];
+
+ } else {
+
+ [[NSFileManager defaultManager] removeItemAtPath:[CCUtility getDirectoryProviderStorageFileID:tempFileID] error:nil];
+ [[NCManageDatabase sharedInstance] deleteMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID == %@", tempFileID]];
+
+ errorMessage = [CCError manageErrorKCF:errorCode withNumberError:YES];
+ }
+
} else {
[[NCManageDatabase sharedInstance] setMetadataSession:nil sessionError:[CCError manageErrorKCF:errorCode withNumberError:NO] sessionSelector:nil sessionTaskIdentifier:k_taskIdentifierDone status:k_metadataStatusUploadError predicate:[NSPredicate predicateWithFormat:@"fileID == %@", tempFileID]];
+
+ errorMessage = [CCError manageErrorKCF:errorCode withNumberError:YES];
}
- errorMessage = [CCError manageErrorKCF:errorCode withNumberError:YES];
-
} else {
// Replace Metadata
@@ -1146,7 +1164,7 @@
if (tableLock) {
- NSError *error = [[NCNetworkingEndToEnd sharedManager] unlockEndToEndFolderEncryptedOnServerUrl:serverUrl fileID:tableLock.fileID token:tableLock.token user:tableAccount.user userID:tableAccount.userID password:tableAccount.password url:tableAccount.url];
+ NSError *error = [[NCNetworkingEndToEnd sharedManager] unlockEndToEndFolderEncryptedOnServerUrl:serverUrl fileID:tableLock.fileID token:tableLock.token user:tableAccount.user userID:tableAccount.userID password:[CCUtility getPassword:tableAccount.account] url:tableAccount.url];
if (error) {
#ifndef EXTENSION
dispatch_async(dispatch_get_main_queue(), ^{
diff --git a/iOSClient/Networking/NCNetworkingEndToEnd.m b/iOSClient/Networking/NCNetworkingEndToEnd.m
index a9e1c053b..b2f3faa30 100644
--- a/iOSClient/Networking/NCNetworkingEndToEnd.m
+++ b/iOSClient/Networking/NCNetworkingEndToEnd.m
@@ -63,7 +63,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getEndToEndPublicKeys:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *publicKey, NSString *redirectedServer) {
@@ -97,7 +97,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getEndToEndPrivateKeyCipher:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *privateKeyChiper, NSString *redirectedServer) {
@@ -131,7 +131,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication signEndToEndPublicKey:[tableAccount.url stringByAppendingString:@"/"] publicKey:[CCUtility URLEncodeStringFromString:publicKey] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *publicKey, NSString *redirectedServer) {
@@ -165,7 +165,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication storeEndToEndPrivateKeyCipher:[tableAccount.url stringByAppendingString:@"/"] privateKeyChiper:[CCUtility URLEncodeStringFromString:privateKeyChiper] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *privateKey, NSString *redirectedServer) {
@@ -199,7 +199,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication deleteEndToEndPublicKey:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -233,7 +233,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication deleteEndToEndPrivateKey:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -267,7 +267,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getEndToEndServerPublicKey:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *publicKey, NSString *redirectedServer) {
diff --git a/iOSClient/Networking/NCService.swift b/iOSClient/Networking/NCService.swift
index ec9be98ff..86cbf38ea 100644
--- a/iOSClient/Networking/NCService.swift
+++ b/iOSClient/Networking/NCService.swift
@@ -46,6 +46,11 @@ class NCService: NSObject {
self.requestServerCapabilities()
self.requestServerStatus()
self.requestListTrash()
+
+ // Thirt Part
+ if NCBrandOptions.sharedInstance.brandInitials == "hc" {
+ self.requestHC()
+ }
}
//MARK: -
@@ -68,35 +73,26 @@ class NCService: NSObject {
if (NCBrandOptions.sharedInstance.use_themingBackground && capabilities!.themingBackground != "") {
- // Download Logo
- let fileNameThemingLogo = CCUtility.getStringUser(self.appDelegate.activeUser, activeUrl: self.appDelegate.activeUrl) + "-themingLogo.png"
- NCUtility.sharedInstance.convertSVGtoPNGWriteToUserData(svgUrlString: capabilities!.themingLogo, fileName: fileNameThemingLogo, width: 40, rewrite: true, closure: { (imageNamePath) in })
-
// Download Theming Background
DispatchQueue.global().async {
+ // Download Logo
+ let fileNameThemingLogo = CCUtility.getStringUser(self.appDelegate.activeUser, activeUrl: self.appDelegate.activeUrl) + "-themingLogo.png"
+ NCUtility.sharedInstance.convertSVGtoPNGWriteToUserData(svgUrlString: capabilities!.themingLogo, fileName: fileNameThemingLogo, width: 40, rewrite: true, closure: { (imageNamePath) in })
+
let backgroundURL = capabilities!.themingBackground!.addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
let fileNamePath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(self.appDelegate.activeUser, activeUrl: self.appDelegate.activeUrl) + "-themingBackground.png"
- guard let imageData = try? Data(contentsOf: URL(string: backgroundURL)!) else {
- DispatchQueue.main.async {
- self.appDelegate.settingThemingColorBrand()
+ if let imageData = try? Data(contentsOf: URL(string: backgroundURL)!) {
+ if let image = UIImage(data: imageData) {
+ try? FileManager.default.removeItem(atPath: fileNamePath)
+ if let data = image.pngData() {
+ try? data.write(to: URL(fileURLWithPath: fileNamePath))
+ }
}
- return
}
DispatchQueue.main.async {
-
- guard let image = UIImage(data: imageData) else {
- try? FileManager.default.removeItem(atPath: fileNamePath)
- self.appDelegate.settingThemingColorBrand()
- return
- }
-
- if let data = image.pngData() {
- try? data.write(to: URL(fileURLWithPath: fileNamePath))
- }
-
self.appDelegate.settingThemingColorBrand()
}
}
@@ -121,7 +117,7 @@ class NCService: NSObject {
if errorCode == 0 && account == self.appDelegate.activeAccount {
- DispatchQueue.global(qos: .default).async {
+ DispatchQueue.global().async {
let sortedListOfNotifications = (listOfNotifications! as NSArray).sortedArray(using: [
NSSortDescriptor(key: "date", ascending: false)
@@ -206,9 +202,11 @@ class NCService: NSObject {
if (capabilities!.isActivityV2Enabled) {
OCNetworking.sharedManager().getActivityWithAccount(account!, since: 0, limit: 100, link: "", completion: { (account, listOfActivity, message, errorCode) in
- if errorCode == 0 && account == self.appDelegate.activeAccount {
- NCManageDatabase.sharedInstance.addActivity(listOfActivity as! [OCActivity], account: account!)
- }
+ DispatchQueue.global().async {
+ if errorCode == 0 && account == self.appDelegate.activeAccount {
+ NCManageDatabase.sharedInstance.addActivity(listOfActivity as! [OCActivity], account: account!)
+ }
+ }
})
}
@@ -235,7 +233,7 @@ class NCService: NSObject {
if errorCode == 0 && account == self.appDelegate.activeAccount {
// Update User (+ userProfile.id) & active account & account network
- guard let tableAccount = NCManageDatabase.sharedInstance.setAccountUserProfile(userProfile!) else {
+ guard let tableAccount = NCManageDatabase.sharedInstance.setAccountUserProfile(userProfile!, HCProperties: false) else {
self.appDelegate.messageNotification("Accopunt", description: "Internal error : account not found on DB", visible: true, delay: TimeInterval(k_dismissAfterSecond), type: TWMessageBarMessageType.error, errorCode: Int(k_CCErrorInternalError))
return
}
@@ -243,37 +241,28 @@ class NCService: NSObject {
let user = tableAccount.user
let url = tableAccount.url
- self.appDelegate.settingActiveAccount(tableAccount.account, activeUrl: tableAccount.url, activeUser: tableAccount.user, activeUserID: tableAccount.userID, activePassword: tableAccount.password)
+ self.appDelegate.settingActiveAccount(tableAccount.account, activeUrl: tableAccount.url, activeUser: tableAccount.user, activeUserID: tableAccount.userID, activePassword: CCUtility.getPassword(tableAccount.account))
// Call func thath required the userdID
self.appDelegate.activeFavorites.listingFavorites()
self.appDelegate.activeMedia.reloadDataSource(loadNetworkDatasource: true)
NCFunctionMain.sharedInstance.synchronizeOffline()
- DispatchQueue.global(qos: .default).async {
+ DispatchQueue.global().async {
let address = "\(self.appDelegate.activeUrl!)/index.php/avatar/\(self.appDelegate.activeUser!)/128".addingPercentEncoding(withAllowedCharacters: .urlFragmentAllowed)!
let fileNamePath = CCUtility.getDirectoryUserData() + "/" + CCUtility.getStringUser(user, activeUrl: url) + "-" + self.appDelegate.activeUser + ".png"
- guard let imageData = try? Data(contentsOf: URL(string: address)!) else {
- DispatchQueue.main.async {
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changeUserProfile"), object: nil)
+ if let imageData = try? Data(contentsOf: URL(string: address)!) {
+ if let image = UIImage(data: imageData) {
+ try? FileManager.default.removeItem(atPath: fileNamePath)
+ if let data = image.pngData() {
+ try? data.write(to: URL(fileURLWithPath: fileNamePath))
+ }
}
- return
}
DispatchQueue.main.async {
-
- guard let image = UIImage(data: imageData) else {
- try? FileManager.default.removeItem(atPath: fileNamePath)
- NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changeUserProfile"), object: nil)
- return
- }
-
- if let data = image.pngData() {
- try? data.write(to: URL(fileURLWithPath: fileNamePath))
- }
-
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "changeUserProfile"), object: nil)
}
}
@@ -317,9 +306,44 @@ class NCService: NSObject {
OCNetworking.sharedManager().listingTrash(withAccount: appDelegate.activeAccount, path: path, serverUrl: appDelegate.activeUrl, depth: "infinity", completion: { (account, item, message, errorCode) in
if errorCode == 0 && account == self.appDelegate.activeAccount {
- NCManageDatabase.sharedInstance.deleteTrash(filePath: nil, account: account!)
- NCManageDatabase.sharedInstance.addTrashs(item as! [tableTrash])
+ DispatchQueue.global().async {
+ NCManageDatabase.sharedInstance.deleteTrash(filePath: nil, account: account!)
+ NCManageDatabase.sharedInstance.addTrashs(item as! [tableTrash])
+ }
}
})
}
+
+ //MARK: -
+ //MARK: Thirt Part
+
+ private func requestHC() {
+
+ let professions = CCUtility.getHCBusinessType()
+ if professions != nil && professions!.count > 0 {
+ OCNetworking.sharedManager()?.putHCUserProfile(withAccount: appDelegate.activeAccount, serverUrl: appDelegate.activeUrl, address: nil, businesssize: nil, businesstype: professions, city: nil, company: nil, country: nil, displayname: nil, email: nil, phone: nil, role_: nil, twitter: nil, website: nil, zip: nil, completion: { (account, message, errorCode) in
+ if errorCode == 0 && account == self.appDelegate.activeAccount {
+ CCUtility.setHCBusinessType(nil)
+ OCNetworking.sharedManager()?.getHCUserProfile(withAccount: self.appDelegate.activeAccount, serverUrl: self.appDelegate.activeUrl, completion: { (account, userProfile, message, errorCode) in
+ if errorCode == 0 && account == self.appDelegate.activeAccount {
+ _ = NCManageDatabase.sharedInstance.setAccountUserProfile(userProfile!, HCProperties: true)
+ }
+ })
+ }
+ })
+ } else {
+ OCNetworking.sharedManager()?.getHCUserProfile(withAccount: appDelegate.activeAccount, serverUrl: appDelegate.activeUrl, completion: { (account, userProfile, message, errorCode) in
+ if errorCode == 0 && account == self.appDelegate.activeAccount {
+ _ = NCManageDatabase.sharedInstance.setAccountUserProfile(userProfile!, HCProperties: true)
+ }
+ })
+ }
+
+ OCNetworking.sharedManager()?.getHCFeatures(withAccount: appDelegate.activeAccount, serverUrl: appDelegate.activeUrl, completion: { (account, features, message, errorCode) in
+ if errorCode == 0 && account == self.appDelegate.activeAccount {
+ _ = NCManageDatabase.sharedInstance.setAccountHCFeatures(features!)
+ }
+ })
+
+ }
}
diff --git a/iOSClient/Networking/OCNetworking.h b/iOSClient/Networking/OCNetworking.h
index 272a922a9..210a31809 100644
--- a/iOSClient/Networking/OCNetworking.h
+++ b/iOSClient/Networking/OCNetworking.h
@@ -22,9 +22,8 @@
//
#import <Foundation/Foundation.h>
-
-#import "AFURLSessionManager.h"
#import "CCNetworking.h"
+@import AFNetworking;
@interface OCNetworking : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate>
@@ -103,6 +102,12 @@
- (void)listingTrashWithAccount:(NSString *)account path:(NSString *)path serverUrl:(NSString *)serverUrl depth:(NSString *)depth completion:(void (^)(NSString *account, NSArray *items, NSString *message, NSInteger errorCode))completion;
- (void)emptyTrashWithAccount:(NSString *)account completion:(void (^)(NSString *account, NSString *message, NSInteger errorCode))completion;
+#pragma mark ===== Third Parts =====
+
+- (void)getHCUserProfileWithAccount:(NSString *)account serverUrl:(NSString *)serverUrl completion:(void (^)(NSString *account, OCUserProfile *userProfile, NSString *message, NSInteger errorCode))completion;
+- (void)putHCUserProfileWithAccount:(NSString *)account serverUrl:(NSString *)serverUrl address:(NSString *)address businesssize:(NSString *)businesssize businesstype:(NSString *)businesstype city:(NSString *)city company:(NSString *)company country:(NSString *)country displayname:(NSString *)displayname email:(NSString *)email phone:(NSString *)phone role_:(NSString *)role_ twitter:(NSString *)twitter website:(NSString *)website zip:(NSString *)zip completion:(void (^)(NSString *account, NSString *message, NSInteger errorCode))completion;
+- (void)getHCFeaturesWithAccount:(NSString *)account serverUrl:(NSString *)serverUrl completion:(void (^)(NSString *account, HCFeatures *features, NSString *message, NSInteger errorCode))completion;
+
@end
@interface OCURLSessionManager : AFURLSessionManager
diff --git a/iOSClient/Networking/OCNetworking.m b/iOSClient/Networking/OCNetworking.m
index 68e652e01..d8b858c63 100644
--- a/iOSClient/Networking/OCNetworking.m
+++ b/iOSClient/Networking/OCNetworking.m
@@ -261,7 +261,7 @@
completion(account, 0, nil, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
}
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
NSURLSessionTask *sessionTask = [communication downloadFileSession:fileNameServerUrl toDestiny:fileNameLocalPath defaultPriority:YES onCommunication:communication progress:^(NSProgress *progress) {
@@ -330,7 +330,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
NSURLSessionTask *sessionTask = [communication downloadFileSession:url toDestiny:fileNameLocalPath defaultPriority:YES onCommunication:communication progress:^(NSProgress *progress) {
@@ -371,7 +371,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
NSURLSessionTask *sessionTask = [communication uploadFileSession:fileNameLocalPath toDestiny:fileNameServerUrl onCommunication:communication progress:^(NSProgress *progress) {
@@ -430,7 +430,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication readFolder:serverUrl depth:depth withUserSessionToken:nil onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *items, NSString *redirectedServer, NSString *token) {
@@ -542,7 +542,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication readFile:fileNamePath onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *items, NSString *redirectedServer) {
@@ -600,7 +600,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication createFolder:path onCommunication:communication withForbiddenCharactersSupported:YES successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -652,7 +652,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication deleteFileOrFolder:path onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -685,7 +685,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication moveFileOrFolder:fileName toDestiny:fileNameTo onCommunication:communication withForbiddenCharactersSupported:YES successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -753,7 +753,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication search:path folder:folder fileName: [NSString stringWithFormat:@"%%%@%%", fileName] depth:depth lteDateLastModified:lteDateLastModifiedString gteDateLastModified:gteDateLastModifiedString contentType:contentType withUserSessionToken:nil onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *items, NSString *redirectedServer, NSString *token) {
@@ -865,7 +865,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getRemotePreviewByServer:tableAccount.url ofFilePath:[CCUtility returnFileNamePathFromFileName:metadata.fileName serverUrl:metadata.serverUrl activeUrl:tableAccount.url] withWidth:width andHeight:height andA:1 andMode:@"cover" path:@"" onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSData *preview, NSString *redirectedServer) {
@@ -899,7 +899,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getRemotePreviewByServer:tableAccount.url ofFilePath:@"" withWidth:0 andHeight:0 andA:0 andMode:@"" path:serverPath onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSData *preview, NSString *redirectedServer) {
@@ -941,7 +941,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getRemotePreviewTrashByServer:tableAccount.url ofFileID:fileID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSData *preview, NSString *redirectedServer) {
@@ -987,7 +987,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication listingFavorites:path folder:@"" withUserSessionToken:nil onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *items, NSString *redirectedServer, NSString *token) {
@@ -1066,7 +1066,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication settingFavoriteServer:server andFileOrFolderPath:fileName favorite:favorite withUserSessionToken:nil onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer, NSString *token) {
@@ -1103,7 +1103,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication readSharedByServer:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *items, NSString *redirectedServer) {
@@ -1136,7 +1136,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication shareFileOrFolderByServer:[tableAccount.url stringByAppendingString:@"/"] andFileOrFolderPath:[fileName encodeString:NSUTF8StringEncoding] andPassword:[password encodeString:NSUTF8StringEncoding] andPermission:permission andHideDownload:hideDownload onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *token, NSString *redirectedServer) {
@@ -1171,7 +1171,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication shareWith:userOrGroup shareeType:shareeType inServer:[tableAccount.url stringByAppendingString:@"/"] andFileOrFolderPath:[fileName encodeString:NSUTF8StringEncoding] andPermissions:permission onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -1204,7 +1204,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication updateShare:shareID ofServerPath:[tableAccount.url stringByAppendingString:@"/"] withPasswordProtect:[password encodeString:NSUTF8StringEncoding] andExpirationTime:expirationTime andPermissions:permission andHideDownload:hideDownload onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -1237,7 +1237,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication unShareFileOrFolderByServer:[tableAccount.url stringByAppendingString:@"/"] andIdRemoteShared:shareID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -1270,7 +1270,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication searchUsersAndGroupsWith:searchString forPage:1 with:50 ofServer:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *itemList, NSString *redirectedServer) {
@@ -1303,7 +1303,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getSharePermissionsFile:fileNamePath onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *permissions, NSString *redirectedServer) {
@@ -1328,7 +1328,7 @@
}
#pragma --------------------------------------------------------------------------------------------
-#pragma mark ===== API =====
+#pragma mark ===== VAR =====
#pragma --------------------------------------------------------------------------------------------
- (void)getActivityWithAccount:(NSString *)account since:(NSInteger)since limit:(NSInteger)limit link:(NSString *)link completion:(void(^)(NSString *account, NSArray *listOfActivity, NSString *message, NSInteger errorCode))completion
@@ -1347,7 +1347,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getActivityServer:[tableAccount.url stringByAppendingString:@"/"] since:since limit:limit previews:previews link:link onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *listOfActivity, NSString *redirectedServer) {
@@ -1380,7 +1380,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getExternalSitesServer:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *listOfExternalSites, NSString *redirectedServer) {
@@ -1404,43 +1404,6 @@
}];
}
-/*
-- (void)middlewarePing
-{
- OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
-
- [communication setCredentialsWithUser:_activeUser andPassword:_activePassword];
- [communication setUserAgent:[CCUtility getUserAgent]];
-
- [communication getMiddlewarePing:_metadataNet.serverUrl onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *listOfExternalSites, NSString *redirectedServer) {
-
- [self complete];
-
- } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
-
- NSInteger errorCode = response.statusCode;
- if (errorCode == 0 || (errorCode >= 200 && errorCode < 300))
- errorCode = error.code;
-
- // Error
- if ([self.delegate respondsToSelector:@selector(getExternalSitesServerFailure:message:errorCode:)]) {
-
- if (errorCode == 503)
- [self.delegate getExternalSitesServerFailure:_metadataNet message:NSLocalizedString(@"_server_error_retry_", nil) errorCode:errorCode];
- else
- [self.delegate getExternalSitesServerFailure:_metadataNet message:[error.userInfo valueForKey:@"NSLocalizedDescription"] errorCode:errorCode];
- }
-
- // Request trusted certificated
- if ([error code] == NSURLErrorServerCertificateUntrusted && self.delegate)
- [[CCCertificate sharedManager] presentViewControllerCertificateWithTitle:[error localizedDescription] viewController:(UIViewController *)self.delegate delegate:self];
-
- [self complete];
- }];
-
-}
-*/
-
- (void)getNotificationWithAccount:(NSString *)account completion:(void (^)(NSString *account, NSArray *listOfNotifications, NSString *message, NSInteger errorCode))completion
{
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
@@ -1450,7 +1413,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getNotificationServer:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *listOfNotifications, NSString *redirectedServer) {
@@ -1483,7 +1446,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication setNotificationServer:serverUrl type:type onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -1516,7 +1479,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getCapabilitiesOfServer:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, OCCapabilities *capabilities, NSString *redirectedServer) {
@@ -1549,7 +1512,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication getUserProfileServer:[tableAccount.url stringByAppendingString:@"/"] onCommunication:communication successRequest:^(NSHTTPURLResponse *response, OCUserProfile *userProfile, NSString *redirectedServer) {
@@ -1586,13 +1549,16 @@
devicePublicKey = [CCUtility URLEncodeStringFromString:devicePublicKey];
NSString *proxyServerPath = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
- //proxyServerPath = @"http://127.0.0.1:8088";
NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
- //proxyServer = @"https://10.132.0.37:8443/pushnotifications";
+
+#ifdef DEBUG
+ proxyServerPath = @"http://127.0.0.1:8088";
+ proxyServer = @"https://10.132.0.37:8443/pushnotifications";
+#endif
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication subscribingNextcloudServerPush:url pushTokenHash:pushTokenHash devicePublicKey:devicePublicKey proxyServerPath: proxyServerPath onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *publicKey, NSString *deviceIdentifier, NSString *signature, NSString *redirectedServer) {
@@ -1645,11 +1611,14 @@
}
NSString *proxyServer = [NCBrandOptions sharedInstance].pushNotificationServerProxy;
- //proxyServer = @"https://10.132.0.37:8443/pushnotifications";
+
+#ifdef DEBUG
+ proxyServer = @"https://10.132.0.37:8443/pushnotifications";
+#endif
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication unsubscribingNextcloudServerPush:url onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -1748,7 +1717,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication createLinkRichdocuments:[tableAccount.url stringByAppendingString:@"/"] fileID:fileIDServer onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *link, NSString *redirectedServer) {
@@ -1780,7 +1749,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication geTemplatesRichdocuments:[tableAccount.url stringByAppendingString:@"/"] typeTemplate:typeTemplate onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *listOfTemplate, NSString *redirectedServer) {
@@ -1812,7 +1781,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication createNewRichdocuments:[tableAccount.url stringByAppendingString:@"/"] path:fileName templateID:templateID onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *url, NSString *redirectedServer) {
@@ -1846,7 +1815,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication createAssetRichdocuments:[tableAccount.url stringByAppendingString:@"/"] path:fileNamePath onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *url, NSString *redirectedServer) {
@@ -1883,7 +1852,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication listingTrash:[serverUrl stringByAppendingString:path] depth:depth onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *items, NSString *redirectedServer) {
@@ -1960,7 +1929,7 @@
OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
- [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:tableAccount.password];
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
[communication setUserAgent:[CCUtility getUserAgent]];
[communication emptyTrash:path onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
@@ -1984,6 +1953,182 @@
}
#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Third Parts =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)getHCUserProfileWithAccount:(NSString *)account serverUrl:(NSString *)serverUrl completion:(void (^)(NSString *account, OCUserProfile *userProfile, NSString *message, NSInteger errorCode))completion
+{
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
+ if (tableAccount == nil) {
+ completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
+ }
+
+ NSString *serverPath = [NSString stringWithFormat:@"%@/ocs/v2.php/apps/handwerkcloud/api/v1/settings/%@", serverUrl, tableAccount.userID];
+
+ OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
+
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
+ [communication setUserAgent:[CCUtility getUserAgent]];
+
+ [communication getHCUserProfile:serverPath onCommunication:communication successRequest:^(NSHTTPURLResponse *response, OCUserProfile *userProfile, NSString *redirectedServer) {
+
+ completion(account, userProfile, nil, 0);
+
+ } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
+
+ NSString *message;
+
+ NSInteger errorCode = response.statusCode;
+ if (errorCode == 0 || (errorCode >= 200 && errorCode < 300))
+ errorCode = error.code;
+
+ // Error
+ if (errorCode == 503)
+ message = NSLocalizedString(@"_server_error_retry_", nil);
+ else
+ message = [error.userInfo valueForKey:@"NSLocalizedDescription"];
+
+ completion(account, nil,message, errorCode);
+ }];
+}
+
+- (void)putHCUserProfileWithAccount:(NSString *)account serverUrl:(NSString *)serverUrl address:(NSString *)address businesssize:(NSString *)businesssize businesstype:(NSString *)businesstype city:(NSString *)city company:(NSString *)company country:(NSString *)country displayname:(NSString *)displayname email:(NSString *)email phone:(NSString *)phone role_:(NSString *)role_ twitter:(NSString *)twitter website:(NSString *)website zip:(NSString *)zip completion:(void (^)(NSString *account, NSString *message, NSInteger errorCode))completion
+{
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
+ if (tableAccount == nil) {
+ completion(account, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
+ }
+
+ // Create JSON
+ NSMutableDictionary *dataDic = [NSMutableDictionary new];
+ if (address) [dataDic setValue:address forKey:@"address"];
+ if (businesssize) {
+ if ([businesssize isEqualToString:@"1-4"]) { [dataDic setValue:[NSNumber numberWithInt:1] forKey:@"businesssize"]; }
+ else if ([businesssize isEqualToString:@"5-9"]) { [dataDic setValue:[NSNumber numberWithInt:5] forKey:@"businesssize"]; }
+ else if ([businesssize isEqualToString:@"10-19"]) { [dataDic setValue:[NSNumber numberWithInt:10] forKey:@"businesssize"]; }
+ else if ([businesssize isEqualToString:@"20-49"]) { [dataDic setValue:[NSNumber numberWithInt:20] forKey:@"businesssize"]; }
+ else if ([businesssize isEqualToString:@"50-99"]) { [dataDic setValue:[NSNumber numberWithInt:50] forKey:@"businesssize"]; }
+ else if ([businesssize isEqualToString:@"100-249"]) { [dataDic setValue:[NSNumber numberWithInt:100] forKey:@"businesssize"]; }
+ else if ([businesssize isEqualToString:@"250-499"]) { [dataDic setValue:[NSNumber numberWithInt:250] forKey:@"businesssize"]; }
+ else if ([businesssize isEqualToString:@"500-999"]) { [dataDic setValue:[NSNumber numberWithInt:500] forKey:@"businesssize"]; }
+ else if ([businesssize isEqualToString:@"1000+"]) { [dataDic setValue:[NSNumber numberWithInt:1000] forKey:@"businesssize"]; }
+ }
+ if (businesstype) [dataDic setValue:businesstype forKey:@"businesstype"];
+ if (city) [dataDic setValue:city forKey:@"city"];
+ if (company) [dataDic setValue:company forKey:@"company"];
+ if (country) [dataDic setValue:country forKey:@"country"];
+ if (displayname) [dataDic setValue:displayname forKey:@"displayname"];
+ if (email) [dataDic setValue:email forKey:@"email"];
+ if (phone) [dataDic setValue:phone forKey:@"phone"];
+ if (role_) [dataDic setValue:role_ forKey:@"role"];
+ if (twitter) [dataDic setValue:twitter forKey:@"twitter"];
+ if (website) [dataDic setValue:website forKey:@"website"];
+ if (zip) [dataDic setValue:zip forKey:@"zip"];
+ NSString *data = [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:dataDic options:0 error:nil] encoding:NSUTF8StringEncoding];
+
+ NSString *serverPath = [NSString stringWithFormat:@"%@/ocs/v2.php/apps/handwerkcloud/api/v1/settings/%@", serverUrl, tableAccount.userID];
+
+ OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
+
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
+ [communication setUserAgent:[CCUtility getUserAgent]];
+
+ [communication putHCUserProfile:serverPath data:data onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSString *redirectedServer) {
+
+ completion(account, nil, 0);
+
+ } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
+
+ NSString *message;
+
+ NSInteger errorCode = response.statusCode;
+ if (errorCode == 0 || (errorCode >= 200 && errorCode < 300))
+ errorCode = error.code;
+
+ // Error
+ if (errorCode == 503)
+ message = NSLocalizedString(@"_server_error_retry_", nil);
+ else
+ message = [error.userInfo valueForKey:@"NSLocalizedDescription"];
+
+ completion(account, message, errorCode);
+ }];
+}
+
+- (void)getHCFeaturesWithAccount:(NSString *)account serverUrl:(NSString *)serverUrl completion:(void (^)(NSString *account, HCFeatures *features, NSString *message, NSInteger errorCode))completion
+{
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
+ if (tableAccount == nil) {
+ completion(account, nil, NSLocalizedString(@"_error_user_not_available_", nil), k_CCErrorUserNotAvailble);
+ }
+
+ NSString *serverPath = [NSString stringWithFormat:@"%@/ocs/v2.php/apps/handwerkcloud/api/v1/features/%@", serverUrl, tableAccount.userID];
+
+ OCCommunication *communication = [OCNetworking sharedManager].sharedOCCommunication;
+
+ [communication setCredentialsWithUser:tableAccount.user andUserID:tableAccount.userID andPassword:[CCUtility getPassword:account]];
+ [communication setUserAgent:[CCUtility getUserAgent]];
+
+ [communication getHCFeatures:serverPath onCommunication:communication successRequest:^(NSHTTPURLResponse *response, HCFeatures *features, NSString *redirectedServer) {
+
+ completion(account, features, nil, 0);
+
+ } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
+
+ NSString *message;
+
+ NSInteger errorCode = response.statusCode;
+ if (errorCode == 0 || (errorCode >= 200 && errorCode < 300))
+ errorCode = error.code;
+
+ // Error
+ if (errorCode == 503)
+ message = NSLocalizedString(@"_server_error_retry_", nil);
+ else
+ message = [error.userInfo valueForKey:@"NSLocalizedDescription"];
+
+ completion(account, nil,message, errorCode);
+ }];
+}
+
+/*
+ - (void)middlewarePing
+ {
+ OCCommunication *communication = [CCNetworking sharedNetworking].sharedOCCommunication;
+
+ [communication setCredentialsWithUser:_activeUser andPassword:_activePassword];
+ [communication setUserAgent:[CCUtility getUserAgent]];
+
+ [communication getMiddlewarePing:_metadataNet.serverUrl onCommunication:communication successRequest:^(NSHTTPURLResponse *response, NSArray *listOfExternalSites, NSString *redirectedServer) {
+
+ [self complete];
+
+ } failureRequest:^(NSHTTPURLResponse *response, NSError *error, NSString *redirectedServer) {
+
+ NSInteger errorCode = response.statusCode;
+ if (errorCode == 0 || (errorCode >= 200 && errorCode < 300))
+ errorCode = error.code;
+
+ // Error
+ if ([self.delegate respondsToSelector:@selector(getExternalSitesServerFailure:message:errorCode:)]) {
+
+ if (errorCode == 503)
+ [self.delegate getExternalSitesServerFailure:_metadataNet message:NSLocalizedString(@"_server_error_retry_", nil) errorCode:errorCode];
+ else
+ [self.delegate getExternalSitesServerFailure:_metadataNet message:[error.userInfo valueForKey:@"NSLocalizedDescription"] errorCode:errorCode];
+ }
+
+ // Request trusted certificated
+ if ([error code] == NSURLErrorServerCertificateUntrusted && self.delegate)
+ [[CCCertificate sharedManager] presentViewControllerCertificateWithTitle:[error localizedDescription] viewController:(UIViewController *)self.delegate delegate:self];
+
+ [self complete];
+ }];
+
+ }
+ */
+
+#pragma --------------------------------------------------------------------------------------------
#pragma mark ===== didReceiveChallenge =====
#pragma --------------------------------------------------------------------------------------------
diff --git a/iOSClient/Nextcloud-Bridging-Header.h b/iOSClient/Nextcloud-Bridging-Header.h
index 6d0cc8e27..ccd2b5062 100644
--- a/iOSClient/Nextcloud-Bridging-Header.h
+++ b/iOSClient/Nextcloud-Bridging-Header.h
@@ -13,7 +13,6 @@
#import "NCEndToEndEncryption.h"
#import "NYMnemonic.h"
#import "CCSynchronize.h"
-
#import "OCActivity.h"
#import "OCUserProfile.h"
#import "OCCapabilities.h"
@@ -23,3 +22,4 @@
#import "OCNotificationsAction.h"
#import "NCNetworkingEndToEnd.h"
#import "NCRichDocumentTemplate.h"
+#import "HCFeatures.h"
diff --git a/iOSClient/Notification/CCNotification.swift b/iOSClient/Notification/CCNotification.swift
index 04ad5c5de..c21501fbd 100644
--- a/iOSClient/Notification/CCNotification.swift
+++ b/iOSClient/Notification/CCNotification.swift
@@ -90,7 +90,7 @@ class CCNotification: UITableViewController {
let listOfNotifications = self.appDelegate.listOfNotifications as NSArray as! [OCNotifications]
- if let index = listOfNotifications.index(where: {$0.idNotification == notification.idNotification}) {
+ if let index = listOfNotifications.firstIndex(where: {$0.idNotification == notification.idNotification}) {
self.appDelegate.listOfNotifications.removeObject(at: index)
}
@@ -133,7 +133,7 @@ class CCNotification: UITableViewController {
let listOfNotifications = self.appDelegate.listOfNotifications as NSArray as! [OCNotifications]
- if let index = listOfNotifications.index(where: {$0.idNotification == notification.idNotification}) {
+ if let index = listOfNotifications.firstIndex(where: {$0.idNotification == notification.idNotification}) {
self.appDelegate.listOfNotifications.removeObject(at: index)
}
diff --git a/iOSClient/Offline/NCOffline.swift b/iOSClient/Offline/NCOffline.swift
index d4aa78922..328450a49 100644
--- a/iOSClient/Offline/NCOffline.swift
+++ b/iOSClient/Offline/NCOffline.swift
@@ -546,7 +546,7 @@ extension NCOffline: UICollectionViewDelegate {
metadataPush = metadata
if isEditMode {
- if let index = selectFileID.index(of: metadata.fileID) {
+ if let index = selectFileID.firstIndex(of: metadata.fileID) {
selectFileID.remove(at: index)
} else {
selectFileID.append(metadata.fileID)
diff --git a/iOSClient/Select/NCSelect.swift b/iOSClient/Select/NCSelect.swift
index a161df6f1..098fd4b45 100644
--- a/iOSClient/Select/NCSelect.swift
+++ b/iOSClient/Select/NCSelect.swift
@@ -526,7 +526,7 @@ extension NCSelect: UICollectionViewDelegate {
}
if isEditMode {
- if let index = selectFileID.index(of: metadata.fileID) {
+ if let index = selectFileID.firstIndex(of: metadata.fileID) {
selectFileID.remove(at: index)
} else {
selectFileID.append(metadata.fileID)
diff --git a/iOSClient/Settings/CCAdvanced.m b/iOSClient/Settings/CCAdvanced.m
index 69fa994b4..1333174b0 100755
--- a/iOSClient/Settings/CCAdvanced.m
+++ b/iOSClient/Settings/CCAdvanced.m
@@ -35,7 +35,7 @@
@implementation CCAdvanced
--(id)init
+- (id)init
{
XLFormDescriptor *form ;
XLFormSectionDescriptor *section;
@@ -86,6 +86,19 @@
[section addFormRow:row];
}
+ // Section : Privacy --------------------------------------------------------------
+
+ section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_privacy_", nil)];
+ [form addFormSection:section];
+ section.footerTitle = NSLocalizedString(@"_privacy_footer_", nil);
+
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"crashservice" rowType:XLFormRowDescriptorTypeBooleanSwitch title:NSLocalizedString(@"_crashservice_title_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"crashservice"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ if ([CCUtility getDisableCrashservice]) row.value = @"1";
+ else row.value = @"0";
+ [section addFormRow:row];
+
// Section CLEAR CACHE -------------------------------------------------
section = [XLFormSectionDescriptor formSection];
@@ -166,6 +179,19 @@
[CCUtility setDisableFilesApp:[[rowDescriptor.value valueData] boolValue]];
}
+
+ if ([rowDescriptor.tag isEqualToString:@"crashservice"]) {
+
+ [CCUtility setDisableCrashservice:[[rowDescriptor.value valueData] boolValue]];
+
+ UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"_crashservice_title_", nil) message:NSLocalizedString(@"_crashservice_alert_", nil) preferredStyle:UIAlertControllerStyleAlert];
+ UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"_ok_", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+ exit(0);
+ }];
+
+ [alertController addAction:okAction];
+ [self presentViewController:alertController animated:YES completion:nil];
+ }
}
#pragma --------------------------------------------------------------------------------------------
diff --git a/iOSClient/Settings/CCManageAccount.m b/iOSClient/Settings/CCManageAccount.m
index f95d5b7db..02fd515f7 100644
--- a/iOSClient/Settings/CCManageAccount.m
+++ b/iOSClient/Settings/CCManageAccount.m
@@ -22,7 +22,6 @@
//
#import <JDStatusBarNotification/JDStatusBarNotification.h>
-
#import "CCManageAccount.h"
#import "AppDelegate.h"
#import "CCLogin.h"
@@ -34,27 +33,37 @@
@interface CCManageAccount () <CCLoginDelegate, CCLoginDelegateWeb>
{
AppDelegate *appDelegate;
- tableAccount *_tableAccount;
}
@end
@implementation CCManageAccount
--(id)init
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
- XLFormDescriptor *form = [XLFormDescriptor formDescriptorWithTitle:NSLocalizedString(@"_credentials_", nil)];
- XLFormSectionDescriptor *section;
- XLFormRowDescriptor *row;
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
+ if (self) {
+
+ appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeTheming) name:@"changeTheming" object:nil];
+ }
+ return self;
+}
+
+- (void)initializeForm
+{
+ XLFormDescriptor *form = [XLFormDescriptor formDescriptor];
+ XLFormSectionDescriptor *section;
+ XLFormRowDescriptor *row;
+
NSArray *listAccount = [[NCManageDatabase sharedInstance] getAccounts];
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
- // Section : CLOUD ACCOUNT -------------------------------------------
+ // Section : ACCOUNTS -------------------------------------------
- section = [XLFormSectionDescriptor formSectionWithTitle:@"cloud account"];
+ section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_accounts_", nil)];
[form addFormSection:section];
form.rowNavigationOptions = XLFormRowNavigationOptionNone;
@@ -62,60 +71,42 @@
row.height = 100;
if (listAccount.count > 0) {
row.selectorOptions = listAccount;
- row.value = appDelegate.activeAccount;
+ row.value = tableAccount.account;
} else {
row.selectorOptions = [[NSArray alloc] initWithObjects:@"", nil];
}
- [section addFormRow:row];
-
- // Section : USER INFORMATION -------------------------------------------
- section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_personal_information_", nil)];
- [form addFormSection:section];
-
- // Full Name
- row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userfullname" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_full_name_", nil)];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
- [section addFormRow:row];
-
- // Address
- row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useraddress" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_address_", nil)];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
- [section addFormRow:row];
-
- // Phone
- row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userphone" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_phone_", nil)];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
- [section addFormRow:row];
-
- // Email
- row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useremail" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_email_", nil)];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
- [section addFormRow:row];
+ // Avatar
+ NSString *fileNamePath = [NSString stringWithFormat:@"%@/%@-%@.png", [CCUtility getDirectoryUserData], [CCUtility getStringUser:appDelegate.activeUser activeUrl:appDelegate.activeUrl], appDelegate.activeUser];
- // Web
- row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userweb" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_web_", nil)];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
- [section addFormRow:row];
+ UIImage *avatar = [UIImage imageWithContentsOfFile:fileNamePath];
+ if (avatar) {
+
+ avatar = [CCGraphics scaleImage:avatar toSize:CGSizeMake(40, 40) isAspectRation:YES];
+
+ CCAvatar *avatarImageView = [[CCAvatar alloc] initWithImage:avatar borderColor:[UIColor lightGrayColor] borderWidth:0.5];
+
+ CGSize imageSize = avatarImageView.bounds.size;
+ UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0);
+ CGContextRef context = UIGraphicsGetCurrentContext();
+ [avatarImageView.layer renderInContext:context];
+ avatar = UIGraphicsGetImageFromCurrentImageContext();
+ UIGraphicsEndImageContext();
+
+ } else {
+ avatar = [UIImage imageNamed:@"avatarBN"];
+ }
- // Twitter
- row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usertwitter" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_twitter_", nil)];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
- [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:avatar forKey:@"imageView.image"];
[section addFormRow:row];
-
+
// Section : MANAGE ACCOUNT -------------------------------------------
if ([NCBrandOptions sharedInstance].disable_manage_account == NO) {
-
+
section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_manage_account_", nil)];
[form addFormSection:section];
-
+
// Modify Account
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"changePassword" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_change_password_", nil)];
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
@@ -125,10 +116,10 @@
row.action.formSelector = @selector(changePassword:);
if (listAccount.count == 0) row.disabled = @YES;
[section addFormRow:row];
-
+
// Brand
if ([NCBrandOptions sharedInstance].disable_multiaccount == NO) {
-
+
// New Account nextcloud
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"addAccount" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_add_account_", nil)];
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
@@ -138,19 +129,169 @@
row.action.formSelector = @selector(addAccount:);
[section addFormRow:row];
}
-
+
// delete Account
row = [XLFormRowDescriptor formRowDescriptorWithTag:@"delAccount" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_delete_account_", nil)];
[row.cellConfig setObject:[UIColor redColor] forKey:@"textLabel.textColor"];
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
[row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"trash"] width:50 height:50 color:[UIColor redColor]] forKey:@"imageView.image"];
[row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
- row.action.formSelector = @selector(answerDelAccount:);
+ row.action.formSelector = @selector(deleteAccount:);
if (listAccount.count == 0) row.disabled = @YES;
[section addFormRow:row];
}
- return [super initWithForm:form];
+ // Section : USER INFORMATION -------------------------------------------
+
+ section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_personal_information_", nil)];
+ [form addFormSection:section];
+
+ // Full Name
+ if ([tableAccount.displayName length] > 0) {
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userfullname" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_full_name_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"user"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.displayName;
+ [section addFormRow:row];
+ }
+
+ // Address
+ if ([tableAccount.address length] > 0) {
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useraddress" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_address_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"address"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.address;
+ [section addFormRow:row];
+ }
+
+ // City + zip
+ if ([tableAccount.city length] > 0) {
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercity" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_city_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"city"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.city;
+ if ([tableAccount.zip length] > 0) {
+ row.value = [NSString stringWithFormat:@"%@ %@", row.value, tableAccount.zip];
+ }
+ [section addFormRow:row];
+ }
+
+ // Country
+ if ([tableAccount.country length] > 0) {
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercountry" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_country_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"country"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = [[NSLocale systemLocale] displayNameForKey:NSLocaleCountryCode value:tableAccount.country];
+ //NSArray *countryCodes = [NSLocale ISOCountryCodes];
+ [section addFormRow:row];
+ }
+
+ // Phone
+ if ([tableAccount.phone length] > 0) {
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userphone" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_phone_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"phone"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.phone;
+ [section addFormRow:row];
+ }
+
+ // Email
+ if ([tableAccount.email length] > 0) {
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"useremail" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_email_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"email"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.email;
+ [section addFormRow:row];
+ }
+
+ // Web
+ if ([tableAccount.webpage length] > 0) {
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userweb" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_web_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"web"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.webpage;
+ [section addFormRow:row];
+ }
+
+ // Twitter
+ if ([tableAccount.twitter length] > 0) {
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usertwitter" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_twitter_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"twitter"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.twitter;
+ [section addFormRow:row];
+ }
+
+ // Section : THIRT PART -------------------------------------------
+
+ if ([NCBrandOptions.sharedInstance.brandInitials isEqualToString:@"hc"]) {
+
+ section = [XLFormSectionDescriptor formSectionWithTitle:NSLocalizedString(@"_user_job_", nil)];
+ [form addFormSection:section];
+
+ // Business Type
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userbusinesstype" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_businesstype_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"businesstype"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.businessType;
+ [section addFormRow:row];
+
+ // Business Size
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userbusinesssize" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_businesssize_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"users"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.businessSize;
+ [section addFormRow:row];
+
+ // Role
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"userrole" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_role_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"role"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ if ([tableAccount.role isEqualToString:@"owner"]) row.value = NSLocalizedString(@"_user_owner_", nil);
+ else if ([tableAccount.role isEqualToString:@"employee"]) row.value = NSLocalizedString(@"_user_employee_", nil);
+ else if ([tableAccount.role isEqualToString:@"contractor"]) row.value = NSLocalizedString(@"_user_contractor_", nil);
+ else row.value = @"";
+ [section addFormRow:row];
+
+ // Company
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"usercompany" rowType:XLFormRowDescriptorTypeInfo title:NSLocalizedString(@"_user_company_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"detailTextLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"company"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ row.value = tableAccount.company;
+ [section addFormRow:row];
+
+ section = [XLFormSectionDescriptor formSection];
+ [form addFormSection:section];
+
+ // Edit profile
+ row = [XLFormRowDescriptor formRowDescriptorWithTag:@"editUserProfile" rowType:XLFormRowDescriptorTypeButton title:NSLocalizedString(@"_user_editprofile_", nil)];
+ [row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"editUserProfile"] width:50 height:50 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ [row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
+ [row.cellConfig setObject:[UIColor blackColor] forKey:@"textLabel.textColor"];
+ row.action.viewControllerClass = [HCEditProfile class];
+ if (listAccount.count == 0) row.disabled = @YES;
+ [section addFormRow:row];
+ }
+
+ self.form = form;
+
+ // Open Login
+ if (listAccount.count == 0) {
+ [appDelegate openLoginView:self delegate:self loginType:k_login_Add_Forced selector:k_intro_login];
+ }
}
// Apparirà
@@ -158,6 +299,8 @@
{
[super viewWillAppear:animated];
+ self.navigationItem.title = NSLocalizedString(@"_credentials_", nil);
+
self.tableView.backgroundColor = [NCBrandColor sharedInstance].backgroundView;
self.tableView.showsVerticalScrollIndicator = NO;
@@ -165,7 +308,7 @@
[appDelegate aspectNavigationControllerBar:self.navigationController.navigationBar online:[appDelegate.reachability isReachable] hidden:NO];
[appDelegate aspectTabBar:self.tabBarController.tabBar hidden:NO];
- [self UpdateForm];
+ [self initializeForm];
}
- (void)changeTheming
@@ -183,15 +326,15 @@
if ([rowDescriptor.tag isEqualToString:@"pickerAccount"] && oldValue && newValue) {
- if (![newValue isEqualToString:oldValue] && ![newValue isEqualToString:@""] && ![newValue isEqualToString:appDelegate.activeAccount])
+ if (![newValue isEqualToString:oldValue] && ![newValue isEqualToString:@""] && ![newValue isEqualToString:appDelegate.activeAccount]) {
[self ChangeDefaultAccount:newValue];
+ }
if ([newValue isEqualToString:@""]) {
-
NSArray *listAccount = [[NCManageDatabase sharedInstance] getAccounts];
-
- if ([listAccount count] > 0)
+ if ([listAccount count] > 0) {
[self ChangeDefaultAccount:listAccount[0]];
+ }
}
}
}
@@ -205,7 +348,6 @@
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
}
-
#pragma --------------------------------------------------------------------------------------------
#pragma mark === Add Account ===
#pragma --------------------------------------------------------------------------------------------
@@ -232,31 +374,7 @@
#pragma mark === Delete Account ===
#pragma --------------------------------------------------------------------------------------------
-- (void)deleteAccount:(NSString *)account
-{
- tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", account]];
- if (tableAccount) {
- [appDelegate unsubscribingNextcloudServerPushNotification:tableAccount.account url:tableAccount.url withSubscribing:false];
- }
-
- [[NCManageDatabase sharedInstance] clearTable:[tableAccount class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableActivity class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableActivitySubjectRich class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableCapabilities class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableDirectory class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableE2eEncryption class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableExternalSites class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableLocalFile class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableMetadata class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableMedia class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tablePhotoLibrary class] account:account];
- [[NCManageDatabase sharedInstance] clearTable:[tableShare class] account:account];
-
- // Clear active user
- [appDelegate settingActiveAccount:nil activeUrl:nil activeUser:nil activeUserID:nil activePassword:nil];
-}
-
-- (void)answerDelAccount:(XLFormRowDescriptor *)sender
+- (void)deleteAccount:(XLFormRowDescriptor *)sender
{
[self deselectFormRow:sender];
@@ -266,21 +384,38 @@
XLFormPickerCell *pickerAccount = (XLFormPickerCell *)[[self.form formRowWithTag:@"pickerAccount"] cellForFormController:self];
- NSString *accountNow = pickerAccount.rowDescriptor.value;
+ tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountWithPredicate:[NSPredicate predicateWithFormat:@"account == %@", pickerAccount.rowDescriptor.value]];
+
+ if (tableAccount) {
+
+ [appDelegate unsubscribingNextcloudServerPushNotification:tableAccount.account url:tableAccount.url withSubscribing:false];
+
+ [[NCManageDatabase sharedInstance] clearTable:[tableAccount class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableActivity class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableActivitySubjectRich class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableCapabilities class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableDirectory class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableE2eEncryption class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableExternalSites class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableLocalFile class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableMetadata class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableMedia class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tablePhotoLibrary class] account:tableAccount.account];
+ [[NCManageDatabase sharedInstance] clearTable:[tableShare class] account:tableAccount.account];
- [self deleteAccount:accountNow];
+ // Clear active user
+ [appDelegate settingActiveAccount:nil activeUrl:nil activeUser:nil activeUserID:nil activePassword:nil];
+ }
NSArray *listAccount = [[NCManageDatabase sharedInstance] getAccounts];
- if ([listAccount count] > 0)
+ if ([listAccount count] > 0) {
[self ChangeDefaultAccount:listAccount[0]];
- else {
- [appDelegate openLoginView:self delegate:self loginType:k_login_Add_Forced selector:k_intro_login];
+ } else {
+ [self initializeForm];
}
}]];
- [alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
- [alertController dismissViewControllerAnimated:YES completion:nil];
- }]];
+ [alertController addAction: [UIAlertAction actionWithTitle:NSLocalizedString(@"_cancel_", nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) { }]];
alertController.popoverPresentationController.sourceView = self.view;
NSIndexPath *indexPath = [self.form indexPathOfFormRow:sender];
@@ -298,99 +433,13 @@
tableAccount *tableAccount = [[NCManageDatabase sharedInstance] setAccountActive:account];
if (tableAccount) {
- [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:tableAccount.password];
+ [appDelegate settingActiveAccount:tableAccount.account activeUrl:tableAccount.url activeUser:tableAccount.user activeUserID:tableAccount.userID activePassword:[CCUtility getPassword:tableAccount.account]];
// Init home
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"initializeMain" object:nil userInfo:nil];
-
- [self UpdateForm];
- }
-}
-
-#pragma --------------------------------------------------------------------------------------------
-#pragma mark === Update Form ===
-#pragma --------------------------------------------------------------------------------------------
-
-- (void)UpdateForm
-{
- NSArray *listAccount = [[NCManageDatabase sharedInstance] getAccounts];
-
- if (listAccount.count == 0) {
- [appDelegate openLoginView:self delegate:self loginType:k_login_Add_Forced selector:k_intro_login];
- return;
- }
-
- XLFormPickerCell *pickerAccount = (XLFormPickerCell *)[[self.form formRowWithTag:@"pickerAccount"] cellForFormController:self];
-
- pickerAccount.rowDescriptor.selectorOptions = listAccount;
- pickerAccount.rowDescriptor.value = appDelegate.activeAccount;
-
- NSString *fileNamePath = [NSString stringWithFormat:@"%@/%@-%@.png", [CCUtility getDirectoryUserData], [CCUtility getStringUser:appDelegate.activeUser activeUrl:appDelegate.activeUrl], appDelegate.activeUser];
-
- UIImage *avatar = [UIImage imageWithContentsOfFile:fileNamePath];
- if (avatar) {
-
- avatar = [CCGraphics scaleImage:avatar toSize:CGSizeMake(40, 40) isAspectRation:YES];
-
- CCAvatar *avatarImageView = [[CCAvatar alloc] initWithImage:avatar borderColor:[UIColor lightGrayColor] borderWidth:0.5];
-
- CGSize imageSize = avatarImageView.bounds.size;
- UIGraphicsBeginImageContextWithOptions(imageSize, NO, 0);
- CGContextRef context = UIGraphicsGetCurrentContext();
- [avatarImageView.layer renderInContext:context];
- avatar = UIGraphicsGetImageFromCurrentImageContext();
- UIGraphicsEndImageContext();
-
- } else {
-
- avatar = [UIImage imageNamed:@"avatarBN"];
}
- [pickerAccount.rowDescriptor.cellConfig setObject:avatar forKey:@"imageView.image"];
-
- // --
-
- _tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
-
- XLFormRowDescriptor *rowUserFullName = [self.form formRowWithTag:@"userfullname"];
- XLFormRowDescriptor *rowUserAddress = [self.form formRowWithTag:@"useraddress"];
- XLFormRowDescriptor *rowUserPhone = [self.form formRowWithTag:@"userphone"];
- XLFormRowDescriptor *rowUserEmail = [self.form formRowWithTag:@"useremail"];
- XLFormRowDescriptor *rowUserWeb = [self.form formRowWithTag:@"userweb"];
- XLFormRowDescriptor *rowUserTwitter = [self.form formRowWithTag:@"usertwitter"];
-
- rowUserFullName.value = _tableAccount.displayName;
- if ([_tableAccount.displayName isEqualToString:@""] || _tableAccount.displayName == nil) rowUserFullName.hidden = @YES;
- else rowUserFullName.hidden = @NO;
-
- rowUserAddress.value = _tableAccount.address;
- if ([_tableAccount.address isEqualToString:@""] || _tableAccount.address == nil) rowUserAddress.hidden = @YES;
- else rowUserAddress.hidden = @NO;
-
- rowUserPhone.value = _tableAccount.phone;
- if ([_tableAccount.phone isEqualToString:@""] || _tableAccount.phone == nil) rowUserPhone.hidden = @YES;
- else rowUserPhone.hidden = @NO;
-
- rowUserEmail.value = _tableAccount.email;
- if ([_tableAccount.email isEqualToString:@""] || _tableAccount.email == nil) rowUserEmail.hidden = @YES;
- else rowUserEmail.hidden = @NO;
-
- rowUserWeb.value = _tableAccount.webpage;
- if ([_tableAccount.webpage isEqualToString:@""] || _tableAccount.webpage == nil) rowUserWeb.hidden = @YES;
- else rowUserWeb.hidden = @NO;
-
- rowUserTwitter.value = _tableAccount.twitter;
- if ([_tableAccount.twitter isEqualToString:@""] || _tableAccount.twitter == nil) rowUserTwitter.hidden = @YES;
- else rowUserTwitter.hidden = @NO;
-
- [self.tableView reloadData];
-
- [self performSelector:@selector(reloadData) withObject:nil afterDelay:1];
-}
-
-- (void)reloadData
-{
- [self.tableView reloadData];
+ [self initializeForm];
}
@end
diff --git a/iOSClient/Settings/CCSettings.m b/iOSClient/Settings/CCSettings.m
index 3bce6c980..2e6aa153a 100644
--- a/iOSClient/Settings/CCSettings.m
+++ b/iOSClient/Settings/CCSettings.m
@@ -163,7 +163,7 @@
[row.cellConfig setObject:[UIColor blackColor] forKey:@"textLabel.textColor"];
[row.cellConfig setObject:@(NSTextAlignmentLeft) forKey:@"textLabel.textAlignment"];
[row.cellConfig setObject:[UIFont systemFontOfSize:15.0]forKey:@"textLabel.font"];
- [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"mail"] multiplier:2 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
+ [row.cellConfig setObject:[CCGraphics changeThemingColorImage:[UIImage imageNamed:@"email"] multiplier:2 color:[NCBrandColor sharedInstance].icon] forKey:@"imageView.image"];
row.action.formSelector = @selector(sendMail:);
[section addFormRow:row];
*/
@@ -200,8 +200,8 @@
{
self.form.delegate = nil;
- // ----------------------
-
+ // ------------------------------------------------------------------
+
XLFormRowDescriptor *rowBloccoPasscode = [self.form formRowWithTag:@"bloccopasscode"];
XLFormRowDescriptor *rowSimplyPasscode = [self.form formRowWithTag:@"simplypasscode"];
XLFormRowDescriptor *rowOnlyLockDir = [self.form formRowWithTag:@"onlylockdir"];
diff --git a/iOSClient/Settings/HCEditProfile.swift b/iOSClient/Settings/HCEditProfile.swift
new file mode 100644
index 000000000..065c23237
--- /dev/null
+++ b/iOSClient/Settings/HCEditProfile.swift
@@ -0,0 +1,318 @@
+//
+// HCEditProfile.swift
+// Nextcloud iOS
+//
+// Created by Marino Faggiana on 17/04/19.
+// Copyright (c) 2019 Marino Faggiana. All rights reserved.
+//
+// Author Marino Faggiana <marino.faggiana@nextcloud.com>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+import Foundation
+
+class HCEditProfile: XLFormViewController {
+
+ let appDelegate = UIApplication.shared.delegate as! AppDelegate
+ var tableAccount: tableAccount!
+
+ required init(coder aDecoder: NSCoder) {
+ super.init(coder: aDecoder)
+ }
+
+ override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
+ super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
+ }
+
+ func initializeForm() {
+
+ let form : XLFormDescriptor = XLFormDescriptor() as XLFormDescriptor
+ form.rowNavigationOptions = XLFormRowNavigationOptions.stopDisableRow
+
+ var section : XLFormSectionDescriptor
+ var row : XLFormRowDescriptor
+
+ tableAccount = NCManageDatabase.sharedInstance.getAccountActive()
+
+ section = XLFormSectionDescriptor.formSection()
+ form.addFormSection(section)
+
+ row = XLFormRowDescriptor(tag: "userfullname", rowType: XLFormRowDescriptorTypeText, title: NSLocalizedString("_user_full_name_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "user"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.displayName
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "useraddress", rowType: XLFormRowDescriptorTypeText, title: NSLocalizedString("_user_address_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "address"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.address
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "usercity", rowType: XLFormRowDescriptorTypeText, title: NSLocalizedString("_user_city_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "city"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.city
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "userzip", rowType: XLFormRowDescriptorTypeZipCode, title: NSLocalizedString("_user_zip_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "cityzip"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.zip
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "usercountry", rowType: XLFormRowDescriptorTypeSelectorPickerView, title: NSLocalizedString("_user_country_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["detailTextLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "country"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ var locales = [String]()
+ for localeCode in NSLocale.isoCountryCodes {
+ let countryName = (Locale.current as NSLocale).displayName(forKey: .countryCode, value: localeCode) ?? ""
+ if localeCode == tableAccount.country {
+ row.value = countryName
+ }
+ locales.append(countryName)
+ }
+ row.selectorOptions = locales.sorted()
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "userphone", rowType: XLFormRowDescriptorTypePhone, title: NSLocalizedString("_user_phone_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "phone"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.phone
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "useremail", rowType: XLFormRowDescriptorTypeEmail, title: NSLocalizedString("_user_email_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "email"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.email
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "userweb", rowType: XLFormRowDescriptorTypeEmail, title: NSLocalizedString("_user_web_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "web"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.webpage
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "usertwitter", rowType: XLFormRowDescriptorTypeTwitter, title: NSLocalizedString("_user_twitter_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "twitter"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.twitter
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "userbusinesstype", rowType: XLFormRowDescriptorTypeMultipleSelector, title: NSLocalizedString("_user_businesstype_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["detailTextLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "businesstype"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.selectorOptions = ["ARCHITECT", "BRICKLAYER", "CARPENTER", "ELECTRICIAN", "INSTALLER", "PAINTER", "PLUMBER", "ROOFER", "STOVEBUILDER","STUCCOER", "WINDOWBUILDER", "OTHER"]
+ row.value = tableAccount.businessType.components(separatedBy: ",")
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "userbusinesssize", rowType: XLFormRowDescriptorTypeSelectorPickerView, title: NSLocalizedString("_user_businesssize_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["detailTextLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "users"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.selectorOptions = ["1-4", "5-9", "10-19", "20-49", "50-99", "100-249", "250-499", "500-999", "1000+"];
+ row.value = tableAccount.businessSize;
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "userrole", rowType: XLFormRowDescriptorTypeSelectorPickerView, title: NSLocalizedString("_user_role_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["detailTextLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "role"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.selectorOptions = [NSLocalizedString("_user_owner_", comment: ""),NSLocalizedString("_user_employee_", comment: ""),NSLocalizedString("_user_contractor_", comment: "")];
+ if tableAccount.role == "owner" { row.value = NSLocalizedString("_user_owner_", comment: "") }
+ else if tableAccount.role == "employee" { row.value = NSLocalizedString("_user_employee_", comment: "") }
+ else if tableAccount.role == "contractor" { row.value = NSLocalizedString("_user_contractor_", comment: "") }
+ else { row.value = "" }
+ section.addFormRow(row)
+
+ row = XLFormRowDescriptor(tag: "usercompany", rowType: XLFormRowDescriptorTypeText, title: NSLocalizedString("_user_company_", comment: ""))
+ row.cellConfig["textLabel.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.font"] = UIFont.systemFont(ofSize: 15.0)
+ row.cellConfig["textField.textAlignment"] = NSTextAlignment.right.rawValue
+ row.cellConfig["imageView.image"] = CCGraphics.changeThemingColorImage(UIImage.init(named: "company"), width: 50, height: 50, color: NCBrandColor.sharedInstance.icon)
+ row.value = tableAccount.company
+ if row.value == nil { row.value = "" }
+ section.addFormRow(row)
+
+ self.form = form
+ }
+
+ override func formRowDescriptorValueHasChanged(_ formRow: XLFormRowDescriptor!, oldValue: Any!, newValue: Any!) {
+ super.formRowDescriptorValueHasChanged(formRow, oldValue: oldValue, newValue: newValue)
+
+ }
+
+ // MARK: - View Life Cycle
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ self.navigationItem.title = NSLocalizedString("_user_editprofile_", comment: "")
+
+ self.navigationController?.navigationBar.isTranslucent = false
+ self.navigationController?.navigationBar.barTintColor = NCBrandColor.sharedInstance.brand
+ self.navigationController?.navigationBar.tintColor = NCBrandColor.sharedInstance.brandText
+ self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: NCBrandColor.sharedInstance.brandText]
+
+ self.navigationController?.interactivePopGestureRecognizer?.isEnabled = false
+
+ self.navigationItem.setHidesBackButton(true, animated: false)
+ self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_save_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(save))
+ self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(cancel))
+
+ self.tableView.separatorStyle = UITableViewCell.SeparatorStyle.none
+ self.tableView.backgroundColor = NCBrandColor.sharedInstance.backgroundView
+ self.tableView.showsVerticalScrollIndicator = false
+
+ initializeForm()
+ }
+
+ @objc func cancel() {
+ self.navigationController?.popViewController(animated: true)
+ self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
+ }
+
+ @objc func save() {
+
+ NCUtility.sharedInstance.startActivityIndicator(view: self.view, bottom: 0)
+
+ // Full name
+ if self.form.formRow(withTag: "userfullname")?.value == nil {
+ tableAccount.displayName = ""
+ } else {
+ tableAccount.displayName = self.form.formRow(withTag: "userfullname")?.value as! String
+ }
+
+ // Address
+ if self.form.formRow(withTag: "useraddress")?.value == nil {
+ tableAccount.address = ""
+ } else {
+ tableAccount.address = self.form.formRow(withTag: "useraddress")?.value as! String
+ }
+
+ // City
+ if self.form.formRow(withTag: "usercity")?.value == nil {
+ tableAccount.city = ""
+ } else {
+ tableAccount.city = self.form.formRow(withTag: "usercity")?.value as! String
+ }
+
+ // Zip
+ if self.form.formRow(withTag: "userzip")?.value == nil {
+ tableAccount.zip = ""
+ } else {
+ tableAccount.zip = self.form.formRow(withTag: "userzip")?.value as! String
+ }
+
+ let countryNameRow = self.form.formRow(withTag: "usercountry")!.value as? String
+ for localeCode in NSLocale.isoCountryCodes {
+ let countryName = (Locale.current as NSLocale).displayName(forKey: .countryCode, value: localeCode) ?? ""
+ if countryNameRow == countryName {
+ tableAccount.country = localeCode
+ break
+ }
+ }
+
+ // Phone
+ if self.form.formRow(withTag: "userphone")?.value == nil {
+ tableAccount.phone = ""
+ } else {
+ tableAccount.phone = self.form.formRow(withTag: "userphone")?.value as! String
+ }
+
+ // Email
+ if self.form.formRow(withTag: "useremail")?.value == nil {
+ tableAccount.email = ""
+ } else {
+ tableAccount.email = self.form.formRow(withTag: "useremail")?.value as! String
+ }
+
+ // Web
+ if self.form.formRow(withTag: "userweb")?.value == nil {
+ tableAccount.webpage = ""
+ } else {
+ tableAccount.webpage = self.form.formRow(withTag: "userweb")?.value as! String
+ }
+
+ // Twitter
+ if self.form.formRow(withTag: "usertwitter")?.value == nil {
+ tableAccount.twitter = ""
+ } else {
+ tableAccount.twitter = self.form.formRow(withTag: "usertwitter")?.value as! String
+ }
+
+ // Company
+ if self.form.formRow(withTag: "usercompany")?.value == nil {
+ tableAccount.company = ""
+ } else {
+ tableAccount.company = self.form.formRow(withTag: "usercompany")?.value as! String
+ }
+
+ tableAccount.businessSize = self.form.formRow(withTag: "userbusinesssize")!.value as! String
+
+ let roleRow = self.form.formRow(withTag: "userrole")!.value as! String
+ switch roleRow {
+ case NSLocalizedString("_user_owner_", comment: ""): tableAccount.role = "owner"
+ case NSLocalizedString("_user_employee_", comment: ""): tableAccount.role = "employee"
+ case NSLocalizedString("_user_contractor_", comment: ""): tableAccount.role = "contractor"
+ default: break
+ }
+
+ let businesstypeArray = self.form.formRow(withTag: "userbusinesstype")!.value
+ tableAccount.businessType = (businesstypeArray as! [String]).joined(separator: ",")
+ if tableAccount.businessType.first == "," {
+ tableAccount.businessType.removeFirst()
+ }
+
+ OCNetworking.sharedManager()?.putHCUserProfile(withAccount: appDelegate.activeAccount, serverUrl: appDelegate.activeUrl, address: tableAccount.address, businesssize: tableAccount.businessSize, businesstype: tableAccount.businessType, city: tableAccount.city, company: tableAccount.company, country: tableAccount.country, displayname: tableAccount.displayName, email: tableAccount.email, phone: tableAccount.phone, role_: tableAccount.role, twitter: tableAccount.twitter, website: tableAccount.webpage, zip: tableAccount.zip, completion: { (account, message, errorCode) in
+ if errorCode == 0 && account == self.appDelegate.activeAccount {
+ NCManageDatabase.sharedInstance.updateAccount(self.tableAccount)
+ self.navigationController?.popViewController(animated: true)
+ self.navigationController?.interactivePopGestureRecognizer?.isEnabled = true
+ } else if errorCode != 0 {
+ self.appDelegate.messageNotification("_error_", description: message, visible: true, delay: TimeInterval(k_dismissAfterSecond), type: TWMessageBarMessageType.error, errorCode: errorCode)
+ }
+ NCUtility.sharedInstance.stopActivityIndicator()
+ })
+ }
+}
diff --git a/iOSClient/Supporting Files/ast.lproj/Localizable.strings b/iOSClient/Supporting Files/ast.lproj/Localizable.strings
index f56e44516..8fcd68a65 100644
--- a/iOSClient/Supporting Files/ast.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ast.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ca.lproj/Localizable.strings b/iOSClient/Supporting Files/ca.lproj/Localizable.strings
index 5b81d0950..5a054dd67 100644
--- a/iOSClient/Supporting Files/ca.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ca.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings b/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings
index 9023da17f..54cdd5269 100644
--- a/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/cs-CZ.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/da.lproj/Localizable.strings b/iOSClient/Supporting Files/da.lproj/Localizable.strings
index 7838c3b6d..6c75ca8d8 100644
--- a/iOSClient/Supporting Files/da.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/da.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/de.lproj/Localizable.strings b/iOSClient/Supporting Files/de.lproj/Localizable.strings
index 7c3bfd33e..eb561b47c 100644
--- a/iOSClient/Supporting Files/de.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/de.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/el.lproj/Localizable.strings b/iOSClient/Supporting Files/el.lproj/Localizable.strings
index 872938998..5567c362c 100644
--- a/iOSClient/Supporting Files/el.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/el.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings b/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings
index a9e1578b4..cd5f4ccd8 100644
--- a/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/en-GB.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/en.lproj/Localizable.strings b/iOSClient/Supporting Files/en.lproj/Localizable.strings
index c7612afbf..55051fb4f 100755
--- a/iOSClient/Supporting Files/en.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/en.lproj/Localizable.strings
@@ -98,6 +98,7 @@
"_no_albums_" = "No albums";
"_denied_album_" = "This app does not have access to \"Photos\", you can enable access in Privacy Settings";
"_denied_camera_" = "This app does not have access to \"Camera\", you can enable access in Privacy Settings";
+"_start_" = "Start";
// App
@@ -177,7 +178,7 @@
"_change_simply_passcode_" = "Change password type";
"_quota_" = "Quota";
"_available_" = "available";
-"_cloud_account_" = "Cloud Account";
+"_accounts_" = "Accounts";
"_information_" = "Information";
"_personal_information_" = "Personal info";
"_user_full_name_" = "Full name";
@@ -186,11 +187,21 @@
"_user_email_" = "Email";
"_user_web_" = "Website";
"_user_twitter_" = "Twitter";
+"_user_job_" = "Job";
+"_user_businesssize_" = "Business size";
+"_user_businesstype_" = "Business type";
+"_user_city_" = "City";
+"_user_country_" = "Country";
+"_user_company_" = "Company";
+"_user_role_" = "Role";
+"_user_zip_" = "Zip";
+"_user_owner_" = "Owner";
+"_user_employee_" = "Employee";
+"_user_contractor_" = "Contractor";
+"_user_editprofile_" = "Edit profile";
"_favorite_offline_" = "Favorites available offline";
"_favorite_offline_footer_" = "Making all favorites available offline may take a while and use a lot of memory while doing it.";
"_advanced_" = "Advanced";
-"Skip" = "Skip";
-"Start" = "Start";
"_disable_files_app_" = "Disable Files App integration";
"_disable_files_app_footer_" = "Do not permit the access of files across the Apple Files application";
@@ -234,6 +245,10 @@
"_show_hidden_files_" = "Show hidden files";
"_format_compatibility_" = "Most Compatible";
"_format_compatibility_footer_" = "\"Most compatible\" will save, when possible, photos as JPEG";
+"_privacy_" = "Privacy";
+"_privacy_footer_" = "Nextcloud iOS uses a service for the analysis of a crash. Your personal information is not sent with the report. If you want disable it, please change the setting "Disable crash reporter" to ON;
+"_crashservice_title_" = "Disable crash reporter";
+"_crashservice_alert_" = "This option requires a restart of the app to take effect";
// Login
diff --git a/iOSClient/Supporting Files/es-419.lproj/Localizable.strings b/iOSClient/Supporting Files/es-419.lproj/Localizable.strings
index 00e22f00b..2392878b2 100644
--- a/iOSClient/Supporting Files/es-419.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-419.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings
index 3b2b75a27..f4d970185 100644
--- a/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-AR.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings
index 3638df56c..31143a514 100644
--- a/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-CL.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings
index 3638df56c..31143a514 100644
--- a/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-CO.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings
index 3638df56c..31143a514 100644
--- a/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-CR.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings b/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings
index 3638df56c..31143a514 100644
--- a/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-DO.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings b/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings
index 3638df56c..31143a514 100644
--- a/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-EC.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings b/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings
index 3638df56c..31143a514 100644
--- a/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-GT.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings b/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings
index 00e22f00b..2392878b2 100644
--- a/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-HN.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings b/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings
index 0563d7aad..170414881 100644
--- a/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-MX.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings b/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings
index 00e22f00b..2392878b2 100644
--- a/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-NI.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings
index 00e22f00b..2392878b2 100644
--- a/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-PA.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings
index 00e22f00b..2392878b2 100644
--- a/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-PE.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings
index 00e22f00b..2392878b2 100644
--- a/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-PR.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings b/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings
index 00e22f00b..2392878b2 100644
--- a/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-PY.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings b/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings
index 3638df56c..31143a514 100644
--- a/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-SV.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings b/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings
index 00e22f00b..2392878b2 100644
--- a/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es-UY.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/es.lproj/Localizable.strings b/iOSClient/Supporting Files/es.lproj/Localizable.strings
index 383895ea2..267980d86 100644
--- a/iOSClient/Supporting Files/es.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/es.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/eu.lproj/Localizable.strings b/iOSClient/Supporting Files/eu.lproj/Localizable.strings
index a553761c9..bc5fa91ee 100644
--- a/iOSClient/Supporting Files/eu.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/eu.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/fa.lproj/Localizable.strings b/iOSClient/Supporting Files/fa.lproj/Localizable.strings
index 9d2e889a3..787b39358 100644
--- a/iOSClient/Supporting Files/fa.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/fa.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings b/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings
index 1d79b5e4c..8e091939c 100644
--- a/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/fi-FI.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/fr.lproj/Localizable.strings b/iOSClient/Supporting Files/fr.lproj/Localizable.strings
index 6565e964e..610c15084 100644
--- a/iOSClient/Supporting Files/fr.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/fr.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/gl.lproj/Localizable.strings b/iOSClient/Supporting Files/gl.lproj/Localizable.strings
index 7d35ce787..d735ebdc6 100644
--- a/iOSClient/Supporting Files/gl.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/gl.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/hu.lproj/Localizable.strings b/iOSClient/Supporting Files/hu.lproj/Localizable.strings
index 2871132dd..4de11d9de 100644
--- a/iOSClient/Supporting Files/hu.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/hu.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/is.lproj/Localizable.strings b/iOSClient/Supporting Files/is.lproj/Localizable.strings
index 37553d5b9..4a3c51a20 100644
--- a/iOSClient/Supporting Files/is.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/is.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/it.lproj/Localizable.strings b/iOSClient/Supporting Files/it.lproj/Localizable.strings
index ef5202950..35336e0d2 100644
--- a/iOSClient/Supporting Files/it.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/it.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings b/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings
index c818b64ac..defc67bb0 100644
--- a/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ja-JP.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings b/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings
index 3c019fa62..5e4971942 100644
--- a/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ka-GE.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ko.lproj/Localizable.strings b/iOSClient/Supporting Files/ko.lproj/Localizable.strings
index 6e4579c82..eaf01eb09 100644
--- a/iOSClient/Supporting Files/ko.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ko.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings b/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings
index 27ea7ace5..d35dce6e7 100644
--- a/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/lt_LT.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings b/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings
index 306afa5ad..4a67fa315 100644
--- a/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/nb-NO.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/nl.lproj/Localizable.strings b/iOSClient/Supporting Files/nl.lproj/Localizable.strings
index b95bcd9b6..4f71ea5f7 100644
--- a/iOSClient/Supporting Files/nl.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/nl.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/pl.lproj/Localizable.strings b/iOSClient/Supporting Files/pl.lproj/Localizable.strings
index 863f9d673..8d90cd57d 100644
--- a/iOSClient/Supporting Files/pl.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/pl.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings b/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings
index b55fdd67d..c6d823576 100644
--- a/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/pt-BR.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings b/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings
index bfab251bf..1cc899ffc 100644
--- a/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/pt-PT.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/ru.lproj/Localizable.strings b/iOSClient/Supporting Files/ru.lproj/Localizable.strings
index 24f08045c..3c49a3ae6 100644
--- a/iOSClient/Supporting Files/ru.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/ru.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings b/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings
index 4862fc919..14cd9f806 100644
--- a/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sk-SK.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sq.lproj/Localizable.strings b/iOSClient/Supporting Files/sq.lproj/Localizable.strings
index 3c7b5c05f..23865bbd5 100644
--- a/iOSClient/Supporting Files/sq.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sq.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sr.lproj/Localizable.strings b/iOSClient/Supporting Files/sr.lproj/Localizable.strings
index 82d635253..e65369b0c 100644
--- a/iOSClient/Supporting Files/sr.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sr.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/sv.lproj/Localizable.strings b/iOSClient/Supporting Files/sv.lproj/Localizable.strings
index 4fd2675a2..85a0ffa34 100644
--- a/iOSClient/Supporting Files/sv.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/sv.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/tr.lproj/Localizable.strings b/iOSClient/Supporting Files/tr.lproj/Localizable.strings
index 1280249e4..446735c5d 100644
--- a/iOSClient/Supporting Files/tr.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/tr.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings b/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings
index 1bf3ae674..e97415faa 100644
--- a/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/zh-Hans.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings b/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings
index fffa156f3..23c38833a 100644
--- a/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings
+++ b/iOSClient/Supporting Files/zh-Hant-TW.lproj/Localizable.strings
Binary files differ
diff --git a/iOSClient/Transfers/CCTransfers.m b/iOSClient/Transfers/CCTransfers.m
index 7c0990545..076b62775 100644
--- a/iOSClient/Transfers/CCTransfers.m
+++ b/iOSClient/Transfers/CCTransfers.m
@@ -40,6 +40,7 @@
// Datasource
CCSectionDataSourceMetadata *sectionDataSource;
+ tableMetadata *metadataForRecognizer;
}
@end
@@ -79,6 +80,10 @@
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.backgroundColor = [NCBrandColor sharedInstance].backgroundView;
+ // long press recognizer TableView
+ UILongPressGestureRecognizer* longPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(onLongPressTableView:)];
+ [self.tableView addGestureRecognizer:longPressRecognizer];
+
self.title = NSLocalizedString(@"_transfers_", nil);
[self reloadDatasource:nil action:k_action_NULL];
@@ -145,6 +150,61 @@
}
#pragma --------------------------------------------------------------------------------------------
+#pragma mark ===== Long Press Recognized Table View =====
+#pragma --------------------------------------------------------------------------------------------
+
+- (void)onLongPressTableView:(UILongPressGestureRecognizer*)recognizer
+{
+ if (recognizer.state == UIGestureRecognizerStateBegan) {
+
+ CGPoint touchPoint = [recognizer locationInView:self.tableView];
+ NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:touchPoint];
+
+ metadataForRecognizer = [[NCMainCommon sharedInstance] getMetadataFromSectionDataSourceIndexPath:indexPath sectionDataSource:sectionDataSource];
+
+ [self becomeFirstResponder];
+
+ UIMenuController *menuController = [UIMenuController sharedMenuController];
+
+ UIMenuItem *startTaskItem = [[UIMenuItem alloc] initWithTitle:NSLocalizedString(@"_start_", nil) action:@selector(startTask:)];
+
+ [menuController setMenuItems:[NSArray arrayWithObjects:startTaskItem, nil]];
+
+ [menuController setTargetRect:CGRectMake(touchPoint.x, touchPoint.y, 0.0f, 0.0f) inView:self.tableView];
+ [menuController setMenuVisible:YES animated:YES];
+ }
+}
+
+- (BOOL)canBecomeFirstResponder
+{
+ return YES;
+}
+
+- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
+{
+ if (@selector(startTask:) != action) return NO;
+ if (metadataForRecognizer == nil) return NO;
+
+ // Detect E2EE
+ NSString *saveserverUrl = @"";
+ NSArray *metadatasForE2EE = [[NCManageDatabase sharedInstance] getMetadatasWithPredicate:[NSPredicate predicateWithFormat:@"status != %d", k_metadataStatusNormal] sorted:@"serverUrl" ascending:NO];
+ for (tableMetadata *metadata in metadatasForE2EE) {
+ if (![saveserverUrl isEqualToString:metadata.serverUrl]) {
+ saveserverUrl = metadata.serverUrl;
+ if ([[NCManageDatabase sharedInstance] getTableDirectoryWithPredicate:[NSPredicate predicateWithFormat:@"account == %@ AND serverUrl == %@ AND e2eEncrypted == 1", metadata.account, metadata.serverUrl]] != nil) {
+ return NO;
+ }
+ }
+ }
+
+ if (!([metadataForRecognizer.session isEqualToString:k_upload_session_extension]) &&(metadataForRecognizer.status == k_metadataStatusWaitUpload || metadataForRecognizer.status == k_metadataStatusUploading)) {
+ return YES;
+ }
+
+ return NO;
+}
+
+#pragma --------------------------------------------------------------------------------------------
#pragma mark - ===== Progress & Task Button =====
#pragma --------------------------------------------------------------------------------------------
@@ -159,7 +219,7 @@
{
UITouch * touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:self.tableView];
- NSIndexPath * indexPath = [self.tableView indexPathForRowAtPoint:location];
+ NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:location];
if (indexPath) {
@@ -167,7 +227,7 @@
tableMetadata *metadata = [[NCManageDatabase sharedInstance] getMetadataWithPredicate:[NSPredicate predicateWithFormat:@"fileID = %@", fileID]];
if (metadata)
- [[NCMainCommon sharedInstance] cancelTransferMetadata:metadata reloadDatasource:true];
+ [[NCMainCommon sharedInstance] cancelTransferMetadata:metadata reloadDatasource:true uploadStatusForcedStart:false];
}
}
@@ -193,6 +253,17 @@
[self presentViewController:alertController animated:YES completion:nil];
}
+- (void)startTask:(id)sender
+{
+ if (metadataForRecognizer.status == k_metadataStatusUploading) {
+ [[NCMainCommon sharedInstance] cancelTransferMetadata:metadataForRecognizer reloadDatasource:false uploadStatusForcedStart:true];
+ } else {
+ metadataForRecognizer.status = k_metadataStatusInUpload;
+ metadataForRecognizer.session = k_upload_session;
+ [[CCNetworking sharedNetworking] uploadFile:[[NCManageDatabase sharedInstance] addMetadata:metadataForRecognizer] taskStatus:k_taskStatusResume];
+ }
+}
+
#pragma --------------------------------------------------------------------------------------------
#pragma mark - ==== Datasource ====
#pragma --------------------------------------------------------------------------------------------
@@ -453,6 +524,27 @@
return cell;
}
+- (BOOL)indexPathIsValid:(NSIndexPath *)indexPath
+{
+ if (!indexPath)
+ return NO;
+
+ NSInteger section = indexPath.section;
+ NSInteger row = indexPath.row;
+
+ NSInteger lastSectionIndex = [self numberOfSectionsInTableView:self.tableView] - 1;
+
+ if (section > lastSectionIndex || lastSectionIndex < 0)
+ return NO;
+
+ NSInteger rowCount = [self.tableView numberOfRowsInSection:indexPath.section] - 1;
+
+ if (rowCount < 0)
+ return NO;
+
+ return row <= rowCount;
+}
+
@end
diff --git a/iOSClient/Trash/NCTrash.swift b/iOSClient/Trash/NCTrash.swift
index 7e0d84995..fd46fd36c 100644
--- a/iOSClient/Trash/NCTrash.swift
+++ b/iOSClient/Trash/NCTrash.swift
@@ -473,7 +473,7 @@ extension NCTrash: UICollectionViewDelegate {
let tableTrash = datasource[indexPath.item]
if isEditMode {
- if let index = selectFileID.index(of: tableTrash.fileID) {
+ if let index = selectFileID.firstIndex(of: tableTrash.fileID) {
selectFileID.remove(at: index)
} else {
selectFileID.append(tableTrash.fileID)
diff --git a/iOSClient/Utility/CCUtility.h b/iOSClient/Utility/CCUtility.h
index e99ea47ff..3cb5eff6d 100644
--- a/iOSClient/Utility/CCUtility.h
+++ b/iOSClient/Utility/CCUtility.h
@@ -150,6 +150,17 @@
+ (NSInteger)getMediaWidthImage;
+ (void)setMediaWidthImage:(NSInteger)width;
++ (BOOL)getDisableCrashservice;
++ (void)setDisableCrashservice:(BOOL)disable;
+
++ (void)setPassword:(NSString *)account password:(NSString *)password;
++ (NSString *)getPassword:(NSString *)account;
+
++ (void)setHCBusinessType:(NSString *)professions;
++ (NSString *)getHCBusinessType;
+
++ (NSData *)getDatabaseEncryptionKey;
+
// ===== Varius =====
+ (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL;
@@ -236,5 +247,6 @@
+ (NSDate *)datetimeWithOutDate:(NSDate *)datDate;
+ (BOOL)isValidEmail:(NSString *)checkString;
+ (NSString *)URLEncodeStringFromString:(NSString *)string;
++ (NSString*)hexRepresentation:(NSData *)data spaces:(BOOL)spaces;
@end
diff --git a/iOSClient/Utility/CCUtility.m b/iOSClient/Utility/CCUtility.m
index 196dbd160..6e84fa47e 100644
--- a/iOSClient/Utility/CCUtility.m
+++ b/iOSClient/Utility/CCUtility.m
@@ -568,6 +568,57 @@
[UICKeyChainStore setString:widthString forKey:@"mediaWidthImage" service:k_serviceShareKeyChain];
}
++ (BOOL)getDisableCrashservice
+{
+ return [[UICKeyChainStore stringForKey:@"crashservice" service:k_serviceShareKeyChain] boolValue];
+}
+
++ (void)setDisableCrashservice:(BOOL)disable
+{
+ NSString *sDisable = (disable) ? @"true" : @"false";
+ [UICKeyChainStore setString:sDisable forKey:@"crashservice" service:k_serviceShareKeyChain];
+}
+
++ (void)setPassword:(NSString *)account password:(NSString *)password
+{
+ NSString *key = [@"password" stringByAppendingString:account];
+ [UICKeyChainStore setString:password forKey:key service:k_serviceShareKeyChain];
+}
+
++ (NSString *)getPassword:(NSString *)account
+{
+ NSString *key = [@"password" stringByAppendingString:account];
+ return [UICKeyChainStore stringForKey:key service:k_serviceShareKeyChain];
+}
+
++ (void)setHCBusinessType:(NSString *)professions
+{
+ [UICKeyChainStore setString:professions forKey:@"businessType" service:k_serviceShareKeyChain];
+}
+
++ (NSString *)getHCBusinessType
+{
+ return [UICKeyChainStore stringForKey:@"businessType" service:k_serviceShareKeyChain];
+}
+
++ (NSData *)getDatabaseEncryptionKey
+{
+ NSData *key = [UICKeyChainStore dataForKey:@"databaseEncryptionKey" service:k_serviceShareKeyChain];
+ if (key == nil) {
+ NSMutableData *key = [NSMutableData dataWithLength:64];
+ (void)SecRandomCopyBytes(kSecRandomDefault, key.length, (uint8_t *)key.mutableBytes);
+ [UICKeyChainStore setData:key forKey:@"databaseEncryptionKey" service:k_serviceShareKeyChain];
+ return key;
+ } else {
+ return key;
+ }
+}
+
++ (void)setDatabaseEncryptionKey:(NSData *)data
+{
+ [UICKeyChainStore setData:data forKey:@"databaseEncryptionKey" service:k_serviceShareKeyChain];
+}
+
#pragma --------------------------------------------------------------------------------------------
#pragma mark ===== Various =====
#pragma --------------------------------------------------------------------------------------------
@@ -588,8 +639,9 @@
+ (NSString *)getUserAgent
{
NSString *appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
+ NSString *userAgent = [[NCBrandOptions sharedInstance] userAgent];
- return [NSString stringWithFormat:@"%@%@",@"Mozilla/5.0 (iOS) Nextcloud-iOS/",appVersion];
+ return [NSString stringWithFormat:@"Mozilla/5.0 (iOS) %@/%@", userAgent, appVersion];
}
+ (NSString *)dateDiff:(NSDate *) convertedDate
@@ -1505,4 +1557,29 @@
return (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, str, NULL, charset, encoding));
}
++ (NSString*)hexRepresentation:(NSData *)data spaces:(BOOL)spaces
+{
+ const unsigned char* bytes = (const unsigned char*)[data bytes];
+ NSUInteger nbBytes = [data length];
+ //If spaces is true, insert a space every this many input bytes (twice this many output characters).
+ static const NSUInteger spaceEveryThisManyBytes = 4UL;
+ //If spaces is true, insert a line-break instead of a space every this many spaces.
+ static const NSUInteger lineBreakEveryThisManySpaces = 4UL;
+ const NSUInteger lineBreakEveryThisManyBytes = spaceEveryThisManyBytes * lineBreakEveryThisManySpaces;
+ NSUInteger strLen = 2*nbBytes + (spaces ? nbBytes/spaceEveryThisManyBytes : 0);
+
+ NSMutableString* hex = [[NSMutableString alloc] initWithCapacity:strLen];
+ for(NSUInteger i=0; i<nbBytes; ) {
+ [hex appendFormat:@"%02X", bytes[i]];
+ //We need to increment here so that the every-n-bytes computations are right.
+ ++i;
+
+ if (spaces) {
+ if (i % lineBreakEveryThisManyBytes == 0) [hex appendString:@"\n"];
+ else if (i % spaceEveryThisManyBytes == 0) [hex appendString:@" "];
+ }
+ }
+ return hex;
+}
+
@end