From dcd1cb7d4707796589956177e1a461b3d4aa977d Mon Sep 17 00:00:00 2001 From: Flowinho Date: Tue, 2 May 2017 21:13:15 +0200 Subject: [PATCH 01/12] Add shortcut definitions to app config --- standardnotes/Info.plist | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/standardnotes/Info.plist b/standardnotes/Info.plist index d0e9c22..a160eea 100644 --- a/standardnotes/Info.plist +++ b/standardnotes/Info.plist @@ -34,6 +34,19 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIApplicationShortcutItems + + + UIApplicationShortcutItemIconType + add + UIApplicationShortcutItemSubtitle + Open the Composer + UIApplicationShortcutItemTitle + Create new Note + UIApplicationShortcutItemType + org.standardnotes.standardnotes.new-note + + UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait From 643e06f0748a665378469e738f40a0f19e0e2694 Mon Sep 17 00:00:00 2001 From: Flowinho Date: Tue, 2 May 2017 21:27:49 +0200 Subject: [PATCH 02/12] Add "All Notes" shortcut to config plist --- standardnotes/Info.plist | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/standardnotes/Info.plist b/standardnotes/Info.plist index a160eea..e3447db 100644 --- a/standardnotes/Info.plist +++ b/standardnotes/Info.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion en + CFBundleDisplayName + Fancy Notes CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -20,6 +22,25 @@ 1 LSRequiresIPhoneOS + UIApplicationShortcutItems + + + UIApplicationShortcutItemType + org.standardnotes.standardnotes.list-notes + UIApplicationShortcutItemTitle + All Notes + UIApplicationShortcutItemIconType + UIApplicationShortcutIconTypeHome + + + UIApplicationShortcutItemIconType + UIApplicationShortcutIconTypeAdd + UIApplicationShortcutItemTitle + Create new Note + UIApplicationShortcutItemType + org.standardnotes.standardnotes.new-note + + UILaunchStoryboardName LaunchScreen UIMainStoryboardFile @@ -34,19 +55,6 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight - UIApplicationShortcutItems - - - UIApplicationShortcutItemIconType - add - UIApplicationShortcutItemSubtitle - Open the Composer - UIApplicationShortcutItemTitle - Create new Note - UIApplicationShortcutItemType - org.standardnotes.standardnotes.new-note - - UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait From 58ec680bd8256798cb77d369143badc3e722c579 Mon Sep 17 00:00:00 2001 From: Flowinho Date: Tue, 2 May 2017 21:28:17 +0200 Subject: [PATCH 03/12] Add BundleId to not collide with main app --- standardnotes.xcodeproj/project.pbxproj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/standardnotes.xcodeproj/project.pbxproj b/standardnotes.xcodeproj/project.pbxproj index 3ab9328..4c372aa 100644 --- a/standardnotes.xcodeproj/project.pbxproj +++ b/standardnotes.xcodeproj/project.pbxproj @@ -360,7 +360,7 @@ TargetAttributes = { B82B6DF61E08AA660025C3EC = { CreatedOnToolsVersion = 8.2; - DevelopmentTeam = HKF9BXSN95; + DevelopmentTeam = V79G9DGK5T; LastSwiftMigration = 0820; ProvisioningStyle = Automatic; }; @@ -636,7 +636,7 @@ CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEVELOPMENT_TEAM = HKF9BXSN95; + DEVELOPMENT_TEAM = V79G9DGK5T; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -646,7 +646,7 @@ INFOPLIST_FILE = standardnotes/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.standardnotes.standardnotes; + PRODUCT_BUNDLE_IDENTIFIER = org.standardnotes.standardnotes.dev; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "standardnotes-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -661,7 +661,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - DEVELOPMENT_TEAM = HKF9BXSN95; + DEVELOPMENT_TEAM = V79G9DGK5T; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -671,7 +671,7 @@ INFOPLIST_FILE = standardnotes/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = org.standardnotes.standardnotes; + PRODUCT_BUNDLE_IDENTIFIER = org.standardnotes.standardnotes.dev; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "standardnotes-Bridging-Header.h"; SWIFT_VERSION = 3.0; From d7d983feb49226dbd90c82b60ebfdbfe09111575 Mon Sep 17 00:00:00 2001 From: Flowinho Date: Tue, 2 May 2017 21:52:44 +0200 Subject: [PATCH 04/12] Extend AppDelegate and add event processing --- standardnotes.xcodeproj/project.pbxproj | 14 +++++- standardnotes/AppDelegate+AppShortcuts.swift | 51 ++++++++++++++++++++ standardnotes/AppDelegate.swift | 3 +- 3 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 standardnotes/AppDelegate+AppShortcuts.swift diff --git a/standardnotes.xcodeproj/project.pbxproj b/standardnotes.xcodeproj/project.pbxproj index 4c372aa..a75ba93 100644 --- a/standardnotes.xcodeproj/project.pbxproj +++ b/standardnotes.xcodeproj/project.pbxproj @@ -39,6 +39,7 @@ B89178E41E0DBDC500163EA7 /* NoteTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B89178E31E0DBDC500163EA7 /* NoteTableViewCell.swift */; }; B89178E81E0DC81500163EA7 /* TagTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B89178E71E0DC81500163EA7 /* TagTableViewCell.swift */; }; CDAAB63F1E0DE3B30033487A /* ViewController+Util.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDAAB63E1E0DE3B30033487A /* ViewController+Util.swift */; }; + EB1897191EB9196E00D9384F /* AppDelegate+AppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB1897181EB9196E00D9384F /* AppDelegate+AppShortcuts.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -150,6 +151,7 @@ B89178E31E0DBDC500163EA7 /* NoteTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NoteTableViewCell.swift; sourceTree = ""; }; B89178E71E0DC81500163EA7 /* TagTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TagTableViewCell.swift; sourceTree = ""; }; CDAAB63E1E0DE3B30033487A /* ViewController+Util.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ViewController+Util.swift"; sourceTree = ""; }; + EB1897181EB9196E00D9384F /* AppDelegate+AppShortcuts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+AppShortcuts.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -224,7 +226,7 @@ B82B6DF91E08AA660025C3EC /* standardnotes */ = { isa = PBXGroup; children = ( - B82B6DFA1E08AA660025C3EC /* AppDelegate.swift */, + EB1897171EB9194100D9384F /* App Delegate */, B8046A721E2A8074006A5F03 /* Theme.swift */, B809F2B91E0B5173007D5700 /* View Controllers */, CDAAB6411E0DE4D30033487A /* Controllers */, @@ -325,6 +327,15 @@ name = "Supporting Files"; sourceTree = ""; }; + EB1897171EB9194100D9384F /* App Delegate */ = { + isa = PBXGroup; + children = ( + B82B6DFA1E08AA660025C3EC /* AppDelegate.swift */, + EB1897181EB9196E00D9384F /* AppDelegate+AppShortcuts.swift */, + ); + name = "App Delegate"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -501,6 +512,7 @@ B878C4A01E09A1DD002A876F /* ItemManager.swift in Sources */, B89178DC1E0CA96E00163EA7 /* TagsViewController.swift in Sources */, B89178E01E0D84C200163EA7 /* UserManager.swift in Sources */, + EB1897191EB9196E00D9384F /* AppDelegate+AppShortcuts.swift in Sources */, B878C4B21E09ADF6002A876F /* Crypto.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/standardnotes/AppDelegate+AppShortcuts.swift b/standardnotes/AppDelegate+AppShortcuts.swift new file mode 100644 index 0000000..a38c49c --- /dev/null +++ b/standardnotes/AppDelegate+AppShortcuts.swift @@ -0,0 +1,51 @@ +// +// AppDelegate+AppShortcuts.swift +// standardnotes +// +// Created by Seishinryoku on 02.05.17. +// Copyright © 2017 Standard Notes. All rights reserved. +// + +import Foundation +import UIKit + +enum ApplicationShortCut:String { + case newNote = "org.standardnotes.standardnotes.new-note" + case listNotes = "org.standardnotes.standardnotes.list-notes" +} + +extension AppDelegate { + + // MARK: - 3D Touch Application shortcut handling + func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) { + completionHandler(handleShortcut(item:shortcutItem)) + } + + func handleShortcut(item:UIApplicationShortcutItem) -> Bool { + print(item.type) + guard let shortCut = ApplicationShortCut.init(rawValue: item.type) else { + return false + } + + var succeeded = false + switch shortCut { + case .newNote: + navigateToViewControllerFor(shortcut: shortCut) + succeeded = true + case .listNotes: + navigateToViewControllerFor(shortcut: shortCut) + succeeded = true + } + return succeeded + } + + func navigateToViewControllerFor(shortcut:ApplicationShortCut){ + switch shortcut { + case .newNote: + print("") + case .listNotes: + navigateToNotesController(afterDelay: 0.01) + } + } +} + diff --git a/standardnotes/AppDelegate.swift b/standardnotes/AppDelegate.swift index fd0c164..c5df0f4 100644 --- a/standardnotes/AppDelegate.swift +++ b/standardnotes/AppDelegate.swift @@ -11,7 +11,6 @@ import CoreData import LocalAuthentication import HockeySDK - @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -103,7 +102,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { }) return container }() - + // MARK: - Core Data Saving support func saveContext () { From 1c119f783c08c3741d7a91c08ba7ba93a6b3f04b Mon Sep 17 00:00:00 2001 From: Flowinho Date: Tue, 2 May 2017 22:37:01 +0200 Subject: [PATCH 05/12] Add broken transition to composer The ViewControllers are not usable on their own and need to be displayed by an embedded navigation controller. When instantiating a view controller without pushing it through a navigation controller, the topBar is missing, leaving the user without a [Done] button. A first step solution that doesnt require structural changes to the storyboard would be to gain access to the current displaying viewController and make it push the composer viewcontroller. However, an optional binding check for NotesViewController on the selectedViewController-Property of the apps tabbarcontroller fails. --- .../xcshareddata/standardnotes.xcscmblueprint | 6 +++--- standardnotes/AppDelegate+AppShortcuts.swift | 21 ++++++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/standardnotes.xcodeproj/project.xcworkspace/xcshareddata/standardnotes.xcscmblueprint b/standardnotes.xcodeproj/project.xcworkspace/xcshareddata/standardnotes.xcscmblueprint index a90582b..8c79a5b 100644 --- a/standardnotes.xcodeproj/project.xcworkspace/xcshareddata/standardnotes.xcscmblueprint +++ b/standardnotes.xcodeproj/project.xcworkspace/xcshareddata/standardnotes.xcscmblueprint @@ -12,11 +12,11 @@ }, "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "6614577D-AFD4-48D3-837E-693D8F3C5232", "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { - "79E4DA54FAC41C8AFB3B666E164C71E775A27450" : "iOS\/", + "79E4DA54FAC41C8AFB3B666E164C71E775A27450" : "standardNotes_iOS\/", "DEDD58F0BAF28034A74179391A23AC2E0219CDC3" : "standardnotes\/vendor\/RNCryptor\/", "C3D8ED1CB28D809ADCE2C0DE74935E8A502ACD53" : "standardnotes\/vendor\/CryptoSwift\/", - "C861FC00CEE0F6A6BE81FCFF6785FAA78C58EBB3" : "iOS\/vendor\/SwiftyJSON\/", - "67620B5EFA902936DF04070AF595B76AB0333747" : "iOS\/vendor\/Alamofire\/" + "C861FC00CEE0F6A6BE81FCFF6785FAA78C58EBB3" : "standardNotes_iOS\/vendor\/SwiftyJSON\/", + "67620B5EFA902936DF04070AF595B76AB0333747" : "standardNotes_iOS\/vendor\/Alamofire\/" }, "DVTSourceControlWorkspaceBlueprintNameKey" : "standardnotes", "DVTSourceControlWorkspaceBlueprintVersion" : 204, diff --git a/standardnotes/AppDelegate+AppShortcuts.swift b/standardnotes/AppDelegate+AppShortcuts.swift index a38c49c..3da0ed9 100644 --- a/standardnotes/AppDelegate+AppShortcuts.swift +++ b/standardnotes/AppDelegate+AppShortcuts.swift @@ -42,10 +42,29 @@ extension AppDelegate { func navigateToViewControllerFor(shortcut:ApplicationShortCut){ switch shortcut { case .newNote: - print("") + navigateToComposerController(after: 0.01) case .listNotes: navigateToNotesController(afterDelay: 0.01) } } + + func navigateToComposerController(after delayInSeconds: Double) { + delay(delayInSeconds) { + // This is needed to get access to the navigation controller since the storyboard defines nested + // navigation controllers. + // Double checking this. + if let tabController = UIApplication.shared.keyWindow?.rootViewController as? UITabBarController { + tabController.selectedIndex = 0 + // This optional binding to NotesViewController fails. Investigate + if let notesVC = tabController.selectedViewController as? NotesViewController { + // String identifier for viewController reference in SB - replace this by an enum + if let compose = notesVC.storyboard?.instantiateViewController(withIdentifier: "Compose") as? ComposeViewController { + notesVC.navigationController?.pushViewController(compose, animated: true) + } + } + } + } + } + } From d30cf2d4327c1699e45a3f3b0ee16c4d47406d86 Mon Sep 17 00:00:00 2001 From: Flowinho Date: Tue, 2 May 2017 22:42:55 +0200 Subject: [PATCH 06/12] Adjusting file headers --- standardnotes/AppDelegate+AppShortcuts.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/standardnotes/AppDelegate+AppShortcuts.swift b/standardnotes/AppDelegate+AppShortcuts.swift index 3da0ed9..0fd4330 100644 --- a/standardnotes/AppDelegate+AppShortcuts.swift +++ b/standardnotes/AppDelegate+AppShortcuts.swift @@ -2,8 +2,8 @@ // AppDelegate+AppShortcuts.swift // standardnotes // -// Created by Seishinryoku on 02.05.17. -// Copyright © 2017 Standard Notes. All rights reserved. +// Created by Florian Schuttkowski (Flowinho) on 02.05.17. +// Copyright © 2017 Standard Notes / Florian Schuttkowski. All rights reserved. // import Foundation From f145a446a9abc8792a01e8e647ca89bfdb70269c Mon Sep 17 00:00:00 2001 From: Flowinho Date: Wed, 3 May 2017 20:24:56 +0200 Subject: [PATCH 07/12] Clean up some unnecessary loc --- standardnotes/AppDelegate+AppShortcuts.swift | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/standardnotes/AppDelegate+AppShortcuts.swift b/standardnotes/AppDelegate+AppShortcuts.swift index 0fd4330..9b1746b 100644 --- a/standardnotes/AppDelegate+AppShortcuts.swift +++ b/standardnotes/AppDelegate+AppShortcuts.swift @@ -30,23 +30,14 @@ extension AppDelegate { var succeeded = false switch shortCut { case .newNote: - navigateToViewControllerFor(shortcut: shortCut) + navigateToComposerController(after: 0.01) succeeded = true case .listNotes: - navigateToViewControllerFor(shortcut: shortCut) + navigateToNotesController(afterDelay: 0.01) succeeded = true } return succeeded } - - func navigateToViewControllerFor(shortcut:ApplicationShortCut){ - switch shortcut { - case .newNote: - navigateToComposerController(after: 0.01) - case .listNotes: - navigateToNotesController(afterDelay: 0.01) - } - } func navigateToComposerController(after delayInSeconds: Double) { delay(delayInSeconds) { From 2c18254206e1c7bd7a9bae2a9ec5c9a154858a80 Mon Sep 17 00:00:00 2001 From: Flowinho Date: Wed, 3 May 2017 20:34:03 +0200 Subject: [PATCH 08/12] Adding 3DTouch to current vc structure --- standardnotes/AppDelegate+AppShortcuts.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/standardnotes/AppDelegate+AppShortcuts.swift b/standardnotes/AppDelegate+AppShortcuts.swift index 9b1746b..c8da019 100644 --- a/standardnotes/AppDelegate+AppShortcuts.swift +++ b/standardnotes/AppDelegate+AppShortcuts.swift @@ -45,12 +45,11 @@ extension AppDelegate { // navigation controllers. // Double checking this. if let tabController = UIApplication.shared.keyWindow?.rootViewController as? UITabBarController { - tabController.selectedIndex = 0 // This optional binding to NotesViewController fails. Investigate - if let notesVC = tabController.selectedViewController as? NotesViewController { + if let navController = tabController.selectedViewController as? UINavigationController { // String identifier for viewController reference in SB - replace this by an enum - if let compose = notesVC.storyboard?.instantiateViewController(withIdentifier: "Compose") as? ComposeViewController { - notesVC.navigationController?.pushViewController(compose, animated: true) + if let compose = navController.storyboard?.instantiateViewController(withIdentifier: "Compose") as? ComposeViewController { + navController.pushViewController(compose, animated: true) } } } From 8dc8b5cd87328eae6ab835c45cb6aff61d61c38d Mon Sep 17 00:00:00 2001 From: Flowinho Date: Wed, 3 May 2017 21:06:50 +0200 Subject: [PATCH 09/12] Add plistupdater --- GIT-Info.plist | 18 ++++++++++++++++++ standardnotes.xcodeproj/project.pbxproj | 6 +++++- standardnotes/GIT-Info.plist | 5 +++++ standardnotes/Info.plist | 2 +- 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 GIT-Info.plist create mode 100644 standardnotes/GIT-Info.plist diff --git a/GIT-Info.plist b/GIT-Info.plist new file mode 100644 index 0000000..251bdfe --- /dev/null +++ b/GIT-Info.plist @@ -0,0 +1,18 @@ + + + + + GITCurrentBranchCommitCount + 0 + GITCurrentBranchName + master + GITLastCommitLog + 2c18254 - Flowinho, 30 minutes ago : Adding 3DTouch to current vc structure + GITMasterCommitCount + 107 + GITRevisionHash + 2c18254206e1c7bd7a9bae2a9ec5c9a154858a80 + GITVersionTag + 0.1 + + diff --git a/standardnotes.xcodeproj/project.pbxproj b/standardnotes.xcodeproj/project.pbxproj index a75ba93..5c8dba5 100644 --- a/standardnotes.xcodeproj/project.pbxproj +++ b/standardnotes.xcodeproj/project.pbxproj @@ -40,6 +40,7 @@ B89178E81E0DC81500163EA7 /* TagTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B89178E71E0DC81500163EA7 /* TagTableViewCell.swift */; }; CDAAB63F1E0DE3B30033487A /* ViewController+Util.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDAAB63E1E0DE3B30033487A /* ViewController+Util.swift */; }; EB1897191EB9196E00D9384F /* AppDelegate+AppShortcuts.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB1897181EB9196E00D9384F /* AppDelegate+AppShortcuts.swift */; }; + EB1897241EBA5D2700D9384F /* GIT-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = EB1897231EBA5D2700D9384F /* GIT-Info.plist */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -152,6 +153,7 @@ B89178E71E0DC81500163EA7 /* TagTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TagTableViewCell.swift; sourceTree = ""; }; CDAAB63E1E0DE3B30033487A /* ViewController+Util.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ViewController+Util.swift"; sourceTree = ""; }; EB1897181EB9196E00D9384F /* AppDelegate+AppShortcuts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+AppShortcuts.swift"; sourceTree = ""; }; + EB1897231EBA5D2700D9384F /* GIT-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GIT-Info.plist"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -319,6 +321,7 @@ CDAAB6421E0DE4DE0033487A /* Supporting Files */ = { isa = PBXGroup; children = ( + EB1897231EBA5D2700D9384F /* GIT-Info.plist */, B872EC871E08D00400CC7656 /* standardnotes-Bridging-Header.h */, B82B6E041E08AA660025C3EC /* Assets.xcassets */, B82B6E061E08AA660025C3EC /* LaunchScreen.storyboard */, @@ -461,6 +464,7 @@ B82B6E081E08AA660025C3EC /* LaunchScreen.storyboard in Resources */, B819588E1E96D19000422600 /* HockeySDKResources.bundle in Resources */, B82B6E051E08AA660025C3EC /* Assets.xcassets in Resources */, + EB1897241EBA5D2700D9384F /* GIT-Info.plist in Resources */, B82B6E001E08AA660025C3EC /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -479,7 +483,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "FILE=\"${SRCROOT}/HockeySDK-iOS/BuildAgent\"\nif [ -f \"$FILE\" ]; then\n\"$FILE\"\nfi"; + shellScript = "FILE=\"${SRCROOT}/HockeySDK-iOS/BuildAgent\"\nif [ -f \"$FILE\" ]; then\n\"$FILE\"\nfi\n#--------------------------------------------------------------------------------------#\n# This script uses the GIT terminal commands to retrieve\n# repository information which is then added to a propertylist\n# using /usr/libexec/PListBuddy.\n#\n# Requirements: xcode-commandline-tools, OS X > 10.6, GIT installed\n# Author: Flowinho <> http://github.com/flowinho\n# Feel free to help me enhance the functionality.\n#\n# Most git command examples are taken from http://git-scm.com\n#\n# Usage:\n# - Each Build: Copy&Paste into the \"Run Script\" Build Phase of your xcodeproj\n# - Manually: Execute manually from terminal\n#--------------------------------------------------------------------------------------#\n\nset -o errexit\nset -o nounset\n\n#---------------------------------------------------------------------#\n## Check dependencies\n# GIT setup\nhash git 2>/dev/null || { echo >&2 \"There is no local installation of GIT available. Script cannot be executed.\"; exit 0; }\n# Define or locate property list to update\n# If the PList is not available at the target location, it will be created.\nGIT_INFO_LIST=\"${PROJECT_DIR}/GIT-Info.plist\"\nPROJECT_INFO_LIST=\"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\n\n# Define the branch to use, this should be master in almost every usecase.\nTARGET_BRANCH=\"master\"\n\n#---------------------------------------------------------------------#\n## Execute GIT information fetch\nLATEST_TAG=$(git describe --tags 2>/dev/null) || LATEST_TAG=\"HEAD\"\nMOST_RECENT_VERSION_TAG=$(git describe --abbrev=0 --tags)\nREVISION_HASH_HEAD=$(git rev-parse HEAD)\nCURRENT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)\nLAST_COMMIT=$(git log -1 --pretty=format:\"%h - %an, %ar : %s\")\n\nCOMMIT_COUNT_SINCE_TAG=0\n\n#---------------------------------------------------------------------#\n## Current branch: Calculate amount commits since most recent tag.\nif [ $LATEST_TAG == \"HEAD\" ]\nthen COMMIT_COUNT=$(git rev-list --count HEAD)\nLATEST_TAG=\"0.$COMMIT_COUNT\"\nCOMMIT_COUNT_SINCE_TAG=0\nelse\nCOMMIT_COUNT_SINCE_TAG=$(git rev-list --count ${LATEST_TAG}..)\nfi\n\n## Calculate overall amount of commits in current branch & master branch\nif [ $(git rev-parse --abbrev-ref HEAD) = master ]; then\nTARGET_BRANCH_COMMIT_COUNT=$(git rev-list --count HEAD)\nBRANCH_COMMIT_COUNT=0\nelse\n##TARGET_BRANCH_COMMIT_COUNT=$(git rev-list --count $(git rev-list master.. | tail -n 1)^)\nBRANCH_COMMIT_COUNT=$(git rev-list --count $CURRENT_BRANCH_NAME..)\nTARGET_BRANCH_COMMIT_COUNT=$(git rev-list --count master..)\nfi\n\n#---------------------------------------------------------------------#\n## Generate Full Version Definition - this differs from Project to Project, adjust as you like.\nFULL_VERSION=\"$MOST_RECENT_VERSION_TAG.$TARGET_BRANCH_COMMIT_COUNT\"\n\n#---------------------------------------------------------------------#\n## Debug the information to the console\necho \"\"\necho \"--------------------- GIT Bash Script - PList Updater ---------------------\"\necho \"LATEST_TAG: $LATEST_TAG\"\necho \"MOST_RECENT_VERSION_TAG: $MOST_RECENT_VERSION_TAG\"\necho \"REVISION_HASH_HEAD: $REVISION_HASH_HEAD\"\necho \"TARGET_BRANCH: $TARGET_BRANCH\"\necho \"CURRENT_BRANCH_NAME: $CURRENT_BRANCH_NAME\"\necho \"LAST_COMMIT: $LAST_COMMIT\"\necho \"TARGET_BRANCH_COMMIT_COUNT: $TARGET_BRANCH_COMMIT_COUNT\"\necho \"BRANCH_COMMIT_COUNT: $BRANCH_COMMIT_COUNT\"\necho \"---------------------------------------------------------------------------\"\n\n#---------------------------------------------------------------------#\n## Save for future use\n/usr/libexec/PlistBuddy -c \"Add :GITVersionTag string $MOST_RECENT_VERSION_TAG\" \"$GIT_INFO_LIST\" 2>/dev/null || /usr/libexec/PlistBuddy -c \"Set :GITVersionTag $MOST_RECENT_VERSION_TAG\" \"$GIT_INFO_LIST\"\n/usr/libexec/PlistBuddy -c \"Add :GITRevisionHash string $REVISION_HASH_HEAD\" \"$GIT_INFO_LIST\" 2>/dev/null || /usr/libexec/PlistBuddy -c \"Set :GITRevisionHash $REVISION_HASH_HEAD\" \"$GIT_INFO_LIST\"\n/usr/libexec/PlistBuddy -c \"Add :GITMasterCommitCount string $TARGET_BRANCH_COMMIT_COUNT\" \"$GIT_INFO_LIST\" 2>/dev/null || /usr/libexec/PlistBuddy -c \"Set :GITMasterCommitCount $TARGET_BRANCH_COMMIT_COUNT\" \"$GIT_INFO_LIST\"\n/usr/libexec/PlistBuddy -c \"Add :GITCurrentBranchName string $CURRENT_BRANCH_NAME\" \"$GIT_INFO_LIST\" 2>/dev/null || /usr/libexec/PlistBuddy -c \"Set :GITCurrentBranchName $CURRENT_BRANCH_NAME\" \"$GIT_INFO_LIST\"\n/usr/libexec/PlistBuddy -c \"Add :GITCurrentBranchCommitCount string $BRANCH_COMMIT_COUNT\" \"$GIT_INFO_LIST\" 2>/dev/null || /usr/libexec/PlistBuddy -c \"Set :GITCurrentBranchCommitCount $BRANCH_COMMIT_COUNT\" \"$GIT_INFO_LIST\"\n/usr/libexec/PlistBuddy -c \"Add :GITLastCommitLog string $LAST_COMMIT\" \"$GIT_INFO_LIST\" 2>/dev/null || /usr/libexec/PlistBuddy -c \"Set :GITLastCommitLog $LAST_COMMIT\" \"$GIT_INFO_LIST\"\n\n## Update iOS Properties\n/usr/libexec/PlistBuddy -c \"Add :CFBundleShortVersionString string $MOST_RECENT_VERSION_TAG\" \"$PROJECT_INFO_LIST\" 2>/dev/null || /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $MOST_RECENT_VERSION_TAG\" \"$PROJECT_INFO_LIST\"\n/usr/libexec/PlistBuddy -c \"Add :CFBundleVersion string $FULL_VERSION\" \"$PROJECT_INFO_LIST\" 2>/dev/null || /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $FULL_VERSION\" \"$PROJECT_INFO_LIST\"\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/standardnotes/GIT-Info.plist b/standardnotes/GIT-Info.plist new file mode 100644 index 0000000..0c67376 --- /dev/null +++ b/standardnotes/GIT-Info.plist @@ -0,0 +1,5 @@ + + + + + diff --git a/standardnotes/Info.plist b/standardnotes/Info.plist index e3447db..4873ac8 100644 --- a/standardnotes/Info.plist +++ b/standardnotes/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.1.6 + CFBundleVersion 1 LSRequiresIPhoneOS From 2fa14c3603047f1be6de671bea403687c0271328 Mon Sep 17 00:00:00 2001 From: Flowinho Date: Wed, 3 May 2017 21:11:27 +0200 Subject: [PATCH 10/12] Font adjustments for the notes screen --- GIT-Info.plist | 6 +-- standardnotes/Base.lproj/Main.storyboard | 62 ++++++++++++------------ 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/GIT-Info.plist b/GIT-Info.plist index 251bdfe..8f968cc 100644 --- a/GIT-Info.plist +++ b/GIT-Info.plist @@ -7,11 +7,11 @@ GITCurrentBranchName master GITLastCommitLog - 2c18254 - Flowinho, 30 minutes ago : Adding 3DTouch to current vc structure + 8dc8b5c - Flowinho, 3 minutes ago : Add plistupdater GITMasterCommitCount - 107 + 108 GITRevisionHash - 2c18254206e1c7bd7a9bae2a9ec5c9a154858a80 + 8dc8b5cd87328eae6ab835c45cb6aff61d61c38d GITVersionTag 0.1 diff --git a/standardnotes/Base.lproj/Main.storyboard b/standardnotes/Base.lproj/Main.storyboard index 7af6ba4..57e95e0 100644 --- a/standardnotes/Base.lproj/Main.storyboard +++ b/standardnotes/Base.lproj/Main.storyboard @@ -1,11 +1,11 @@ - + - + @@ -31,18 +31,18 @@ - + @@ -209,11 +209,11 @@ - + - + @@ -221,7 +221,7 @@