From 55cceb0c5b8e222c8fe8dad8eb766bdca42b5c77 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Tue, 17 Sep 2019 14:04:58 -0500 Subject: [PATCH 01/13] Update travis xcode version --- Vokal-Cocoa Touch Application Base.xctemplate/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/.travis.yml b/Vokal-Cocoa Touch Application Base.xctemplate/.travis.yml index a6be31e..5ec1f21 100755 --- a/Vokal-Cocoa Touch Application Base.xctemplate/.travis.yml +++ b/Vokal-Cocoa Touch Application Base.xctemplate/.travis.yml @@ -1,5 +1,5 @@ language: swift -osx_image: xcode10.2 +osx_image: xcode11 before_install: - echo -e "machine github.com\n login ${CI_USER_TOKEN}" >> ~/.netrc before_script: From aa7299ca1ebd506ce188722adfaa6fe9b08f9d08 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Wed, 18 Sep 2019 11:07:34 -0500 Subject: [PATCH 02/13] Bump Swift version --- .../TemplateInfo.plist | 2 -- Vokal-Swift.xctemplate/TemplateInfo.plist | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist b/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist index 252b2ba..2bb7295 100755 --- a/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist +++ b/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist @@ -347,8 +347,6 @@ end CODE_SIGN_IDENTITY[sdk=iphoneos*] iPhone Developer - SWIFT_VERSION - 5.0 Targets diff --git a/Vokal-Swift.xctemplate/TemplateInfo.plist b/Vokal-Swift.xctemplate/TemplateInfo.plist index 5a0647f..83ed53a 100755 --- a/Vokal-Swift.xctemplate/TemplateInfo.plist +++ b/Vokal-Swift.xctemplate/TemplateInfo.plist @@ -290,6 +290,11 @@ -Owholemodule + SharedSettings + + SWIFT_VERSION + 5.1 + Options From 9e3c452b9ba327a95979d50d3eebd15f231ff31a Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Wed, 18 Sep 2019 11:16:00 -0500 Subject: [PATCH 03/13] Add Flows folder --- .../TemplateInfo.plist | 12 ++++++++++++ install.sh | 1 + 2 files changed, 13 insertions(+) diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist b/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist index 2bb7295..8d5da5e 100755 --- a/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist +++ b/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist @@ -14,6 +14,17 @@ Definitions + Flows/.gitkeep + + Group + + Flows + + Path + .gitkeep + TargetIndices + + Views/.gitkeep Group @@ -231,6 +242,7 @@ end Nodes + Flows/.gitkeep Controls/.gitkeep Data Sources/.gitkeep Resources/.gitkeep diff --git a/install.sh b/install.sh index bba2514..e888cae 100755 --- a/install.sh +++ b/install.sh @@ -32,6 +32,7 @@ declare -a emptyDirectories=( "Controls" "Data Sources" "Extensions" + "Flows" "Fonts" "Resources" "Scripts" From db4981ff34a900611d03f159f9accb60f6f90da8 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Wed, 18 Sep 2019 11:45:44 -0500 Subject: [PATCH 04/13] Remove TrueColors file --- .../___PACKAGENAME___.truecolors | Bin 404 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 Vokal-Cocoa Touch Application Base.xctemplate/___PACKAGENAME___.truecolors diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/___PACKAGENAME___.truecolors b/Vokal-Cocoa Touch Application Base.xctemplate/___PACKAGENAME___.truecolors deleted file mode 100755 index b11eae9780877f96631568c561396d4835a7fdf1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 404 zcmWIWW@h1H;Nak35G-}^U_b&2Kz4k5e1M~~x1+nOpQEoUkf)!PlUSmgl30?cmsOmf zxB6L7K)@+qUCmQIdSO8uf;yftaUFTp;BxuXXRixKCw(sd)IEV^XBK0CH#>)|YFV%b z&`d`l4!~)vG*(-wU?C%u95ceB$c|9}S_uP78bK^V-VX4_Z5qe}FtDVt49LVZ4ep%) SZ&o&tVkRJ*4y2!hI1B*e|7AG< From c1676e4896494fb4b3bd656aa21a9a9454e20827 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Wed, 18 Sep 2019 12:01:39 -0500 Subject: [PATCH 05/13] Simplify storyboard name --- ...PACKAGENAME___.storyboard => Main.storyboard} | 0 .../TemplateInfo.plist | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) rename Vokal-Cocoa Touch Application Base.xctemplate/{Main-___PACKAGENAME___.storyboard => Main.storyboard} (100%) diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard b/Vokal-Cocoa Touch Application Base.xctemplate/Main.storyboard similarity index 100% rename from Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard rename to Vokal-Cocoa Touch Application Base.xctemplate/Main.storyboard diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist b/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist index 8d5da5e..a94507d 100755 --- a/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist +++ b/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist @@ -185,10 +185,10 @@ end SortOrder 101 - Base.lproj/Main-___PACKAGENAME___.storyboard + Base.lproj/Main.storyboard Path - Main-___PACKAGENAME___.storyboard + Main.storyboard SortOrder 100 @@ -217,7 +217,7 @@ end Info.plist:UIMainStoryboardFile <key>UIMainStoryboardFile</key> -<string>Main-___PACKAGENAME___</string> +<string>Main</string> Info.plist:UIRequiredDeviceCapabilities Beginning @@ -261,7 +261,7 @@ end Info.plist:UIMainStoryboardFile Info.plist:UIRequiredDeviceCapabilities:base Base.lproj/LaunchScreen.storyboard - Base.lproj/Main-___PACKAGENAME___.storyboard + Base.lproj/Main.storyboard Scripts/Version_Incrementing_Run_Script.sh Settings.bundle @@ -349,6 +349,14 @@ end Info.plist:UISupportedInterfaceOrientations~iPhone + Project + + SharedSettings + + TARGETED_DEVICE_FAMILY + 1 + + From 874c23456f5edc5b57ba1860b4122325bf7e09c8 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Wed, 18 Sep 2019 15:50:36 -0500 Subject: [PATCH 06/13] Fix Swift version Xcode 11 does not seem to specify 5.1 --- Vokal-Swift.xctemplate/TemplateInfo.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vokal-Swift.xctemplate/TemplateInfo.plist b/Vokal-Swift.xctemplate/TemplateInfo.plist index 83ed53a..2dc2963 100755 --- a/Vokal-Swift.xctemplate/TemplateInfo.plist +++ b/Vokal-Swift.xctemplate/TemplateInfo.plist @@ -293,7 +293,7 @@ SharedSettings SWIFT_VERSION - 5.1 + 5.0 Options From 4a4fb12f3c0da6e1e609ead02d7fcb6a0c51f3e5 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Wed, 18 Sep 2019 15:51:07 -0500 Subject: [PATCH 07/13] Update README --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ca01d9b..f79cfc3 100755 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ This repo contains Objective-C and Swift templates to start up a new Vokal proje For people outside of Vokal: you'll need to make some adjustments after creating your project from these templates. In particular, you'll need to remove our private podspec repo from the `Podfile`, and update the certificate repo in `fastlane/Matchfile`. If you have issues beyond that, feel free to [drop us a note](mailto:ios@vokal.io). ## Maintaining these templates -Apple doesn't have documentation on managing templates like this, but [there is a third-party guide for Xcode 4](https://web.archive.org/web/20180423060655/http://www.learn-cocos2d.com/store/xcode4-template-documentation) that's still mostly correct for Xcode 10. +Apple doesn't have documentation on managing templates like this, but [there is a third-party guide for Xcode 4](https://web.archive.org/web/20180423060655/http://www.learn-cocos2d.com/store/xcode4-template-documentation) that's still mostly correct for Xcode 11. -If you're updating the templates, you'll note that there are Vokal-fied versions of several templates in this project - this is to facilitate making sure that certain stock files which would otherwise be created are not created. These were forked from the Xcode 7 templates, but as of Xcode 10, the base template had not changed significantly from the one included in 7. +If you're updating the templates, you'll note that there are Vokal-fied versions of several templates in this project - this is to facilitate making sure that certain stock files which would otherwise be created are not created. These were forked from the Xcode 7 templates, but as of Xcode 11, the base template had not changed significantly from the one included in 7. -Note that you may need to grab updated versions of these templates from the belly of Xcode when a new version of Xcode is released. As of Xcode 10, these templates can be found at the following paths: +Note that you may need to grab updated versions of these templates from the belly of Xcode when a new version of Xcode is released. As of Xcode 11, these templates can be found at the following paths: * Projects: `/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/iOS` * Aggregate target: `/Applications/Xcode.app/Contents/Developer/Library/Xcode/Templates/Project Templates/Base/Other/Aggregate.xctemplate` @@ -99,3 +99,4 @@ Adjust the run scripts in this target as necessary. For example, if your project * 3.x: works with Swift 4 in Xcode 9 * 4.x: works with Swift 4.2 in Xcode 10 * 5.x: works with Swift 5.0 in Xcode 10.2 +* 6.x: works with Swift 5.1 in Xcode 11 From 68244fb50a52212f12935f1794157c7d932ae355 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Thu, 19 Sep 2019 10:02:12 -0500 Subject: [PATCH 08/13] Fix file reference --- Vokal-Swift.xctemplate/TemplateInfo.plist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vokal-Swift.xctemplate/TemplateInfo.plist b/Vokal-Swift.xctemplate/TemplateInfo.plist index 2dc2963..8e903a0 100755 --- a/Vokal-Swift.xctemplate/TemplateInfo.plist +++ b/Vokal-Swift.xctemplate/TemplateInfo.plist @@ -73,7 +73,7 @@ Nodes - main.swift + Supporting Files/main.swift ../R.generated.swift AppDelegate.swift TestingAppDelegate.swift @@ -228,7 +228,7 @@ Path AppDelegate.swift - main.swift + Supporting Files/main.swift Group Supporting Files From 3a0e163d68a895c3ec1caac66941d4062755899c Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Thu, 19 Sep 2019 10:04:08 -0500 Subject: [PATCH 09/13] Fix self. Need it here since we are in a closure --- Vokal-Swift.xctemplate/UserAPITests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vokal-Swift.xctemplate/UserAPITests.swift b/Vokal-Swift.xctemplate/UserAPITests.swift index fbd3e06..e4b6a0a 100755 --- a/Vokal-Swift.xctemplate/UserAPITests.swift +++ b/Vokal-Swift.xctemplate/UserAPITests.swift @@ -46,14 +46,14 @@ class UserAPITests: XCTestCase { success: { resultDict in //THEN: The call should succeed and the token should match the mock token. if let token = resultDict["token"] as? String { - XCTAssertEqual(token, MockLoginToken) + XCTAssertEqual(token, self.MockLoginToken) } else { XCTFail("No token returned!") } //THEN: The token should already be stored in the keychain. if let keychainToken = TokenStorageHelper.getAuthorizationToken() { - XCTAssertEqual(keychainToken, MockLoginToken) + XCTAssertEqual(keychainToken, self.MockLoginToken) } else { XCTFail("Token was not stored in the keychain!") } From 5270e1a74828d7861942929ef59467151a9ea594 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Thu, 19 Sep 2019 10:53:20 -0500 Subject: [PATCH 10/13] Revert "Simplify storyboard name" This reverts commit c1676e4896494fb4b3bd656aa21a9a9454e20827. --- ...ryboard => Main-___PACKAGENAME___.storyboard} | 0 .../TemplateInfo.plist | 16 ++++------------ 2 files changed, 4 insertions(+), 12 deletions(-) rename Vokal-Cocoa Touch Application Base.xctemplate/{Main.storyboard => Main-___PACKAGENAME___.storyboard} (100%) diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/Main.storyboard b/Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard similarity index 100% rename from Vokal-Cocoa Touch Application Base.xctemplate/Main.storyboard rename to Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist b/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist index a94507d..8d5da5e 100755 --- a/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist +++ b/Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist @@ -185,10 +185,10 @@ end SortOrder 101 - Base.lproj/Main.storyboard + Base.lproj/Main-___PACKAGENAME___.storyboard Path - Main.storyboard + Main-___PACKAGENAME___.storyboard SortOrder 100 @@ -217,7 +217,7 @@ end Info.plist:UIMainStoryboardFile <key>UIMainStoryboardFile</key> -<string>Main</string> +<string>Main-___PACKAGENAME___</string> Info.plist:UIRequiredDeviceCapabilities Beginning @@ -261,7 +261,7 @@ end Info.plist:UIMainStoryboardFile Info.plist:UIRequiredDeviceCapabilities:base Base.lproj/LaunchScreen.storyboard - Base.lproj/Main.storyboard + Base.lproj/Main-___PACKAGENAME___.storyboard Scripts/Version_Incrementing_Run_Script.sh Settings.bundle @@ -349,14 +349,6 @@ end Info.plist:UISupportedInterfaceOrientations~iPhone - Project - - SharedSettings - - TARGETED_DEVICE_FAMILY - 1 - - From b5c74ead48e7676304f582b6f66ea7c5b862560d Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Thu, 19 Sep 2019 10:57:21 -0500 Subject: [PATCH 11/13] Update main storyboard --- .../Main-___PACKAGENAME___.storyboard | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) mode change 100755 => 100644 Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard b/Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard old mode 100755 new mode 100644 index 04c4100..25a7638 --- a/Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard +++ b/Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard @@ -1,10 +1,7 @@ - - - - + - + @@ -12,12 +9,12 @@ - + - - + + From 20f90972e8185c94e9aed68bc7ac3f5fa896f490 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Thu, 19 Sep 2019 11:01:29 -0500 Subject: [PATCH 12/13] Update launch storyboard --- .../LaunchScreen.storyboard | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vokal-Cocoa Touch Application Base.xctemplate/LaunchScreen.storyboard b/Vokal-Cocoa Touch Application Base.xctemplate/LaunchScreen.storyboard index f83f6fd..865e932 100644 --- a/Vokal-Cocoa Touch Application Base.xctemplate/LaunchScreen.storyboard +++ b/Vokal-Cocoa Touch Application Base.xctemplate/LaunchScreen.storyboard @@ -1,5 +1,5 @@ - + @@ -13,7 +13,7 @@ - + From 10986dd886402825735eb3f926483c4c6cb79bd2 Mon Sep 17 00:00:00 2001 From: Bryan Luby Date: Thu, 19 Sep 2019 11:15:23 -0500 Subject: [PATCH 13/13] Update README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f79cfc3..b48fa66 100755 --- a/README.md +++ b/README.md @@ -74,6 +74,10 @@ You can then delete the `MoveToTestTarget` folder from the filesystem as the tes - For Objective-C projects, the Objective-Clean run script is already installed for you and the settings file is already in place. For Swift projects, SwiftLint is set up similarly. Fix any warnings that either utility generates when you build the workspace. If you get an error about Objective-Clean not being found, download and install the app following the [full instructions in our Objective-Clean docs](https://engineering.vokal.io/iOS/ObjClean/README.md.html). +- Create a git repository if one has not already been created: `git init` + +- Commit the initial template files: `git add . && git commit -m "Add initial project files from template"` + - Hit ⌘-U to run the tests. The tests should fail since you haven't set anything up yet. - Double-check the Travis configuration and add secure keys as needed. See our [Travis documentation](https://engineering.vokal.io/iOS/Fastlane-Travis-CI.md.html) for the full details on that. This step can be handled later, since most of the information needed for this probably isn't available yet.