Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftyDropbox switched to Swift Package Manager #274

Merged
merged 12 commits into from
Oct 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
# Travis

os: osx
osx_image: xcode11.3
language: objective-c
osx_image: xcode12
language: swift

branches:
only:
- develop

cache:
directories:
- Carthage

before_install:
- export IOS_SIMULATOR_DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=13.3"

install:
- brew install carthage || true
- brew outdated carthage || brew upgrade carthage
- travis_wait 20 carthage bootstrap --platform iOS --cache-builds
- export IOS_SIMULATOR_DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=14.0"

before_script:
- set -o pipefail

script:
- travis_retry xcodebuild test -scheme MobileOrg -destination "$IOS_SIMULATOR_DESTINATION" | xcpretty -c
- travis_retry xcodebuild clean test -scheme MobileOrg -destination "$IOS_SIMULATOR_DESTINATION" | xcpretty -c

notifications:
irc:
Expand Down
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

2 changes: 0 additions & 2 deletions Cartfile.resolved

This file was deleted.

10 changes: 6 additions & 4 deletions Classes/Sync/Dropbox/DropboxTransferManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ import SwiftyDropbox


/// Handle Dropbox Authorisation FLow
/// Triggerd by AppDelegate
/// Triggered by AppDelegate
///
/// - Parameter url: URL used for Authorisation
/// - Returns: always true 🙄
func handleAuthFlow(url: URL) -> Bool {
if let authResult = DropboxClientsManager.handleRedirectURL(url) {
DropboxClientsManager.handleRedirectURL(url, completion: { authResult in
switch authResult {
case .success:
NotificationCenter.default.post(name: Notification.Name(rawValue: "dropboxloginsuccess"), object: nil)
Expand All @@ -89,9 +89,11 @@ import SwiftyDropbox
case .cancel:
print("Authorization flow was manually cancelled by user!")
case .error(_, let description):
print("Error: \(description)")
print("Error: \(description ?? "Unknown")")
case .none:
print("Unknown result.")
}
}
})
return true
}

Expand Down
2 changes: 0 additions & 2 deletions Configuration/Carthage-in.xcfilelist

This file was deleted.

2 changes: 0 additions & 2 deletions Configuration/Carthage-out.xcfilelist

This file was deleted.

2 changes: 1 addition & 1 deletion Global.shared.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ALWAYS_SEARCH_USER_PATHS = NO
CLANG_ANALYZER_NONNULL = YES
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
FRAMEWORK_SEARCH_PATHS = $(inherited) $(SRCROOT) $(PROJECT_DIR) $(PROJECT_DIR)/Carthage/Build/iOS
FRAMEWORK_SEARCH_PATHS = $(inherited) $(SRCROOT) $(PROJECT_DIR)
GCC_NO_COMMON_BLOCKS = YES
GCC_PRECOMPILE_PREFIX_HEADER = YES
IPHONEOS_DEPLOYMENT_TARGET = 12.0
Expand Down
62 changes: 28 additions & 34 deletions MobileOrg.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
18A3BBA316178BDD003D9320 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18A3BBA216178BDD003D9320 /* QuartzCore.framework */; };
18A3BBA716178DCD003D9320 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 18A3BBA616178DCD003D9320 /* Reachability.m */; };
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; };
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
28D801B40F44B63D00FB423F /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28D801B30F44B63D00FB423F /* CoreData.framework */; };
5420E7C9234D15F20008ADAC /* CloudTransferManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5420E7C8234D15F20008ADAC /* CloudTransferManager.swift */; };
5420E7CD234FB4150008ADAC /* UIAlertController+MobileOrg.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5420E7CC234FB4150008ADAC /* UIAlertController+MobileOrg.swift */; };
5420E7D1234FC7AA0008ADAC /* CloudTransferManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5420E7D0234FC7AA0008ADAC /* CloudTransferManagerTests.swift */; };
5459EDBF25288F44001A77EA /* SwiftyDropbox in Frameworks */ = {isa = PBXBuildFile; productRef = 5459EDBE25288F44001A77EA /* SwiftyDropbox */; };
549D4BC72417D27900039E1E /* PreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 549D4BC62417D27900039E1E /* PreviewViewController.swift */; };
54CD6301234BC02D00D485E1 /* UIColor+MobileOrg.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54CD6300234BC02D00D485E1 /* UIColor+MobileOrg.swift */; };
54CD6303234BC9A200D485E1 /* RoundedLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54CD6302234BC9A200D485E1 /* RoundedLabel.swift */; };
Expand Down Expand Up @@ -122,8 +122,6 @@
8322ED8B176AF1C7008B37C7 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 8322ED85176AF1C4008B37C7 /* [email protected] */; };
8322ED8C176AF1C7008B37C7 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 8322ED86176AF1C6008B37C7 /* [email protected] */; };
83B1312C234AD16D0043D955 /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83B1312B234AD16D0043D955 /* CloudKit.framework */; };
CE67A65B23A5CDD900B2B0BD /* SwiftyDropbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE67A65923A5CB6500B2B0BD /* SwiftyDropbox.framework */; };
CE67A65F23A5CE1800B2B0BD /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE67A65E23A5CE1800B2B0BD /* Alamofire.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -142,7 +140,6 @@
18A3BBA616178DCD003D9320 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
1D6058910D05DD3D006BFB54 /* MobileOrg.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MobileOrg.app; sourceTree = BUILT_PRODUCTS_DIR; };
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
28AD733E0D9D9553002E5188 /* MainWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow.xib; sourceTree = "<group>"; };
28D801B30F44B63D00FB423F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -294,8 +291,6 @@
8322ED86176AF1C6008B37C7 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
83B1312B234AD16D0043D955 /* CloudKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CloudKit.framework; path = System/Library/Frameworks/CloudKit.framework; sourceTree = SDKROOT; };
83BCC85D203E92C700064F22 /* MobileOrg.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = MobileOrg.entitlements; path = MobileOrg/MobileOrg.entitlements; sourceTree = "<group>"; };
CE67A65923A5CB6500B2B0BD /* SwiftyDropbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftyDropbox.framework; path = Carthage/Build/iOS/SwiftyDropbox.framework; sourceTree = "<group>"; };
CE67A65E23A5CE1800B2B0BD /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
CECD59F423B8D6C200348D89 /* MobileOrgTests-AppStore.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "MobileOrgTests-AppStore.xcconfig"; path = "Configuration/MobileOrgTests-AppStore.xcconfig"; sourceTree = "<group>"; };
CECD59F523B8D6C200348D89 /* MobileOrg-AdHoc.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "MobileOrg-AdHoc.xcconfig"; path = "Configuration/MobileOrg-AdHoc.xcconfig"; sourceTree = "<group>"; };
CECD59F623B8D6C200348D89 /* MobileOrgTests-Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "MobileOrgTests-Shared.xcconfig"; path = "Configuration/MobileOrgTests-Shared.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -312,13 +307,11 @@
buildActionMask = 2147483647;
files = (
747BF9811DFCBC3F00E800FB /* libicucore.tbd in Frameworks */,
CE67A65B23A5CDD900B2B0BD /* SwiftyDropbox.framework in Frameworks */,
18A3BBA316178BDD003D9320 /* QuartzCore.framework in Frameworks */,
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
CE67A65F23A5CE1800B2B0BD /* Alamofire.framework in Frameworks */,
83B1312C234AD16D0043D955 /* CloudKit.framework in Frameworks */,
5459EDBF25288F44001A77EA /* SwiftyDropbox in Frameworks */,
28D801B40F44B63D00FB423F /* CoreData.framework in Frameworks */,
793F7F6C107CB5FC00674D0A /* SystemConfiguration.framework in Frameworks */,
7945F61211A807FD00731598 /* Security.framework in Frameworks */,
Expand Down Expand Up @@ -400,14 +393,11 @@
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
CE67A65E23A5CE1800B2B0BD /* Alamofire.framework */,
CE67A65923A5CB6500B2B0BD /* SwiftyDropbox.framework */,
83B1312B234AD16D0043D955 /* CloudKit.framework */,
747BF9801DFCBC3F00E800FB /* libicucore.tbd */,
18A3BBA216178BDD003D9320 /* QuartzCore.framework */,
7945F61111A807FD00731598 /* Security.framework */,
793F7F6B107CB5FC00674D0A /* SystemConfiguration.framework */,
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
1D30AB110D05D00D00671497 /* Foundation.framework */,
288765A40DF7441C002DB57D /* CoreGraphics.framework */,
28D801B30F44B63D00FB423F /* CoreData.framework */,
Expand Down Expand Up @@ -763,13 +753,15 @@
83E77D421E2727790049AB02 /* Update Bundle Version Script */,
1D60588E0D05DD3D006BFB54 /* Sources */,
1D60588F0D05DD3D006BFB54 /* Frameworks */,
CEE3E41823C5E55C004648D1 /* Copy Carthage Frameworks Script */,
);
buildRules = (
);
dependencies = (
);
name = MobileOrg;
packageProductDependencies = (
5459EDBE25288F44001A77EA /* SwiftyDropbox */,
);
productName = MobileOrg;
productReference = 1D6058910D05DD3D006BFB54 /* MobileOrg.app */;
productType = "com.apple.product-type.application";
Expand Down Expand Up @@ -832,6 +824,9 @@
Base,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
packageReferences = (
5459EDBD25288F44001A77EA /* XCRemoteSwiftPackageReference "SwiftyDropbox" */,
);
productRefGroup = 19C28FACFE9D520D11CA2CBB /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -941,26 +936,6 @@
shellPath = /bin/sh;
shellScript = "git=`sh /etc/profile; which git`\nappBuild=`\"$git\" rev-list HEAD --count`\nif [ $CONFIGURATION = \"Debug\" ]; then\nbranchName=`\"$git\" rev-parse --abbrev-ref HEAD`\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $appBuild-$branchName\" \"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $appBuild-$branchName\" \"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}.dSYM/Contents/Info.plist\"\nelse\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $appBuild\" \"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $appBuild\" \"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}.dSYM/Contents/Info.plist\"\nfi\necho \"Incremented the build number ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\n";
};
CEE3E41823C5E55C004648D1 /* Copy Carthage Frameworks Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"$(SRCROOT)/Configuration/Carthage-in.xcfilelist",
);
inputPaths = (
);
name = "Copy Carthage Frameworks Script";
outputFileListPaths = (
"$(SRCROOT)/Configuration/Carthage-out.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "carthage copy-frameworks\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down Expand Up @@ -1137,6 +1112,25 @@
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
5459EDBD25288F44001A77EA /* XCRemoteSwiftPackageReference "SwiftyDropbox" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/dropbox/SwiftyDropbox.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 6.0.3;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
5459EDBE25288F44001A77EA /* SwiftyDropbox */ = {
isa = XCSwiftPackageProductDependency;
package = 5459EDBD25288F44001A77EA /* XCRemoteSwiftPackageReference "SwiftyDropbox" */;
productName = SwiftyDropbox;
};
/* End XCSwiftPackageProductDependency section */

