Skip to content

Commit ba4b9c2

Browse files
authored
Merge pull request #62 from 87kangsw/release/2.1.0
[Release] 2.1.0
2 parents c336968 + 6548ee1 commit ba4b9c2

File tree

12 files changed

+246
-102
lines changed

12 files changed

+246
-102
lines changed

Gemfile.lock

Lines changed: 148 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,163 +1,216 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
CFPropertyList (3.0.0)
5-
addressable (2.6.0)
6-
public_suffix (>= 2.0.2, < 4.0)
4+
CFPropertyList (3.0.4)
5+
rexml
6+
addressable (2.8.0)
7+
public_suffix (>= 2.0.2, < 5.0)
8+
artifactory (3.0.15)
79
atomos (0.1.3)
8-
babosa (1.0.2)
9-
badge (0.10.0)
10-
curb (~> 0.9)
10+
aws-eventstream (1.2.0)
11+
aws-partitions (1.512.0)
12+
aws-sdk-core (3.121.1)
13+
aws-eventstream (~> 1, >= 1.0.2)
14+
aws-partitions (~> 1, >= 1.239.0)
15+
aws-sigv4 (~> 1.1)
16+
jmespath (~> 1.0)
17+
aws-sdk-kms (1.49.0)
18+
aws-sdk-core (~> 3, >= 3.120.0)
19+
aws-sigv4 (~> 1.1)
20+
aws-sdk-s3 (1.103.0)
21+
aws-sdk-core (~> 3, >= 3.120.0)
22+
aws-sdk-kms (~> 1)
23+
aws-sigv4 (~> 1.4)
24+
aws-sigv4 (1.4.0)
25+
aws-eventstream (~> 1, >= 1.0.2)
26+
babosa (1.0.4)
27+
badge (0.13.0)
1128
fastimage (>= 1.6)
1229
fastlane (>= 2.0)
13-
mini_magick (>= 4.5)
14-
claide (1.0.2)
30+
mini_magick (>= 4.9.4, < 5.0.0)
31+
claide (1.0.3)
1532
colored (1.2)
1633
colored2 (3.1.2)
17-
commander-fastlane (4.4.6)
18-
highline (~> 1.7.2)
19-
curb (0.9.10)
20-
declarative (0.0.10)
21-
declarative-option (0.1.0)
22-
digest-crc (0.4.1)
23-
domain_name (0.5.20180417)
34+
commander (4.6.0)
35+
highline (~> 2.0.0)
36+
declarative (0.0.20)
37+
digest-crc (0.6.4)
38+
rake (>= 12.0.0, < 14.0.0)
39+
domain_name (0.5.20190701)
2440
unf (>= 0.0.5, < 1.0.0)
25-
dotenv (2.7.2)
26-
emoji_regex (1.0.1)
27-
excon (0.64.0)
28-
faraday (0.15.4)
41+
dotenv (2.7.6)
42+
emoji_regex (3.2.3)
43+
excon (0.86.0)
44+
faraday (1.8.0)
45+
faraday-em_http (~> 1.0)
46+
faraday-em_synchrony (~> 1.0)
47+
faraday-excon (~> 1.1)
48+
faraday-httpclient (~> 1.0.1)
49+
faraday-net_http (~> 1.0)
50+
faraday-net_http_persistent (~> 1.1)
51+
faraday-patron (~> 1.0)
52+
faraday-rack (~> 1.0)
2953
multipart-post (>= 1.2, < 3)
30-
faraday-cookie_jar (0.0.6)
31-
faraday (>= 0.7.4)
54+
ruby2_keywords (>= 0.0.4)
55+
faraday-cookie_jar (0.0.7)
56+
faraday (>= 0.8.0)
3257
http-cookie (~> 1.0.0)
33-
faraday_middleware (0.13.1)
34-
faraday (>= 0.7.4, < 1.0)
35-
fastimage (2.1.5)
36-
fastlane (2.125.2)
58+
faraday-em_http (1.0.0)
59+
faraday-em_synchrony (1.0.0)
60+
faraday-excon (1.1.0)
61+
faraday-httpclient (1.0.1)
62+
faraday-net_http (1.0.1)
63+
faraday-net_http_persistent (1.2.0)
64+
faraday-patron (1.0.0)
65+
faraday-rack (1.0.0)
66+
faraday_middleware (1.1.0)
67+
faraday (~> 1.0)
68+
fastimage (2.2.5)
69+
fastlane (2.195.0)
3770
CFPropertyList (>= 2.3, < 4.0.0)
38-
addressable (>= 2.3, < 3.0.0)
39-
babosa (>= 1.0.2, < 2.0.0)
71+
addressable (>= 2.8, < 3.0.0)
72+
artifactory (~> 3.0)
73+
aws-sdk-s3 (~> 1.0)
74+
babosa (>= 1.0.3, < 2.0.0)
4075
bundler (>= 1.12.0, < 3.0.0)
4176
colored
42-
commander-fastlane (>= 4.4.6, < 5.0.0)
77+
commander (~> 4.6)
4378
dotenv (>= 2.1.1, < 3.0.0)
44-
emoji_regex (>= 0.1, < 2.0)
45-
excon (>= 0.45.0, < 1.0.0)
46-
faraday (~> 0.9)
79+
emoji_regex (>= 0.1, < 4.0)
80+
excon (>= 0.71.0, < 1.0.0)
81+
faraday (~> 1.0)
4782
faraday-cookie_jar (~> 0.0.6)
48-
faraday_middleware (~> 0.9)
83+
faraday_middleware (~> 1.0)
4984
fastimage (>= 2.1.0, < 3.0.0)
5085
gh_inspector (>= 1.1.2, < 2.0.0)
51-
google-api-client (>= 0.21.2, < 0.24.0)
52-
google-cloud-storage (>= 1.15.0, < 2.0.0)
53-
highline (>= 1.7.2, < 2.0.0)
86+
google-apis-androidpublisher_v3 (~> 0.3)
87+
google-apis-playcustomapp_v1 (~> 0.1)
88+
google-cloud-storage (~> 1.31)
89+
highline (~> 2.0)
5490
json (< 3.0.0)
55-
jwt (~> 2.1.0)
56-
mini_magick (~> 4.5.1)
57-
multi_xml (~> 0.5)
91+
jwt (>= 2.1.0, < 3)
92+
mini_magick (>= 4.9.4, < 5.0.0)
5893
multipart-post (~> 2.0.0)
94+
naturally (~> 2.2)
95+
optparse (~> 0.1.1)
5996
plist (>= 3.1.0, < 4.0.0)
60-
public_suffix (~> 2.0.0)
61-
rubyzip (>= 1.2.2, < 2.0.0)
97+
rubyzip (>= 2.0.0, < 3.0.0)
6298
security (= 0.1.3)
6399
simctl (~> 1.6.3)
64-
slack-notifier (>= 2.0.0, < 3.0.0)
65100
terminal-notifier (>= 2.0.0, < 3.0.0)
66101
terminal-table (>= 1.4.5, < 2.0.0)
67102
tty-screen (>= 0.6.3, < 1.0.0)
68103
tty-spinner (>= 0.8.0, < 1.0.0)
69104
word_wrap (~> 1.0.0)
70-
xcodeproj (>= 1.8.1, < 2.0.0)
105+
xcodeproj (>= 1.13.0, < 2.0.0)
71106
xcpretty (~> 0.3.0)
72107
xcpretty-travis-formatter (>= 0.0.3)
73-
fastlane-plugin-badge (1.2.0)
74-
badge (~> 0.10.0)
75-
fastlane-plugin-changelog (0.15.0)
76-
fastlane-plugin-firebase_app_distribution (0.2.5)
77-
fastlane-plugin-versioning (0.4.4)
108+
fastlane-plugin-badge (1.5.0)
109+
badge (~> 0.13.0)
110+
fastlane-plugin-changelog (0.16.0)
111+
fastlane-plugin-firebase_app_distribution (0.3.1)
112+
fastlane-plugin-versioning (0.5.0)
78113
gh_inspector (1.1.3)
79-
google-api-client (0.23.9)
114+
google-apis-androidpublisher_v3 (0.11.0)
115+
google-apis-core (>= 0.4, < 2.a)
116+
google-apis-core (0.4.1)
80117
addressable (~> 2.5, >= 2.5.1)
81-
googleauth (>= 0.5, < 0.7.0)
82-
httpclient (>= 2.8.1, < 3.0)
83-
mime-types (~> 3.0)
118+
googleauth (>= 0.16.2, < 2.a)
119+
httpclient (>= 2.8.1, < 3.a)
120+
mini_mime (~> 1.0)
84121
representable (~> 3.0)
85-
retriable (>= 2.0, < 4.0)
86-
signet (~> 0.9)
87-
google-cloud-core (1.3.0)
122+
retriable (>= 2.0, < 4.a)
123+
rexml
124+
webrick
125+
google-apis-iamcredentials_v1 (0.7.0)
126+
google-apis-core (>= 0.4, < 2.a)
127+
google-apis-playcustomapp_v1 (0.5.0)
128+
google-apis-core (>= 0.4, < 2.a)
129+
google-apis-storage_v1 (0.8.0)
130+
google-apis-core (>= 0.4, < 2.a)
131+
google-cloud-core (1.6.0)
88132
google-cloud-env (~> 1.0)
89-
google-cloud-env (1.1.0)
90-
faraday (~> 0.11)
91-
google-cloud-storage (1.16.0)
133+
google-cloud-errors (~> 1.0)
134+
google-cloud-env (1.5.0)
135+
faraday (>= 0.17.3, < 2.0)
136+
google-cloud-errors (1.2.0)
137+
google-cloud-storage (1.34.1)
138+
addressable (~> 2.5)
92139
digest-crc (~> 0.4)
93-
google-api-client (~> 0.23)
94-
google-cloud-core (~> 1.2)
95-
googleauth (>= 0.6.2, < 0.10.0)
96-
googleauth (0.6.7)
97-
faraday (~> 0.12)
140+
google-apis-iamcredentials_v1 (~> 0.1)
141+
google-apis-storage_v1 (~> 0.1)
142+
google-cloud-core (~> 1.6)
143+
googleauth (>= 0.16.2, < 2.a)
144+
mini_mime (~> 1.0)
145+
googleauth (1.0.0)
146+
faraday (>= 0.17.3, < 2.0)
98147
jwt (>= 1.4, < 3.0)
99148
memoist (~> 0.16)
100149
multi_json (~> 1.11)
101150
os (>= 0.9, < 2.0)
102-
signet (~> 0.7)
103-
highline (1.7.10)
104-
http-cookie (1.0.3)
151+
signet (>= 0.16, < 2.a)
152+
highline (2.0.3)
153+
http-cookie (1.0.4)
105154
domain_name (~> 0.5)
106155
httpclient (2.8.3)
107-
json (2.2.0)
108-
jwt (2.1.0)
109-
memoist (0.16.0)
110-
mime-types (3.2.2)
111-
mime-types-data (~> 3.2015)
112-
mime-types-data (3.2019.0331)
113-
mini_magick (4.5.1)
114-
multi_json (1.13.1)
115-
multi_xml (0.6.0)
156+
jmespath (1.4.0)
157+
json (2.5.1)
158+
jwt (2.3.0)
159+
memoist (0.16.2)
160+
mini_magick (4.11.0)
161+
mini_mime (1.1.1)
162+
multi_json (1.15.0)
116163
multipart-post (2.0.0)
117-
nanaimo (0.2.6)
118-
naturally (2.2.0)
119-
os (1.0.1)
120-
plist (3.5.0)
121-
public_suffix (2.0.5)
122-
representable (3.0.4)
164+
nanaimo (0.3.0)
165+
naturally (2.2.1)
166+
optparse (0.1.1)
167+
os (1.1.1)
168+
plist (3.6.0)
169+
public_suffix (4.0.6)
170+
rake (13.0.6)
171+
representable (3.1.1)
123172
declarative (< 0.1.0)
124-
declarative-option (< 0.2.0)
173+
trailblazer-option (>= 0.1.1, < 0.2.0)
125174
uber (< 0.2.0)
126175
retriable (3.1.2)
176+
rexml (3.2.5)
127177
rouge (2.0.7)
128-
rubyzip (1.2.3)
178+
ruby2_keywords (0.0.5)
179+
rubyzip (2.3.2)
129180
security (0.1.3)
130-
signet (0.11.0)
131-
addressable (~> 2.3)
132-
faraday (~> 0.9)
181+
signet (0.16.0)
182+
addressable (~> 2.8)
183+
faraday (>= 0.17.3, < 2.0)
133184
jwt (>= 1.5, < 3.0)
134185
multi_json (~> 1.10)
135-
simctl (1.6.5)
186+
simctl (1.6.8)
136187
CFPropertyList
137188
naturally
138-
slack-notifier (2.3.2)
139189
terminal-notifier (2.0.0)
140190
terminal-table (1.8.0)
141191
unicode-display_width (~> 1.1, >= 1.1.1)
142-
tty-cursor (0.7.0)
143-
tty-screen (0.7.0)
144-
tty-spinner (0.9.1)
192+
trailblazer-option (0.1.1)
193+
tty-cursor (0.7.1)
194+
tty-screen (0.8.1)
195+
tty-spinner (0.9.3)
145196
tty-cursor (~> 0.7)
146197
uber (0.1.0)
147198
unf (0.1.4)
148199
unf_ext
149-
unf_ext (0.0.7.6)
150-
unicode-display_width (1.6.0)
200+
unf_ext (0.0.8)
201+
unicode-display_width (1.8.0)
202+
webrick (1.7.0)
151203
word_wrap (1.0.0)
152-
xcodeproj (1.10.0)
204+
xcodeproj (1.21.0)
153205
CFPropertyList (>= 2.3.3, < 4.0)
154206
atomos (~> 0.1.3)
155207
claide (>= 1.0.2, < 2.0)
156208
colored2 (~> 3.1)
157-
nanaimo (~> 0.2.6)
209+
nanaimo (~> 0.3.0)
210+
rexml (~> 3.2.4)
158211
xcpretty (0.3.0)
159212
rouge (~> 2.0.7)
160-
xcpretty-travis-formatter (1.0.0)
213+
xcpretty-travis-formatter (1.0.1)
161214
xcpretty (~> 0.2, >= 0.0.7)
162215

