Explorar o código

Start DocumentPicker

Marino Faggiana %!s(int64=8) %!d(string=hai) anos
pai
achega
abf98169a1

+ 300 - 1
Nextcloud.xcodeproj/project.pbxproj

@@ -125,6 +125,11 @@
 		F73CCE261DC13788007E38D8 /* UIScrollView+EmptyDataSet.m in Sources */ = {isa = PBXBuildFile; fileRef = F73CCE241DC13788007E38D8 /* UIScrollView+EmptyDataSet.m */; };
 		F73CCE301DC13798007E38D8 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */; };
 		F73CCE321DC13798007E38D8 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */; };
+		F74344171E1264EE001CC831 /* DocumentPickerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74344161E1264EE001CC831 /* DocumentPickerViewController.swift */; };
+		F743441A1E1264EE001CC831 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F74344181E1264EE001CC831 /* MainInterface.storyboard */; };
+		F74344251E1264EE001CC831 /* FileProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = F74344241E1264EE001CC831 /* FileProvider.swift */; };
+		F74344291E1264EE001CC831 /* PickerFileProvider.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = F74344201E1264EE001CC831 /* PickerFileProvider.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		F743442C1E1264EE001CC831 /* Picker.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = F74344121E1264ED001CC831 /* Picker.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
 		F749E4E91DC1FB38009BA2FD /* Share Ext Nextcloud.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = F7CE8AFB1DC1F8D8009CAE48 /* Share Ext Nextcloud.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
 		F750374D1DBFA91A008FB480 /* ALView+PureLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = F75037441DBFA91A008FB480 /* ALView+PureLayout.m */; };
 		F750374F1DBFA91A008FB480 /* NSArray+PureLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = F75037461DBFA91A008FB480 /* NSArray+PureLayout.m */; };
@@ -560,6 +565,20 @@
 			remoteGlobalIDString = EA7CC8A7183E11E600B6A4B4;
 			remoteInfo = "ownCloud iOS libraryTests";
 		};
+		F74344271E1264EE001CC831 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = F7F67BA01A24D27800EE80DA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = F743441F1E1264EE001CC831;
+			remoteInfo = PickerFileProvider;
+		};
+		F743442A1E1264EE001CC831 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = F7F67BA01A24D27800EE80DA /* Project object */;
+			proxyType = 1;
+			remoteGlobalIDString = F74344111E1264ED001CC831;
+			remoteInfo = Picker;
+		};
 		F7B61E921DC13C20009E938F /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = F7B61E861DC13C20009E938F /* MagicalRecord.xcodeproj */;
@@ -625,7 +644,9 @@
 			dstPath = "";
 			dstSubfolderSpec = 13;
 			files = (
+				F743442C1E1264EE001CC831 /* Picker.appex in Embed App Extensions */,
 				F749E4E91DC1FB38009BA2FD /* Share Ext Nextcloud.appex in Embed App Extensions */,
+				F74344291E1264EE001CC831 /* PickerFileProvider.appex in Embed App Extensions */,
 			);
 			name = "Embed App Extensions";
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1119,6 +1140,15 @@
 		F73CCE281DC13798007E38D8 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		F73CCE291DC13798007E38D8 /* UICKeyChainStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UICKeyChainStore.h; sourceTree = "<group>"; };
 		F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStore.m; sourceTree = "<group>"; };
+		F74344121E1264ED001CC831 /* Picker.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = Picker.appex; sourceTree = BUILT_PRODUCTS_DIR; };
+		F74344151E1264EE001CC831 /* Picker.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Picker.entitlements; sourceTree = "<group>"; };
+		F74344161E1264EE001CC831 /* DocumentPickerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DocumentPickerViewController.swift; sourceTree = "<group>"; };
+		F74344191E1264EE001CC831 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
+		F743441B1E1264EE001CC831 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		F74344201E1264EE001CC831 /* PickerFileProvider.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = PickerFileProvider.appex; sourceTree = BUILT_PRODUCTS_DIR; };
+		F74344231E1264EE001CC831 /* PickerFileProvider.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = PickerFileProvider.entitlements; sourceTree = "<group>"; };
+		F74344241E1264EE001CC831 /* FileProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileProvider.swift; sourceTree = "<group>"; };
+		F74344261E1264EE001CC831 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; 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>"; };
 		F744BE921BEBB2EE004FFF66 /* CCIntro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCIntro.h; sourceTree = "<group>"; };
@@ -1518,6 +1548,20 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		F743440F1E1264ED001CC831 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F743441D1E1264EE001CC831 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		F77B0EDC1D118A16002130FE /* Frameworks */ = {
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
@@ -2494,6 +2538,43 @@
 			path = UICKeyChainStore;
 			sourceTree = "<group>";
 		};
+		F74344131E1264EE001CC831 /* Picker */ = {
+			isa = PBXGroup;
+			children = (
+				F74344161E1264EE001CC831 /* DocumentPickerViewController.swift */,
+				F74344181E1264EE001CC831 /* MainInterface.storyboard */,
+				F743441B1E1264EE001CC831 /* Info.plist */,
+				F74344141E1264EE001CC831 /* Supporting Files */,
+			);
+			path = Picker;
+			sourceTree = "<group>";
+		};
+		F74344141E1264EE001CC831 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				F74344151E1264EE001CC831 /* Picker.entitlements */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		F74344211E1264EE001CC831 /* PickerFileProvider */ = {
+			isa = PBXGroup;
+			children = (
+				F74344241E1264EE001CC831 /* FileProvider.swift */,
+				F74344261E1264EE001CC831 /* Info.plist */,
+				F74344221E1264EE001CC831 /* Supporting Files */,
+			);
+			path = PickerFileProvider;
+			sourceTree = "<group>";
+		};
+		F74344221E1264EE001CC831 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				F74344231E1264EE001CC831 /* PickerFileProvider.entitlements */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
 		F744BE911BEBB2EE004FFF66 /* Intro */ = {
 			isa = PBXGroup;
 			children = (
@@ -3004,8 +3085,12 @@
 				F7F67BAA1A24D27800EE80DA /* iOSClient */,
 				F7F67BAB1A24D27800EE80DA /* Supporting Files */,
 				F7C0F46D1C8880540059EC54 /* Share Ext */,
+				F74344131E1264EE001CC831 /* Picker */,
+				F74344211E1264EE001CC831 /* PickerFileProvider */,
 				F7FC7D651DC1F98700BB2C6A /* Products */,
 				F7FC7D541DC1F93700BB2C6A /* Frameworks */,
+				F74344121E1264ED001CC831 /* Picker.appex */,
+				F74344201E1264EE001CC831 /* PickerFileProvider.appex */,
 			);
 			sourceTree = "<group>";
 		};
@@ -3138,6 +3223,40 @@
 			productReference = F7CE8AFB1DC1F8D8009CAE48 /* Share Ext Nextcloud.appex */;
 			productType = "com.apple.product-type.app-extension";
 		};
+		F74344111E1264ED001CC831 /* Picker */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = F743443C1E1264EE001CC831 /* Build configuration list for PBXNativeTarget "Picker" */;
+			buildPhases = (
+				F743440E1E1264ED001CC831 /* Sources */,
+				F743440F1E1264ED001CC831 /* Frameworks */,
+				F74344101E1264ED001CC831 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Picker;
+			productName = Picker;
+			productReference = F74344121E1264ED001CC831 /* Picker.appex */;
+			productType = "com.apple.product-type.app-extension";
+		};
+		F743441F1E1264EE001CC831 /* PickerFileProvider */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = F743443B1E1264EE001CC831 /* Build configuration list for PBXNativeTarget "PickerFileProvider" */;
+			buildPhases = (
+				F743441C1E1264EE001CC831 /* Sources */,
+				F743441D1E1264EE001CC831 /* Frameworks */,
+				F743441E1E1264EE001CC831 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = PickerFileProvider;
+			productName = PickerFileProvider;
+			productReference = F74344201E1264EE001CC831 /* PickerFileProvider.appex */;
+			productType = "com.apple.product-type.app-extension";
+		};
 		F77B0DEB1D118A16002130FE /* Nextcloud */ = {
 			isa = PBXNativeTarget;
 			buildConfigurationList = F77B0F9A1D118A16002130FE /* Build configuration list for PBXNativeTarget "Nextcloud" */;
@@ -3152,6 +3271,8 @@
 			);
 			dependencies = (
 				F7145A321D12E65F00CAFEEC /* PBXTargetDependency */,
+				F74344281E1264EE001CC831 /* PBXTargetDependency */,
+				F743442B1E1264EE001CC831 /* PBXTargetDependency */,
 			);
 			name = Nextcloud;
 			productName = "Crypto Cloud";
@@ -3164,13 +3285,33 @@
 		F7F67BA01A24D27800EE80DA /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
-				LastSwiftUpdateCheck = 0720;
+				LastSwiftUpdateCheck = 0820;
 				LastUpgradeCheck = 0800;
 				ORGANIZATIONNAME = TWS;
 				TargetAttributes = {
 					F71459B41D12E3B700CAFEEC = {
 						DevelopmentTeam = 6JLRKY9ZV7;
 					};
+					F74344111E1264ED001CC831 = {
+						CreatedOnToolsVersion = 8.2.1;
+						DevelopmentTeam = 6JLRKY9ZV7;
+						ProvisioningStyle = Automatic;
+						SystemCapabilities = {
+							com.apple.Keychain = {
+								enabled = 1;
+							};
+						};
+					};
+					F743441F1E1264EE001CC831 = {
+						CreatedOnToolsVersion = 8.2.1;
+						DevelopmentTeam = 6JLRKY9ZV7;
+						ProvisioningStyle = Automatic;
+						SystemCapabilities = {
+							com.apple.Keychain = {
+								enabled = 1;
+							};
+						};
+					};
 					F77B0DEB1D118A16002130FE = {
 						DevelopmentTeam = 6JLRKY9ZV7;
 					};
@@ -3187,6 +3328,7 @@
 				fr,
 				de,
 				cs,
+				Base,
 			);
 			mainGroup = F7F67B9F1A24D27800EE80DA;
 			productRefGroup = F7F67B9F1A24D27800EE80DA;
@@ -3205,6 +3347,8 @@
 			targets = (
 				F77B0DEB1D118A16002130FE /* Nextcloud */,
 				F71459B41D12E3B700CAFEEC /* Share Ext Nextcloud */,
+				F74344111E1264ED001CC831 /* Picker */,
+				F743441F1E1264EE001CC831 /* PickerFileProvider */,
 			);
 		};
 /* End PBXProject section */
@@ -3300,6 +3444,21 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		F74344101E1264ED001CC831 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F743441A1E1264EE001CC831 /* MainInterface.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F743441E1E1264EE001CC831 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		F77B0EE91D118A16002130FE /* Resources */ = {
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -3572,6 +3731,22 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
+		F743440E1E1264ED001CC831 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F74344171E1264EE001CC831 /* DocumentPickerViewController.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+		F743441C1E1264EE001CC831 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				F74344251E1264EE001CC831 /* FileProvider.swift in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
 		F77B0DEF1D118A16002130FE /* Sources */ = {
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
@@ -3857,6 +4032,16 @@
 			target = F71459B41D12E3B700CAFEEC /* Share Ext Nextcloud */;
 			targetProxy = F7145A311D12E65F00CAFEEC /* PBXContainerItemProxy */;
 		};
+		F74344281E1264EE001CC831 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = F743441F1E1264EE001CC831 /* PickerFileProvider */;
+			targetProxy = F74344271E1264EE001CC831 /* PBXContainerItemProxy */;
+		};
+		F743442B1E1264EE001CC831 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			target = F74344111E1264ED001CC831 /* Picker */;
+			targetProxy = F743442A1E1264EE001CC831 /* PBXContainerItemProxy */;
+		};
 /* End PBXTargetDependency section */
 
 /* Begin PBXVariantGroup section */