/* Begin XCVersionGroup section */
745B1E2E1EC98C9B00D80421 /* MobileOrg2.xcdatamodeld */ = {
isa = XCVersionGroup;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"object": {
"pins": [
{
"package": "Alamofire",
"repositoryURL": "https://github.com/Alamofire/Alamofire.git",
"state": {
"branch": null,
"revision": "75bba56748359f297a83f620d45f72cf4ebee4e7",
"version": "4.8.2"
}
},
{
"package": "SwiftyDropbox",
"repositoryURL": "https://github.com/dropbox/SwiftyDropbox.git",
"state": {
"branch": null,
"revision": "1a99f77ae123722322af455cb71a96e72eb153e1",
"version": "6.0.3"
}
}
]
},
"version": 1
}
10 changes: 3 additions & 7 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,16 @@

** Setting up your environment

Xcode >=12 is required to build the project.

For the usage of the Dropbox API an application key is
necessary. You can obtain it [[https://www.dropbox.com/developers/apps/create][from Dropbox.]] It is important to apply
for keys of the *App Folder* type not the *Full Dropbox* type.

Find the file AppKey.plist in the project and obtain the information
you've received from Dropbox there.

MobileOrg uses Carthage. Install Carthage by following the
instructions [[https://github.com/Carthage/Carthage#installing-carthage][from here.]]
Install the needed dependencies by running
#+BEGIN_SRC shell
carthage bootstrap --platform ios
#+END_SRC
in your shell.
MobileOrg uses Swift Package Manager to resolve dependencies.

*** WebDAV tests

Expand Down