From f101757cbb2fa39db04e51c9d64b17d835337172 Mon Sep 17 00:00:00 2001 From: Andrew Podkovyrin Date: Wed, 9 Jan 2019 18:16:20 +0300 Subject: [PATCH 1/4] Add script to track DashSync version --- DashControl.xcodeproj/project.pbxproj | 23 +++++++++++++++++++++-- DashSyncCurrentCommit | 1 + Podfile | 14 ++++++++++++++ Podfile.lock | 2 +- scripts/dashsync_version.sh | 6 ++++++ 5 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 DashSyncCurrentCommit create mode 100755 scripts/dashsync_version.sh diff --git a/DashControl.xcodeproj/project.pbxproj b/DashControl.xcodeproj/project.pbxproj index ece5b97..5fb4728 100644 --- a/DashControl.xcodeproj/project.pbxproj +++ b/DashControl.xcodeproj/project.pbxproj @@ -124,13 +124,13 @@ 2A6FBEF5207C0CFF0055BAC8 /* News.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2A6FBEF4207C0CFF0055BAC8 /* News.storyboard */; }; 2A6FBEFA207C97510055BAC8 /* ProposalDetailVotesView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A6FBEF9207C97510055BAC8 /* ProposalDetailVotesView.m */; }; 2A6FBEFD207C98410055BAC8 /* ProposalDetailVotesViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A6FBEFC207C98410055BAC8 /* ProposalDetailVotesViewModel.m */; }; + 2A7DCCD720DB63FC0097049F /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 2A7DCCD920DB63FC0097049F /* Localizable.stringsdict */; }; 2A7F8F6E20F32D030048A9ED /* IPAddressTextFieldFormCellModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A7F8F6D20F32D030048A9ED /* IPAddressTextFieldFormCellModel.m */; }; 2A7F8F7120F330670048A9ED /* PrivateKeyTextFieldFormCellModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A7F8F7020F330670048A9ED /* PrivateKeyTextFieldFormCellModel.m */; }; 2A7F8F7B20F476070048A9ED /* DCBudgetProposalVoteEntity+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A7F8F7920F476070048A9ED /* DCBudgetProposalVoteEntity+CoreDataClass.m */; }; 2A7F8F7C20F476070048A9ED /* DCBudgetProposalVoteEntity+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A7F8F7A20F476070048A9ED /* DCBudgetProposalVoteEntity+CoreDataProperties.m */; }; 2A7F8F7F20F557320048A9ED /* UIImage+DCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A7F8F7E20F557320048A9ED /* UIImage+DCAdditions.m */; }; 2A7F8F8220F7359D0048A9ED /* PrivateKeyQRScannerViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A7F8F8120F7359D0048A9ED /* PrivateKeyQRScannerViewModel.m */; }; - 2A7DCCD720DB63FC0097049F /* Localizable.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = 2A7DCCD920DB63FC0097049F /* Localizable.stringsdict */; }; 2A80B584203699E70015E1AA /* DCPersistenceStack.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A80B583203699E70015E1AA /* DCPersistenceStack.m */; }; 2A80B58720369E7F0015E1AA /* NSData+Hash.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A80B58620369E7F0015E1AA /* NSData+Hash.m */; }; 2A80B58A2036A8F40015E1AA /* DCLogging.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A80B5892036A8F40015E1AA /* DCLogging.m */; }; @@ -501,6 +501,7 @@ 2A6FBEF9207C97510055BAC8 /* ProposalDetailVotesView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ProposalDetailVotesView.m; sourceTree = ""; }; 2A6FBEFB207C98410055BAC8 /* ProposalDetailVotesViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProposalDetailVotesViewModel.h; sourceTree = ""; }; 2A6FBEFC207C98410055BAC8 /* ProposalDetailVotesViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ProposalDetailVotesViewModel.m; sourceTree = ""; }; + 2A7DCCD820DB63FC0097049F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; 2A7F8F6C20F32D030048A9ED /* IPAddressTextFieldFormCellModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = IPAddressTextFieldFormCellModel.h; sourceTree = ""; }; 2A7F8F6D20F32D030048A9ED /* IPAddressTextFieldFormCellModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = IPAddressTextFieldFormCellModel.m; sourceTree = ""; }; 2A7F8F6F20F330670048A9ED /* PrivateKeyTextFieldFormCellModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrivateKeyTextFieldFormCellModel.h; sourceTree = ""; }; @@ -513,7 +514,6 @@ 2A7F8F7E20F557320048A9ED /* UIImage+DCAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIImage+DCAdditions.m"; sourceTree = ""; }; 2A7F8F8020F7359D0048A9ED /* PrivateKeyQRScannerViewModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrivateKeyQRScannerViewModel.h; sourceTree = ""; }; 2A7F8F8120F7359D0048A9ED /* PrivateKeyQRScannerViewModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrivateKeyQRScannerViewModel.m; sourceTree = ""; }; - 2A7DCCD820DB63FC0097049F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Localizable.stringsdict; sourceTree = ""; }; 2A80B582203699E70015E1AA /* DCPersistenceStack.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DCPersistenceStack.h; sourceTree = ""; }; 2A80B583203699E70015E1AA /* DCPersistenceStack.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DCPersistenceStack.m; sourceTree = ""; }; 2A80B58520369E7F0015E1AA /* NSData+Hash.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+Hash.h"; sourceTree = ""; }; @@ -1674,6 +1674,7 @@ buildConfigurationList = FB84EDD71F32898700E4D400 /* Build configuration list for PBXNativeTarget "DashControl" */; buildPhases = ( B13CDC11D77705DD862345F6 /* [CP] Check Pods Manifest.lock */, + 2A689C7321E646EF00E7C4BA /* Run Script - DashSync Version */, 2A44D5B820E9F0C40033E46B /* [Carthage] Run Script Copy Frameworks */, FB84EDB91F32898700E4D400 /* Sources */, FB84EDBA1F32898700E4D400 /* Frameworks */, @@ -1861,6 +1862,24 @@ shellPath = /bin/sh; shellScript = "/usr/local/bin/carthage copy-frameworks"; }; + 2A689C7321E646EF00E7C4BA /* Run Script - DashSync Version */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Run Script - DashSync Version"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/scripts/dashsync_version.sh\"\n"; + }; 2AB9AA7B20454F85005979C4 /* [Carthage] Run Script Copy Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/DashSyncCurrentCommit b/DashSyncCurrentCommit new file mode 100644 index 0000000..180216a --- /dev/null +++ b/DashSyncCurrentCommit @@ -0,0 +1 @@ +a8d56ee248724d73968ff1f7511867f91e70924d diff --git a/Podfile b/Podfile index ab6ba87..7a01bc1 100644 --- a/Podfile +++ b/Podfile @@ -22,3 +22,17 @@ end target 'DashControlTests' do app_pods end + +# fixes warnings about unsupported Deployment Target in Xcode 10 +post_install do |installer| + installer.pods_project.targets.each do |target| + if ['AFNetworking', 'RuntimeRoutines', 'SDWebImage', 'Godzippa'].include?(target.name) + target.build_configurations.each do |config| + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0' + end + end + end + + # update info about current DashSync version + system("bash scripts/dashsync_version.sh") +end diff --git a/Podfile.lock b/Podfile.lock index 7582bba..8fc18c6 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -78,6 +78,6 @@ SPEC CHECKSUMS: SimulatorStatusMagic: 28d4a9d1a500ac7cea0b2b5a43c1c6ddb40ba56c UIViewController-KeyboardAdditions: a691dc7e63a49854d341455a778ee8497dfc4662 -PODFILE CHECKSUM: aed60bb0d69db0a0c58511219052e28fda2ce52e +PODFILE CHECKSUM: 009b67ecef720f9f273d3889da281c0d3028fe4b COCOAPODS: 1.5.3 diff --git a/scripts/dashsync_version.sh b/scripts/dashsync_version.sh new file mode 100755 index 0000000..4bab7e7 --- /dev/null +++ b/scripts/dashsync_version.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +pushd "../DashSync/" +DASHSYNC_COMMIT=`git rev-parse HEAD` +popd +echo "$DASHSYNC_COMMIT" > DashSyncCurrentCommit From f1f9f9fb327748b7b1ad76095976a820f86e645d Mon Sep 17 00:00:00 2001 From: Andrew Podkovyrin Date: Wed, 9 Jan 2019 18:21:41 +0300 Subject: [PATCH 2/4] Upgrade Xcode project --- DashControl.xcodeproj/project.pbxproj | 3 ++- .../xcshareddata/xcschemes/DashControl.xcscheme | 2 +- .../xcshareddata/xcschemes/DashControlSnapshots.xcscheme | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DashControl.xcodeproj/project.pbxproj b/DashControl.xcodeproj/project.pbxproj index 5fb4728..35dc12a 100644 --- a/DashControl.xcodeproj/project.pbxproj +++ b/DashControl.xcodeproj/project.pbxproj @@ -1699,7 +1699,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1010; ORGANIZATIONNAME = dashfoundation; TargetAttributes = { 2AF39E88209AE7E100479948 = { @@ -2469,6 +2469,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; diff --git a/DashControl.xcodeproj/xcshareddata/xcschemes/DashControl.xcscheme b/DashControl.xcodeproj/xcshareddata/xcschemes/DashControl.xcscheme index 18a9a47..28c88eb 100644 --- a/DashControl.xcodeproj/xcshareddata/xcschemes/DashControl.xcscheme +++ b/DashControl.xcodeproj/xcshareddata/xcschemes/DashControl.xcscheme @@ -1,6 +1,6 @@ Date: Wed, 9 Jan 2019 18:23:18 +0300 Subject: [PATCH 3/4] Fix some warnings --- DashControl/AppDelegate.m | 2 +- DashControl/Resources/Main.storyboard | 20 -------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/DashControl/AppDelegate.m b/DashControl/AppDelegate.m index 3d8572a..a291e8c 100644 --- a/DashControl/AppDelegate.m +++ b/DashControl/AppDelegate.m @@ -109,7 +109,7 @@ - (void)applicationWillTerminate:(UIApplication *)application { #pragma mark - NSUserActivity Search API -- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)activity restorationHandler:(void (^)(NSArray *))restorationHandler { +- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)activity restorationHandler:(void(^)(NSArray> * __nullable restorableObjects))restorationHandler { BOOL wasHandled = NO; if ([activity.activityType isEqual:CSSearchableItemActionType]) { NSString *activityIdentifier = [activity.userInfo valueForKey:CSSearchableItemActivityIdentifier]; diff --git a/DashControl/Resources/Main.storyboard b/DashControl/Resources/Main.storyboard index 3ae86ae..379a136 100644 --- a/DashControl/Resources/Main.storyboard +++ b/DashControl/Resources/Main.storyboard @@ -57,25 +57,6 @@ - - - - - - - - - - - - - - - - - - - @@ -118,7 +99,6 @@ - From f3efaac9cd7ee26011b784fa82b89ee1e59de396 Mon Sep 17 00:00:00 2001 From: Andrew Podkovyrin Date: Wed, 9 Jan 2019 18:38:07 +0300 Subject: [PATCH 4/4] Fix snapshot tests --- DashControl.xcodeproj/project.pbxproj | 1 + DashControlSnapshots/DashControlSnapshots.swift | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DashControl.xcodeproj/project.pbxproj b/DashControl.xcodeproj/project.pbxproj index 35dc12a..6631ba4 100644 --- a/DashControl.xcodeproj/project.pbxproj +++ b/DashControl.xcodeproj/project.pbxproj @@ -1704,6 +1704,7 @@ TargetAttributes = { 2AF39E88209AE7E100479948 = { CreatedOnToolsVersion = 9.3; + LastSwiftMigration = 1010; ProvisioningStyle = Automatic; TestTargetID = FB84EDBC1F32898700E4D400; }; diff --git a/DashControlSnapshots/DashControlSnapshots.swift b/DashControlSnapshots/DashControlSnapshots.swift index 2c555ec..a266476 100644 --- a/DashControlSnapshots/DashControlSnapshots.swift +++ b/DashControlSnapshots/DashControlSnapshots.swift @@ -51,11 +51,11 @@ class DashControlSnapshots: XCTestCase { // ---------------------------- - tabBarsQuery.buttons["Price"].tap() - app.staticTexts["1W"].tap() - app.staticTexts["4H"].tap() - - snapshot("2Price") +// tabBarsQuery.buttons["Price"].tap() +// app.staticTexts["1W"].tap() +// app.staticTexts["4H"].tap() +// +// snapshot("2Price") // ----------------------------