163216
PLATFORMS

GitTime/Sources/AppDelegate.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2121
return true
2222
}
2323

24+
func applicationDidEnterBackground(_ application: UIApplication) {
25+
UserDefaultsConfig.didEnterBackgroundTime = Date()
26+
}
27+
28+
func applicationWillEnterForeground(_ application: UIApplication) {
29+
if let didEnterBackgroundTime = UserDefaultsConfig.didEnterBackgroundTime {
30+
if didEnterBackgroundTime.anHourAfater() == true {
31+
NotificationCenter.default.post(name: .backgroundRefresh, object: nil)
32+
}
33+
}
34+
35+
UserDefaultsConfig.didEnterBackgroundTime = nil
36+
}
2437
}

GitTime/Sources/CompositionRoot.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ final class CompositionRoot {
5959
UserDefaultsConfig.firstLaunch = false
6060
}
6161

62+
UserDefaultsConfig.didEnterBackgroundTime = nil
63+
6264
var goToMainScreen: (() -> Void)!
6365
var goToLoginScreen: (() -> Void)!
6466

GitTime/Sources/Utils/Constants/Constants.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ struct Constants {
3737
// AppReview
3838
case processCompletedCountKey
3939
case lastVersionPromptedForReviewKey
40+
41+
// Background Refresh
42+
case didEnterBackground
4043
}
4144

