Replies: 1 comment 1 reply
-
One possibility is to hold the state that you want to return in your domain (I think in this case it would be Here's some sample code: struct AppState: Equatable {
...
var didOpenUrl = false
}
enum AppAction {
...
case open(URL)
}
let appReducer = Reducer<AppState, AppAction, AppEnvironment> { state, action, environment in
switch action {
...
case let .open(url):
// Logic to handle url
// ...
state.didOpenUrl = true // or false if url was not handled
return .none
}
}
extension AppDelegate {
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
viewStore.send(.open(url))
return viewStore.didOpenUrl
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Consider the following
I'm trying to find a way to return the handled state when the above method is called by the system using ComposableArchitecture. Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions