File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -75,15 +75,15 @@ enum DeepLink {
7575// ✅ Valid URLs
7676DeepLink (url : URL (string : " /posts/1" )! ) == .post (postId : " 1" )
7777DeepLink (url : URL (string : " /posts/1/comments/2" )! ) == .postComment (postId : " 1" , commentId : " 2" )
78- DeepLink (url : URL (string : " /f/1/s/2" )! ) == .postComment (second : 2 , first : 1 )
78+ DeepLink (url : URL (string : " /f/1/s/2" )! ) == .reverse (second : 2 , first : 1 )
7979
8080// ❌ Invalid URLs
8181DeepLink (url : URL (string : " /post/1" )! ) == nil
8282DeepLink (url : URL (string : " /posts/1/comments" )! ) == nil
8383DeepLink (url : URL (string : " /f/string/s/string" )! ) == nil
8484```
85854 . Use the ` Enum.init(url: URL) ` generated initializer.
86- ```
86+ ``` swift
8787if let deepLink = DeepLink (url : incomingURL) {
8888 switch deepLink {
8989 case .post (let postId):
You can’t perform that action at this time.
0 commit comments