Skip to content

Commit

Permalink
Merge pull request #44 from bryanluby/updates
Browse files Browse the repository at this point in the history
Xcode 10.2 updates
  • Loading branch information
bryanluby authored May 22, 2019
2 parents e394f29 + a8415cd commit e0f8d1e
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import UIKit
import KIF

class ___FILEBASENAMEASIDENTIFIER___: KIFTestCase {

func testAreAnyTestsWritten() {
XCTFail("You should write some KIF tests.")
}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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](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 10.

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.

Expand Down Expand Up @@ -105,3 +105,4 @@ Adjust the run scripts in this target as necessary. For example, if your project
* 2.x: works with Swift 3 in Xcode 8
* 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
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
osx_image: xcode10.2
before_install:
- echo -e "machine github.com\n login ${CI_USER_TOKEN}" >> ~/.netrc
before_script:
Expand Down
2 changes: 1 addition & 1 deletion Vokal-Cocoa Touch Application Base.xctemplate/Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
gem 'cocoapods', '~>1.5'
gem 'cocoapods', '~>1.6.1'
gem 'fastlane'
gem 'slather'
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ FONT_DIR="${RESOURCES_DIR}/Fonts"
# Prefix to use for extensions/categories, ex: VOK.
PREFIX="FIXME"

# Change this to "swift" if you want your files to output in swift.
LANGUAGE="objc"
# Change this to "objc" if you want your files to output in Objective-C.
LANGUAGE="swift"

# Make sure everything is set up before trying to run
if [ "${PREFIX}" = "FIXME" ]; then
Expand All @@ -42,4 +42,5 @@ fi
--output-dir "${OUTPUT_DIR}" \
--font-dir "${FONT_DIR}" \
--prefix "${PREFIX}" \
--"${LANGUAGE}"
--"${LANGUAGE}" \
--noibdesignables
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ target '___PACKAGENAME___' do
</string>
<key>End</key>
<string>
target &apos;___PACKAGENAME___Tests&apos; do
# Put pods used for both test targets here
pod &apos;VOKMockUrlProtocol&apos;
Expand All @@ -154,7 +153,6 @@ target &apos;___PACKAGENAME___&apos; do
pod &apos;KIF&apos;
end
end
end
post_install do | installer |
Expand All @@ -168,8 +166,7 @@ post_install do | installer |
config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf'
end
end
end
</string>
end</string>
<key>Group</key>
<array>
<string>Non-iOS Resources</string>
Expand Down Expand Up @@ -426,7 +423,7 @@ end
<key>CODE_SIGN_IDENTITY[sdk=iphoneos*]</key>
<string>iPhone Developer</string>
<key>SWIFT_VERSION</key>
<string>4.2</string>
<string>5.0</string>
</dict>
</dict>
<key>Targets</key>
Expand Down
3 changes: 3 additions & 0 deletions Vokal-Swift.xctemplate/.swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ disabled_rules:
- type_name
- unused_optional_binding
- variable_name
- weak_delegate

opt_in_rules:
- force_unwrapping
- implicitly_unwrapped_optional
- unneeded_parentheses_in_closure_argument
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces

force_unwrapping:
severity: error
Expand Down
45 changes: 0 additions & 45 deletions Vokal-Swift.xctemplate/ReuseIdentifiable.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Vokal-Swift.xctemplate/Scripts/R.swift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if [[ "${CI}" == 'true' && "${TRAVIS}" == 'true' ]]; then
exit 0
fi

"$PODS_ROOT/R.swift/rswift" generate "$SRCROOT"
"$PODS_ROOT/R.swift/rswift" generate "$SRCROOT/R.generated.swift"
16 changes: 12 additions & 4 deletions Vokal-Swift.xctemplate/TemplateInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@
<string>/bin/bash</string>
<key>ShellScript</key>
<string>&quot;${SRCROOT}/___PACKAGENAME___/Scripts/R.swift.sh&quot;</string>
<key>InputFiles</key>
<array>
<string>$TEMP_DIR/rswift-lastrun</string>
</array>
<key>OutputFiles</key>
<array>
<string>$SRCROOT/R.generated.swift</string>
</array>
</dict>
<dict>
<key>Class</key>
Expand All @@ -89,13 +97,13 @@
</array>
<key>Nodes</key>
<array>
<string>Extensions/ReuseIdentifiable.swift</string>
<string>main.swift</string>
<string>../R.generated.swift</string>
<string>AppDelegate.swift</string>
<string>TestingAppDelegate.swift</string>
<string>View Controllers/ViewController.swift</string>
<string>Protocols/CommonInitializedView.swift</string>
<string>Extensions/.gitkeep</string>
<string>Controls/Base/BaseControl.swift</string>
<string>Controls/Base/BaseButton.swift</string>
<string>Controls/Base/BaseTextField.swift</string>
Expand All @@ -116,14 +124,14 @@
<key>../Podfile:swiftbasics</key>
<string> use_frameworks!
pod &apos;R.swift&apos;, &apos;~&gt; 5.0.0.alpha.2&apos;
pod &apos;R.swift&apos;
pod &apos;SwiftLint&apos;</string>
<key>Extensions/ReuseIdentifiable.swift</key>
<key>Extensions/.gitkeep</key>
<dict>
<key>Group</key>
<string>Extensions</string>
<key>Path</key>
<string>ReuseIdentifiable.swift</string>
<string>.gitkeep</string>
</dict>
<key>View Controllers/ViewController.swift</key>
<dict>
Expand Down
1 change: 0 additions & 1 deletion Vokal-Swift.xctemplate/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
import UIKit

class ViewController: UIViewController {

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import XCTest

class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {

func testAreAnyTestsWritten() {
XCTFail("You should write some unit tests.")
}
Expand Down

0 comments on commit e0f8d1e

Please sign in to comment.