Skip to content

Commit

Permalink
Merge branch '308'
Browse files Browse the repository at this point in the history
  • Loading branch information
marinofaggiana committed Sep 28, 2020
2 parents a115a7e + 06d2f9e commit 07537ff
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 38 deletions.
36 changes: 18 additions & 18 deletions Nextcloud.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,7 @@
/* Begin PBXShellScriptBuildPhase section */
F75A40001EBCB82B00B213E8 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
buildActionMask = 12;
files = (
);
inputPaths = (
Expand Down Expand Up @@ -1909,7 +1909,7 @@
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 1;
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "rm -rf ${TMPDIR}/TemporaryItems/*carthage*\n/usr/local/bin/carthage copy-frameworks\n";
};
Expand Down Expand Up @@ -2230,7 +2230,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 6JLRKY9ZV7;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -2253,7 +2253,7 @@
"@executable_path/../../Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"Libraries external\"/**";
MARKETING_VERSION = 3.0.7;
MARKETING_VERSION = 3.0.8;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "-ObjC";
Expand Down Expand Up @@ -2285,7 +2285,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 6JLRKY9ZV7;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -2308,7 +2308,7 @@
"@executable_path/../../Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"Libraries external\"/**";
MARKETING_VERSION = 3.0.7;
MARKETING_VERSION = 3.0.8;
MTL_FAST_MATH = YES;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "it.twsweb.Nextcloud.Notification-Service-Extension";
Expand All @@ -2332,7 +2332,7 @@
CODE_SIGN_ENTITLEMENTS = iOSClient/Brand/Share.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 6JLRKY9ZV7;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -2355,7 +2355,7 @@
"@executable_path/../../Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"Libraries external\"/**";
MARKETING_VERSION = 3.0.7;
MARKETING_VERSION = 3.0.8;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = it.twsweb.Nextcloud.Share;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2380,7 +2380,7 @@
CODE_SIGN_ENTITLEMENTS = iOSClient/Brand/Share.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 6JLRKY9ZV7;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -2403,7 +2403,7 @@
"@executable_path/../../Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"Libraries external\"/**";
MARKETING_VERSION = 3.0.7;
MARKETING_VERSION = 3.0.8;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = it.twsweb.Nextcloud.Share;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -2434,7 +2434,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 6JLRKY9ZV7;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -2457,7 +2457,7 @@
"@executable_path/../../Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"Libraries external\"/**";
MARKETING_VERSION = 3.0.7;
MARKETING_VERSION = 3.0.8;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "it.twsweb.Nextcloud.File-Provider-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -2488,7 +2488,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 6JLRKY9ZV7;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -2511,7 +2511,7 @@
"@executable_path/../../Frameworks",
);
LIBRARY_SEARCH_PATHS = "\"Libraries external\"/**";
MARKETING_VERSION = 3.0.7;
MARKETING_VERSION = 3.0.8;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "it.twsweb.Nextcloud.File-Provider-Extension";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -2534,7 +2534,7 @@
CODE_SIGN_ENTITLEMENTS = iOSClient/Brand/iOSClient.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_TEAM = 6JLRKY9ZV7;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -2554,7 +2554,7 @@
"@executable_path/../../Frameworks",
);
LIBRARY_SEARCH_PATHS = "";
MARKETING_VERSION = 3.0.7;
MARKETING_VERSION = 3.0.8;
OTHER_LDFLAGS = "-ObjC";
OTHER_SWIFT_FLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "it.twsweb.$(PRODUCT_NAME:rfc1034identifier)";
Expand Down Expand Up @@ -2583,7 +2583,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 26;
CURRENT_PROJECT_VERSION = 0;
DEVELOPMENT_TEAM = 6JLRKY9ZV7;
ENABLE_BITCODE = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -2602,7 +2602,7 @@
"@executable_path/../../Frameworks",
);
LIBRARY_SEARCH_PATHS = "";
MARKETING_VERSION = 3.0.7;
MARKETING_VERSION = 3.0.8;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "it.twsweb.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
12 changes: 6 additions & 6 deletions iOSClient/Favorites/NCFavorite.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EFX-fO-Oip">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EFX-fO-Oip">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -17,7 +17,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Zaz-Cl-qpZ">
<rect key="frame" x="0.0" y="44" width="375" height="734"/>
<rect key="frame" x="0.0" y="44" width="375" height="768"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="fF1-wd-0xN">
<size key="itemSize" width="0.0" height="0.0"/>
Expand All @@ -32,14 +32,14 @@
</connections>
</collectionView>
</subviews>
<viewLayoutGuide key="safeArea" id="Meh-VD-wWh"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Zaz-Cl-qpZ" firstAttribute="leading" secondItem="Meh-VD-wWh" secondAttribute="leading" id="1bp-sm-u0X"/>
<constraint firstItem="Meh-VD-wWh" firstAttribute="trailing" secondItem="Zaz-Cl-qpZ" secondAttribute="trailing" id="aNd-UL-hmu"/>
<constraint firstItem="Meh-VD-wWh" firstAttribute="bottom" secondItem="Zaz-Cl-qpZ" secondAttribute="bottom" id="aNr-tf-2AH"/>
<constraint firstItem="Meh-VD-wWh" firstAttribute="bottom" secondItem="Zaz-Cl-qpZ" secondAttribute="bottom" constant="-34" id="aNr-tf-2AH"/>
<constraint firstItem="Zaz-Cl-qpZ" firstAttribute="top" secondItem="Meh-VD-wWh" secondAttribute="top" id="tji-wt-R7s"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Meh-VD-wWh"/>
</view>
<connections>
<outlet property="collectionView" destination="Zaz-Cl-qpZ" id="8oA-Gx-z7T"/>
Expand All @@ -48,7 +48,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="JJ0-Le-6eT" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="256.80000000000001" y="228.93553223388307"/>
<point key="canvasLocation" x="256.80000000000001" y="228.32512315270938"/>
</scene>
<!--CCDetailNC-->
<scene sceneID="D5y-IR-BuC">
Expand Down
15 changes: 8 additions & 7 deletions iOSClient/Main/Create cloud/NCCreateFormUploadScanDocument.swift
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
} else {
UIGraphicsBeginPDFContextToData(pdfData, CGRect.zero, nil)
}
let context = UIGraphicsGetCurrentContext()
var fontColor = UIColor.clear
#if targetEnvironment(simulator)
fontColor = UIColor.red
Expand All @@ -519,12 +518,14 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC
image = changeImageFromQuality(image, dpiQuality: dpiQuality)
image = changeCompressionImage(image, dpiQuality: dpiQuality)

