File tree 1 file changed +7
-5
lines changed
Projects/Feature/FeatureLogin/Sources/Splash
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ public struct SplashFeature {
17
17
/// - Dependency
18
18
@Dependency ( \. continuousClock)
19
19
var clock
20
- @Dependency ( UserDefaultsClient . self)
20
+ @Dependency ( \. openURL)
21
+ var openURL
22
+ @Dependency ( UserDefaultsClient . self)
21
23
var userDefaults
22
24
@Dependency ( AuthClient . self)
23
25
var authClient
@@ -213,11 +215,11 @@ private extension SplashFeature {
213
215
func handleScopeAction( _ action: Action . ScopeAction , state: inout State ) -> Effect < Action > {
214
216
switch action {
215
217
case let . alert( . presented( . 앱스토어_이동( trackId) ) ) :
216
- if let url = URL ( string: " https://apps.apple.com/app/id \( trackId) " ) ,
217
- UIApplication . shared. canOpenURL ( url) {
218
- UIApplication . shared. open ( url, options: [ : ] , completionHandler: nil )
218
+ return . run { _ in
219
+ if let url = URL ( string: " https://apps.apple.com/app/id \( trackId) " ) {
220
+ await openURL. callAsFunction ( url)
221
+ }
219
222
}
220
- return . none
221
223
222
224
case . alert:
223
225
return . none
You can’t perform that action at this time.
0 commit comments