@@ -3873,6 +4058,14 @@
 			name = BKPasscodeView.strings;
 			sourceTree = "<group>";
 		};
+		F74344181E1264EE001CC831 /* MainInterface.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				F74344191E1264EE001CC831 /* Base */,
+			);
+			name = MainInterface.storyboard;
+			sourceTree = "<group>";
+		};
 		F744BE9F1BEBB69F004FFF66 /* Intro.strings */ = {
 			isa = PBXVariantGroup;
 			children = (
@@ -4032,6 +4225,94 @@
 			};
 			name = Release;
 		};
+		F743442D1E1264EE001CC831 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CODE_SIGN_ENTITLEMENTS = Picker/Picker.entitlements;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				DEVELOPMENT_TEAM = 6JLRKY9ZV7;
+				INFOPLIST_FILE = Picker/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = it.twsweb.Nextcloud.Picker;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 3.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		F743442E1E1264EE001CC831 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CODE_SIGN_ENTITLEMENTS = Picker/Picker.entitlements;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				DEVELOPMENT_TEAM = 6JLRKY9ZV7;
+				INFOPLIST_FILE = Picker/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = it.twsweb.Nextcloud.Picker;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				SWIFT_VERSION = 3.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Release;
+		};
+		F743442F1E1264EE001CC831 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CODE_SIGN_ENTITLEMENTS = PickerFileProvider/PickerFileProvider.entitlements;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				DEVELOPMENT_TEAM = 6JLRKY9ZV7;
+				INFOPLIST_FILE = PickerFileProvider/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = it.twsweb.Nextcloud.PickerFileProvider;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				SWIFT_VERSION = 3.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		F74344301E1264EE001CC831 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CODE_SIGN_ENTITLEMENTS = PickerFileProvider/PickerFileProvider.entitlements;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				DEVELOPMENT_TEAM = 6JLRKY9ZV7;
+				INFOPLIST_FILE = PickerFileProvider/Info.plist;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
+				PRODUCT_BUNDLE_IDENTIFIER = it.twsweb.Nextcloud.PickerFileProvider;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				SKIP_INSTALL = YES;
+				SWIFT_VERSION = 3.0;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Release;
+		};
 		F77B0F9B1D118A16002130FE /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
