Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix]Deeplink handling #163

Merged
merged 6 commits into from
Sep 27, 2023
Merged

[Fix]Deeplink handling #163

merged 6 commits into from
Sep 27, 2023

Conversation

ipavlidakis
Copy link
Collaborator

@ipavlidakis ipavlidakis commented Sep 26, 2023

Issue

Resolves https://github.com/GetStream/ios-issues-tracking/issues/571

🎯 Goal

Ensure deeplinks are working consistently

📝 Summary

A few issues discovered:

  • Association file was broken
  • Missing the implementation method that iOS seems to call for universal links but not for custom schemes

🛠 Implementation

Implemented UITests that validate deeplink handling for

  • Universal links (via the smart banner open button)
  • Custom URL schemes

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should receive manual QA
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (Docusaurus, tutorial, CMS)

+ OSLogDestination to allow us to see logs from release version
+ DeeplinkTests that ensure deeplink handling
@ipavlidakis ipavlidakis added the bug Something isn't working label Sep 26, 2023
@ipavlidakis ipavlidakis requested a review from a team as a code owner September 26, 2023 11:11
@ipavlidakis ipavlidakis self-assigned this Sep 26, 2023
@@ -6,8 +6,7 @@
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:staging.getstream.io</string>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed as the domain is the same and can be handled.

@@ -229,7 +229,7 @@ extension AppEnvironment {
case .debug:
return [.staging, .pronto, .production]
case .test:
return [.staging]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update test environment to be able to process all available deeplinks


final class OSLogDestination: BaseLogDestination {

override func write(message: String) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows us to see our logs from the AppStore versions using the Console.app

@@ -140,12 +140,16 @@ struct DetailedCallingView: View {
self.callId = callId
viewModel.joinCall(callType: .default, callId: callId)
}
.onReceive(appState.$deeplinkInfo) { deeplinkInfo in
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this one to align the DetailedCallingView with the SimpleView and allow us to perform the DeeplinkTests

Copy link
Collaborator

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great stuff 👏 Just few small nits and we can 🚢


import XCTest

final class DeeplinkTests: StreamTestCase {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 🚀 When are these tests being run? Should we put them as part of the checks or in a test plan?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are part of the UI Tests so i believe they should be running as part of the Release. Not sure about the PR checks though. Maybe @testableapple can provide more insight to this one.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be executed with the other tests

Copy link
Collaborator

@testableapple testableapple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, @ipavlidakis!
Looks really great, I just have a couple of questions.

SwiftUIDemoAppUITests/Tests/DeeplinkTests.swift Outdated Show resolved Hide resolved
SwiftUIDemoAppUITests/Tests/DeeplinkTests.swift Outdated Show resolved Hide resolved
SwiftUIDemoAppUITests/Tests/DeeplinkTests.swift Outdated Show resolved Hide resolved
SwiftUIDemoAppUITests/Tests/DeeplinkTests.swift Outdated Show resolved Hide resolved
Copy link
Collaborator

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ✅

Copy link
Collaborator

@testableapple testableapple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@ipavlidakis ipavlidakis merged commit 271c536 into main Sep 27, 2023
8 of 11 checks passed
@ipavlidakis ipavlidakis deleted the fix/chat-indicator-not-working branch September 27, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants