Skip to content

Commit

Permalink
Merge pull request #49 from bryanluby/xcode11
Browse files Browse the repository at this point in the history
Xcode 11 updates
  • Loading branch information
bryanluby authored Sep 19, 2019
2 parents ebebb61 + 10986dd commit 88f5665
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 20 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:[email protected]).

## 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`
Expand Down Expand Up @@ -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.
Expand All @@ -99,3 +103,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
2 changes: 1 addition & 1 deletion Vokal-Cocoa Touch Application Base.xctemplate/.travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
Expand All @@ -13,7 +13,7 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
Expand Down
13 changes: 5 additions & 8 deletions Vokal-Cocoa Touch Application Base.xctemplate/Main-___PACKAGENAME___.storyboard
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<viewLayoutGuide key="safeArea" id="22j-t2-amn"/>
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
Expand Down
14 changes: 12 additions & 2 deletions Vokal-Cocoa Touch Application Base.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@
</array>
<key>Definitions</key>
<dict>
<key>Flows/.gitkeep</key>
<dict>
<key>Group</key>
<array>
<string>Flows</string>
</array>
<key>Path</key>
<string>.gitkeep</string>
<key>TargetIndices</key>
<array/>
</dict>
<key>Views/.gitkeep</key>
<dict>
<key>Group</key>
Expand Down Expand Up @@ -231,6 +242,7 @@ end</string>
</dict>
<key>Nodes</key>
<array>
<string>Flows/.gitkeep</string>
<string>Controls/.gitkeep</string>
<string>Data Sources/.gitkeep</string>
<string>Resources/.gitkeep</string>
Expand Down Expand Up @@ -347,8 +359,6 @@ end</string>
<dict>
<key>CODE_SIGN_IDENTITY[sdk=iphoneos*]</key>
<string>iPhone Developer</string>
<key>SWIFT_VERSION</key>
<string>5.0</string>
</dict>
</dict>
<key>Targets</key>
Expand Down
Binary file not shown.
9 changes: 7 additions & 2 deletions Vokal-Swift.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
</array>
<key>Nodes</key>
<array>
<string>main.swift</string>
<string>Supporting Files/main.swift</string>
<string>../R.generated.swift</string>
<string>AppDelegate.swift</string>
<string>TestingAppDelegate.swift</string>
Expand Down Expand Up @@ -228,7 +228,7 @@
<key>Path</key>
<string>AppDelegate.swift</string>
</dict>
<key>main.swift</key>
<key>Supporting Files/main.swift</key>
<dict>
<key>Group</key>
<string>Supporting Files</string>
Expand Down Expand Up @@ -290,6 +290,11 @@
<string>-Owholemodule</string>
</dict>
</dict>
<key>SharedSettings</key>
<dict>
<key>SWIFT_VERSION</key>
<string>5.0</string>
</dict>
</dict>
<key>Options</key>
<array>
Expand Down
4 changes: 2 additions & 2 deletions Vokal-Swift.xctemplate/UserAPITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
}
Expand Down
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ declare -a emptyDirectories=(
"Controls"
"Data Sources"
"Extensions"
"Flows"
"Fonts"
"Resources"
"Scripts"
Expand Down

0 comments on commit 88f5665

Please sign in to comment.