@@ -4219,6 +4500,24 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
+		F743443B1E1264EE001CC831 /* Build configuration list for PBXNativeTarget "PickerFileProvider" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F743442F1E1264EE001CC831 /* Debug */,
+				F74344301E1264EE001CC831 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		F743443C1E1264EE001CC831 /* Build configuration list for PBXNativeTarget "Picker" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				F743442D1E1264EE001CC831 /* Debug */,
+				F743442E1E1264EE001CC831 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
 		F77B0F9A1D118A16002130FE /* Build configuration list for PBXNativeTarget "Nextcloud" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (

+ 40 - 0
Picker/Base.lproj/MainInterface.storyboard

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="J6p-g8-CHO">
+    <dependencies>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <scenes>
+        <!--Document Picker View Controller-->
+        <scene sceneID="Q8I-MS-tKG">
+            <objects>
+                <viewController id="J6p-g8-CHO" customClass="DocumentPickerViewController" customModuleProvider="target" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="hST-wJ-eYy"/>
+                        <viewControllerLayoutGuide type="bottom" id="UQD-kz-Mfv"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Vdh-Gp-eV6">
+                        <rect key="frame" x="0.0" y="0.0" width="350" height="400"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mym-YX-cEY">
+                                <frame key="frameInset" minX="133" minY="185" width="84" height="30"/>
+                                <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                <state key="normal" title="Untitled.txt">
+                                    <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                                </state>
+                                <connections>
+                                    <action selector="openDocument:" destination="J6p-g8-CHO" eventType="touchUpInside" id="HtB-86-uWI"/>
+                                </connections>
+                            </button>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                    </view>
+                    <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+                    <size key="freeformSize" width="350" height="400"/>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="UoZ-ya-W3e" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+</document>

+ 24 - 0
Picker/DocumentPickerViewController.swift

@@ -0,0 +1,24 @@
+//
+//  DocumentPickerViewController.swift
+//  Picker
+//
+//  Created by Marino Faggiana on 27/12/16.
+//  Copyright © 2016 TWS. All rights reserved.
+//
+
+import UIKit
+
+class DocumentPickerViewController: UIDocumentPickerExtensionViewController {
+
+    @IBAction func openDocument(_ sender: AnyObject?) {
+        let documentURL = self.documentStorageURL!.appendingPathComponent("Untitled.txt")
+        
+        // TODO: if you do not have a corresponding file provider, you must ensure that the URL returned here is backed by a file
+        self.dismissGrantingAccess(to: documentURL)
+    }
+    
+    override func prepareForPresentation(in mode: UIDocumentPickerMode) {
+        // TODO: present a view controller appropriate for picker mode here
+    }
+
+}

+ 56 - 0
Picker/Info.plist

@@ -0,0 +1,56 @@
+<?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>en</string>
+	<key>CFBundleDisplayName</key>
+	<string>Nextcloud</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.17</string>
+	<key>CFBundleVersion</key>
+	<string>00000</string>
+	<key>NSExtension</key>
+	<dict>
+		<key>NSExtensionAttributes</key>
+		<dict>
+			<key>UIDocumentPickerModes</key>
+			<array>
+				<string>UIDocumentPickerModeImport</string>
+				<string>UIDocumentPickerModeOpen</string>
+				<string>UIDocumentPickerModeExportToService</string>
+				<string>UIDocumentPickerModeMoveToService</string>
+			</array>
+			<key>UIDocumentPickerSupportedFileTypes</key>
+			<array>
+				<string>public.content</string>
+				<string>public.text</string>
+				<string>public.plain-text</string>
+				<string>public.html</string>
+				<string>public.presentation</string>
+				<string>public.video</string>
+				<string>public.mpeg</string>
+				<string>public.audio</string>
+				<string>public.image</string>
+				<string>public.jpeg</string>
+				<string>public.tiff</string>
+				<string>public.data</string>
+			</array>
+		</dict>
+		<key>NSExtensionMainStoryboard</key>
+		<string>MainInterface</string>
+		<key>NSExtensionPointIdentifier</key>
+		<string>com.apple.fileprovider-ui</string>
+	</dict>
+</dict>
+</plist>

+ 14 - 0
Picker/Picker.entitlements

@@ -0,0 +1,14 @@
+<?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>

+ 87 - 0
PickerFileProvider/FileProvider.swift

@@ -0,0 +1,87 @@
+//
+//  FileProvider.swift
+//  PickerFileProvider
+//
+//  Created by Marino Faggiana on 27/12/16.
+//  Copyright © 2016 TWS. All rights reserved.
+//
+
+import UIKit
+
+class FileProvider: NSFileProviderExtension {
+
+    var fileCoordinator: NSFileCoordinator {
+        let fileCoordinator = NSFileCoordinator()
+        fileCoordinator.purposeIdentifier = self.providerIdentifier
+        return fileCoordinator
+    }
+    
+    override init() {
+        super.init()
+        
+        self.fileCoordinator.coordinate(writingItemAt: self.documentStorageURL, options: [], error: nil, byAccessor: { newURL in
+            // ensure the documentStorageURL actually exists
+            do {
+                try FileManager.default.createDirectory(at: newURL, withIntermediateDirectories: true, attributes: nil)
+            } catch {
+                // Handle error
+            }
+        })
+    }
+    
+    override func providePlaceholder(at url: URL, completionHandler: ((_ error: Error?) -> Void)?) {
+        // Should call writePlaceholderAtURL(_:withMetadata:error:) with the placeholder URL, then call the completion handler with the error if applicable.
+        let fileName = url.lastPathComponent
+        
+        let placeholderURL = NSFileProviderExtension.placeholderURL(for: self.documentStorageURL.appendingPathComponent(fileName))
+        
+        // TODO: get file size for file at <url> from model
+        let fileSize = 0
+        let metadata = [AnyHashable(URLResourceKey.fileSizeKey): fileSize]
+        do {
+            try NSFileProviderExtension.writePlaceholder(at: placeholderURL, withMetadata: metadata)
+        } catch {
+            // Handle error
+        }
+        
+        completionHandler?(nil)
+    }
+    
+    override func startProvidingItem(at url: URL, completionHandler: ((_ error: Error?) -> Void)?) {
+        // Should ensure that the actual file is in the position returned by URLForItemWithIdentifier, then call the completion handler
+        
+        // TODO: get the contents of file at <url> from model
+        let fileData = NSData()
+        
+        do {
+            _ = try fileData.write(to: url, options: [])
+        } catch {
+            // Handle error
+        }
+        
+        completionHandler?(nil);
+    }
+    
+    
+    override func itemChanged(at url: URL) {
+        // Called at some point after the file has changed; the provider may then trigger an upload
+        
+        // TODO: mark file at <url> as needing an update in the model; kick off update process
+        NSLog("Item changed at URL %@", url as NSURL)
+    }
+    
+    override func stopProvidingItem(at url: URL) {
+        // Called after the last claim to the file has been released. At this point, it is safe for the file provider to remove the content file.
+        // Care should be taken that the corresponding placeholder file stays behind after the content file has been deleted.
+        
+        do {
+            _ = try FileManager.default.removeItem(at: url)
+        } catch {
+            // Handle error
+        }
+        self.providePlaceholder(at: url, completionHandler: { error in
+            // TODO: handle any error, do any necessary cleanup
+        })
+    }
+
+}

+ 33 - 0
PickerFileProvider/Info.plist

@@ -0,0 +1,33 @@
+<?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>en</string>
+	<key>CFBundleDisplayName</key>
+	<string>PickerFileProvider</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.17</string>
+	<key>CFBundleVersion</key>
+	<string>00000</string>
+	<key>NSExtension</key>
+	<dict>
+		<key>NSExtensionFileProviderDocumentGroup</key>
+		<string>group.it.twsweb.Crypto-Cloud</string>
+		<key>NSExtensionPointIdentifier</key>
+		<string>com.apple.fileprovider-nonui</string>
+		<key>NSExtensionPrincipalClass</key>
+		<string>$(PRODUCT_MODULE_NAME).FileProvider</string>
+	</dict>
+</dict>
+</plist>

+ 14 - 0
PickerFileProvider/PickerFileProvider.entitlements

@@ -0,0 +1,14 @@
+<?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>

+ 2 - 2
Share Ext/InfoNextcloud.plist

@@ -17,11 +17,11 @@
 	<key>CFBundlePackageType</key>
 	<string>XPC!</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.16</string>
+	<string>2.17</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>00009</string>
+	<string>00000</string>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>

+ 2 - 2
iOSClient/InfoPlist/InfoNextcloud.plist

@@ -46,7 +46,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>2.16</string>
+	<string>2.17</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleURLTypes</key>
@@ -69,7 +69,7 @@
 		</dict>
 	</array>
 	<key>CFBundleVersion</key>
-	<string>00009</string>
+	<string>00000</string>
 	<key>ITSAppUsesNonExemptEncryption</key>
 	<true/>
 	<key>ITSEncryptionExportComplianceCode</key>