Skip to content

Commit 0db256e

Browse files
Merge pull request #7 from studyplus/update
Update
2 parents 8cabad5 + 41027b6 commit 0db256e

File tree

10 files changed

+34
-32
lines changed

10 files changed

+34
-32
lines changed

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "kishikawakatsumi/KeychainAccess" == 3.1.0
1+
github "kishikawakatsumi/KeychainAccess" == 3.1.1

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "kishikawakatsumi/KeychainAccess" "v3.1.0"
1+
github "kishikawakatsumi/KeychainAccess" "v3.1.1"

Demo/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.1.1</string>
18+
<string>2.0.0</string>
1919
<key>CFBundleURLTypes</key>
2020
<array>
2121
<dict>

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ platform :ios, '8.0'
33
use_frameworks!
44

55
target :Demo do
6-
pod 'KeychainAccess', '3.1.0'
6+
pod 'KeychainAccess', '3.1.1'
77
end

Podfile.lock

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
PODS:
2-
- KeychainAccess (3.1.0)
2+
- KeychainAccess (3.1.1)
33

44
DEPENDENCIES:
5-
- KeychainAccess (= 3.1.0)
5+
- KeychainAccess (= 3.1.1)
6+
7+
SPEC REPOS:
8+
https://github.com/cocoapods/specs.git:
9+
- KeychainAccess
610

711
SPEC CHECKSUMS:
8-
KeychainAccess: 94c5540b32eabf7bc32bfb976a268e8ea05fd6da
12+
KeychainAccess: 7bd430028059754a3debab3cfc0bd1fc7fb85df3
913

10-
PODFILE CHECKSUM: 5d59a864df1b8c7fb07b7cc4f11a87235ba9692c
14+
PODFILE CHECKSUM: 252d5377b931f703238854e56df200aab4d237d9
1115

12-
COCOAPODS: 1.4.0
16+
COCOAPODS: 1.5.3

StudyplusSDK-V2.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "StudyplusSDK-V2"
3-
s.version = "1.1.1"
3+
s.version = "2.0.0"
44
s.summary = "StudyplusSDK-V2 is Studyplus iOS SDK for Swift"
55
s.homepage = "http://info.studyplus.jp"
66
s.license = { :type => "MIT", :file => "LICENSE" }
@@ -11,6 +11,6 @@ Pod::Spec.new do |s|
1111
s.ios.deployment_target = '8.0'
1212
s.ios.frameworks = ['UIKit', 'Foundation']
1313
s.author = { "studyplus" => "[email protected]" }
14-
s.dependency 'KeychainAccess', '3.1.0'
14+
s.dependency 'KeychainAccess', '3.1.1'
1515
end
1616

StudyplusSDK.xcodeproj/project.pbxproj

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,6 @@
280280
183FDA821E7510F00085589F /* Frameworks */,
281281
183FDA831E7510F00085589F /* Resources */,
282282
764BEF1941D689B54DF91C96 /* [CP] Embed Pods Frameworks */,
283-
0D84BAE00562247D34CA7850 /* [CP] Copy Pods Resources */,
284283
48D53DAA1F72346A00FDB105 /* Embed Frameworks */,
285284
);
286285
buildRules = (
@@ -400,21 +399,6 @@
400399
/* End PBXResourcesBuildPhase section */
401400

402401
/* Begin PBXShellScriptBuildPhase section */
403-
0D84BAE00562247D34CA7850 /* [CP] Copy Pods Resources */ = {
404-
isa = PBXShellScriptBuildPhase;
405-
buildActionMask = 2147483647;
406-
files = (
407-
);
408-
inputPaths = (
409-
);
410-
name = "[CP] Copy Pods Resources";
411-
outputPaths = (
412-
);
413-
runOnlyForDeploymentPostprocessing = 0;
414-
shellPath = /bin/sh;
415-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo/Pods-Demo-resources.sh\"\n";
416-
showEnvVarsInLog = 0;
417-
};
418402
764BEF1941D689B54DF91C96 /* [CP] Embed Pods Frameworks */ = {
419403
isa = PBXShellScriptBuildPhase;
420404
buildActionMask = 2147483647;

StudyplusSDK/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.1.1</string>
18+
<string>2.0.0</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

StudyplusSDK/StudyplusAPIRequest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ internal struct StudyplusAPIRequest {
7676
return
7777
}
7878

79-
request.addValue("OAuth " + accessToken, forHTTPHeaderField: "HTTP_AUTHORIZATION")
79+
request.addValue("OAuth " + accessToken, forHTTPHeaderField: "Authorization")
8080

8181
let task = URLSession.shared.dataTask(with: request) { (data, response, error) in
8282

StudyplusSDK/StudyplusRecord.swift

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ private let formatter: DateFormatter = {
3434
return f
3535
}()
3636

37+
fileprivate enum DateLocalePattern {
38+
case current
39+
case enUSPOSIX
40+
41+
var value: Locale {
42+
switch self {
43+
case .current:
44+
return Locale.current
45+
case .enUSPOSIX:
46+
return Locale(identifier: "en_US_POSIX")
47+
}
48+
}
49+
}
50+
3751
private extension Date {
3852

3953
init?(dateString: String, dateFormat: String = "yyyy-MM-dd'T'HH:mm:ssZ") {
@@ -42,8 +56,8 @@ private extension Date {
4256
self = date
4357
}
4458

45-
func string(format: String = "yyyy-MM-dd'T'HH:mm:ssZ") -> String {
46-
formatter.locale = Locale.current
59+
func string(format: String = "yyyy-MM-dd'T'HH:mm:ssZ", locale: DateLocalePattern) -> String {
60+
formatter.locale = locale.value
4761
formatter.dateFormat = format
4862
return formatter.string(from: self)
4963
}
@@ -109,7 +123,7 @@ public struct StudyplusRecord {
109123
var params: [String: Any] = [:]
110124

111125
params["duration"] = NSNumber(value: self.duration)
112-
params["recorded_at"] = self.recordedAt.string(format: "yyyy-MM-dd HH:mm:ss")
126+
params["recorded_at"] = self.recordedAt.string(format: "yyyy-MM-dd HH:mm:ss", locale: .enUSPOSIX)
113127

114128
if let comment = self.comment {
115129
params["comment"] = comment

0 commit comments

Comments
 (0)