4245
enum URLs {
@@ -51,3 +54,7 @@ struct Constants {
5154
static let twitter = "twitter://user?screen_name=87kangsw"
5255
}
5356
}
57+
58+
extension Notification.Name {
59+
static let backgroundRefresh = Notification.Name("backgroundRefresh")
60+
}

GitTime/Sources/Utils/Constants/UserDefaultsConfig.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Created by Kanz on 2020/09/29.
66
//
77

8+
import Foundation
9+
810
struct UserDefaultsConfig {
911
@UserDefaultsWrapper(Constants.UserDefaultKeys.firstLaunch.rawValue, defaultValue: true)
1012
static var firstLaunch: Bool
@@ -17,4 +19,7 @@ struct UserDefaultsConfig {
1719

1820
@UserDefaultsWrapper(Constants.UserDefaultKeys.lastVersionPromptedForReviewKey.rawValue, defaultValue: nil)
1921
static var lastVersionPromptedForReviewKey: String?
22+
23+
@UserDefaultsWrapper(Constants.UserDefaultKeys.didEnterBackground.rawValue, defaultValue: nil)
24+
static var didEnterBackgroundTime: Date?
2025
}

GitTime/Sources/Utils/Extensions/Date+Extensions.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ extension Date {
6262
}
6363

6464
extension Date {
65+
func anMinuteAfter() -> Bool {
66+
let afterMinute = self.addingTimeInterval(60)
67+
let now = Date()
68+
return now.compare(afterMinute) == .orderedDescending
69+
}
70+
6571
func anHourAfater() -> Bool {
6672
let afterHour = self.addingTimeInterval(60*60)
6773
let now = Date()

0 commit comments

Comments
 (0)