Skip to content

Commit eb5be38

Browse files
authored
Release OneTimePassword 3.1.1
2 parents dc3de62 + 3e1a959 commit eb5be38

File tree

10 files changed

+36
-19
lines changed

10 files changed

+36
-19
lines changed

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ disabled_rules:
4242
- colon
4343
- comma
4444
- cyclomatic_complexity
45+
- identifier_name
4546

4647
trailing_comma:
4748
mandatory_comma: true

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
<!--## [In development][develop]-->
44

5+
## [3.1.1][] (2018-03-31)
6+
- Add support for Swift 4.1. ([#168](https://github.com/mattrubin/OneTimePassword/pull/168))
7+
- Update build and linter settings for Xcode 9.3. ([#167](https://github.com/mattrubin/OneTimePassword/pull/167))
8+
9+
510
## [3.1][] (2018-03-27)
611
- Upgrade to Swift 4 and Xcode 9.
712
([#147](https://github.com/mattrubin/OneTimePassword/pull/147),
@@ -143,8 +148,9 @@ Changes between prerelease versions of OneTimePassword version 2 can be found be
143148

144149
## [1.0.0][] (2014-07-17)
145150

146-
[develop]: https://github.com/mattrubin/OneTimePassword/compare/3.1...develop
151+
[develop]: https://github.com/mattrubin/OneTimePassword/compare/3.1.1...develop
147152

153+
[3.1.1]: https://github.com/mattrubin/OneTimePassword/compare/3.1...3.1.1
148154
[3.1]: https://github.com/mattrubin/OneTimePassword/compare/3.0.1...3.1
149155
[3.0.1]: https://github.com/mattrubin/OneTimePassword/compare/3.0...3.0.1
150156
[3.0]: https://github.com/mattrubin/OneTimePassword/compare/2.1.1...3.0

OneTimePassword.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "OneTimePassword"
3-
s.version = "3.1"
3+
s.version = "3.1.1"
44
s.summary = "A small library for generating TOTP and HOTP one-time passwords."
55
s.homepage = "https://github.com/mattrubin/OneTimePassword"
66
s.license = "MIT"

OneTimePassword.xcodeproj/project.pbxproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@
521521
attributes = {
522522
LastSwiftMigration = 0700;
523523
LastSwiftUpdateCheck = 0700;
524-
LastUpgradeCheck = 0900;
524+
LastUpgradeCheck = 0930;
525525
ORGANIZATIONNAME = "Matt Rubin";
526526
TargetAttributes = {
527527
5B39F4931DBD06BA00CD2DAB = {
@@ -732,6 +732,7 @@
732732
baseConfigurationReference = C996EC2C1A74D5830076B105 /* Debug.xcconfig */;
733733
buildSettings = {
734734
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
735+
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
735736
SWIFT_VERSION = 4.0;
736737
WATCHOS_DEPLOYMENT_TARGET = 2.0;
737738
};
@@ -742,6 +743,8 @@
742743
baseConfigurationReference = C996EC2E1A74D5830076B105 /* Release.xcconfig */;
743744
buildSettings = {
744745
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
746+
SWIFT_COMPILATION_MODE = wholemodule;
747+
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
745748
SWIFT_VERSION = 4.0;
746749
WATCHOS_DEPLOYMENT_TARGET = 2.0;
747750
};

OneTimePassword.xcodeproj/xcshareddata/xcschemes/OneTimePassword (iOS).xcscheme

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,9 +26,8 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
30-
shouldUseLaunchSchemeArgsEnv = "YES"
31-
codeCoverageEnabled = "YES">
29+
codeCoverageEnabled = "YES"
30+
shouldUseLaunchSchemeArgsEnv = "YES">
3231
<Testables>
3332
<TestableReference
3433
skipped = "NO">
@@ -67,7 +66,6 @@
6766
buildConfiguration = "Debug"
6867
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
6968
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
70-
language = ""
7169
launchStyle = "0"
7270
useCustomWorkingDirectory = "NO"
7371
ignoresPersistentStateOnLaunch = "NO"

OneTimePassword.xcodeproj/xcshareddata/xcschemes/OneTimePassword (watchOS).xcscheme

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "0930"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,9 +26,8 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
language = ""
30-
shouldUseLaunchSchemeArgsEnv = "YES"
31-
codeCoverageEnabled = "YES">
29+
codeCoverageEnabled = "YES"
30+
shouldUseLaunchSchemeArgsEnv = "YES">
3231
<Testables>
3332
</Testables>
3433
<MacroExpansion>
@@ -47,7 +46,6 @@
4746
buildConfiguration = "Debug"
4847
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4948
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
50-
language = ""
5149
launchStyle = "0"
5250
useCustomWorkingDirectory = "NO"
5351
ignoresPersistentStateOnLaunch = "NO"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Sources/Crypto.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ func HMAC(algorithm: Generator.Algorithm, key: Data, data: Data) -> Data {
3030
let (hashFunction, hashLength) = algorithm.hashInfo
3131

3232
let macOut = UnsafeMutablePointer<UInt8>.allocate(capacity: hashLength)
33-
defer { macOut.deallocate(capacity: hashLength) }
33+
defer {
34+
#if swift(>=4.1)
35+
macOut.deallocate()
36+
#else
37+
macOut.deallocate(capacity: hashLength)
38+
#endif
39+
}
3440

3541
key.withUnsafeBytes { keyBytes in
3642
data.withUnsafeBytes { dataBytes in

Sources/Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>3.1</string>
18+
<string>3.1.1</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>
22-
<string>3.1</string>
22+
<string>3.1.1</string>
2323
<key>NSPrincipalClass</key>
2424
<string></string>
2525
</dict>

Tests/TokenSerializationTests.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ class TokenSerializationTests: XCTestCase {
9898
let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)
9999
let items = urlComponents?.queryItems
100100
let expectedItemCount = 4
101-
// SwiftLint gives a false positive here because of a Swift/SourceKit bug.
102-
// See https://github.com/realm/SwiftLint/issues/1785
103-
// swiftlint:disable vertical_parameter_alignment_on_call
104101
XCTAssertEqual(items?.count, expectedItemCount,
105102
"There shouldn't be any unexpected query arguments: \(url)")
106103
// swiftlint:enable vertical_parameter_alignment_on_call

0 commit comments

Comments
 (0)