let bounds = CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height)

if #available(iOS 13.0, *) {

if self.form.formRow(withTag: "textRecognition")!.value as! Int == 1 {

UIGraphicsBeginPDFPageWithInfo(CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height), nil)
UIImageView.init(image:image).layer.render(in: context!)
UIGraphicsBeginPDFPageWithInfo(bounds, nil)
image.draw(in: bounds)

let requestHandler = VNImageRequestHandler(cgImage: image.cgImage!, options: [:])

Expand Down Expand Up @@ -557,14 +558,14 @@ class NCCreateFormUploadScanDocument: XLFormViewController, NCSelectDelegate, NC

} else {

UIGraphicsBeginPDFPageWithInfo(CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height), nil)
UIImageView.init(image:image).layer.render(in: context!)
UIGraphicsBeginPDFPageWithInfo(bounds, nil)
image.draw(in: bounds)
}

} else {

UIGraphicsBeginPDFPageWithInfo(CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height), nil)
UIImageView.init(image:image).layer.render(in: context!)
UIGraphicsBeginPDFPageWithInfo(bounds, nil)
image.draw(in: bounds)
}
}

Expand Down
2 changes: 1 addition & 1 deletion iOSClient/Main/Menu/NCCollectionViewCommon+Menu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ extension NCCollectionViewCommon {
//
// OFFLINE
//
if !isFolderEncrypted && (layoutKey == k_layout_view_offline && serverUrl == "" || (layoutKey != k_layout_view_offline)) {
if !isFolderEncrypted {
actions.append(
NCMenuAction(
title: isOffline ? NSLocalizedString("_remove_available_offline_", comment: "") : NSLocalizedString("_set_available_offline_", comment: ""),
Expand Down
12 changes: 6 additions & 6 deletions iOSClient/Offline/NCOffline.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EFX-fO-Oip">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EFX-fO-Oip">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -17,7 +17,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="Zaz-Cl-qpZ">
<rect key="frame" x="0.0" y="44" width="375" height="734"/>
<rect key="frame" x="0.0" y="44" width="375" height="768"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="fF1-wd-0xN">
<size key="itemSize" width="0.0" height="0.0"/>
Expand All @@ -32,14 +32,14 @@
</connections>
</collectionView>
</subviews>
<viewLayoutGuide key="safeArea" id="Meh-VD-wWh"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Zaz-Cl-qpZ" firstAttribute="leading" secondItem="Meh-VD-wWh" secondAttribute="leading" id="1bp-sm-u0X"/>
<constraint firstItem="Meh-VD-wWh" firstAttribute="trailing" secondItem="Zaz-Cl-qpZ" secondAttribute="trailing" id="aNd-UL-hmu"/>
<constraint firstItem="Meh-VD-wWh" firstAttribute="bottom" secondItem="Zaz-Cl-qpZ" secondAttribute="bottom" id="aNr-tf-2AH"/>
<constraint firstItem="Meh-VD-wWh" firstAttribute="bottom" secondItem="Zaz-Cl-qpZ" secondAttribute="bottom" constant="-34" id="aNr-tf-2AH"/>
<constraint firstItem="Zaz-Cl-qpZ" firstAttribute="top" secondItem="Meh-VD-wWh" secondAttribute="top" id="tji-wt-R7s"/>
</constraints>
<viewLayoutGuide key="safeArea" id="Meh-VD-wWh"/>
</view>
<connections>
<outlet property="collectionView" destination="Zaz-Cl-qpZ" id="8oA-Gx-z7T"/>
Expand All @@ -48,7 +48,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="JJ0-Le-6eT" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="256.80000000000001" y="228.93553223388307"/>
<point key="canvasLocation" x="256.80000000000001" y="228.32512315270938"/>
</scene>
<!--CCDetailNC-->
<scene sceneID="D5y-IR-BuC">
Expand Down

0 comments on commit 07537ff

Please sign in to comment.