File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Projects/Feature/FeatureLogin/Sources/Splash Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ public struct SplashFeature {
1717 /// - Dependency
1818 @Dependency ( \. continuousClock)
1919 var clock
20- @Dependency ( UserDefaultsClient . self)
20+ @Dependency ( \. openURL)
21+ var openURL
22+ @Dependency ( UserDefaultsClient . self)
2123 var userDefaults
2224 @Dependency ( AuthClient . self)
2325 var authClient
@@ -213,11 +215,11 @@ private extension SplashFeature {
213215 func handleScopeAction( _ action: Action . ScopeAction , state: inout State ) -> Effect < Action > {
214216 switch action {
215217 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+ }
219222 }
220- return . none
221223
222224 case . alert:
223225 return . none
You can’t perform that action at this time.
0 commit comments