-
Notifications
You must be signed in to change notification settings - Fork 25
feat: App navigational flow for deep links/push notifications #329
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
feat: App navigational flow for deep links/push notifications #329
Conversation
# Conflicts: # config_script/process_config.py
rnr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
just minor code-style fixes requested
Core/Core/View/Base/AlertView.swift
Outdated
| ) | ||
| case .viewDeepLink: | ||
| configure( | ||
| primaryButtonTitle: "View", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String should be localised
Core/Core/View/Base/AlertView.swift
Outdated
| } | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove extra vertical spaces
| public func showThread(thread: UserThread, postStateSubject: CurrentValueSubject<PostState?, Never>) {} | ||
| public func showThreads(courseID: String, topics: Topics, title: String, type: ThreadType, animated: Bool) {} | ||
|
|
||
| public func showThread(thread: UserThread, postStateSubject: CurrentValueSubject<PostState?, Never>, animated: Bool) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix line length warning
OpenEdX/Router.swift
Outdated
| DiscussionRouter { | ||
|
|
||
| DiscussionRouter | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix opening brace spacing violation
Podfile.lock
Outdated
| PODFILE CHECKSUM: 881176d00eabfe8f78d6022c56c277cf61aad22b | ||
|
|
||
| COCOAPODS: 1.15.2 | ||
| COCOAPODS: 1.15.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to downgrade cocoapod version
default_config/config_settings.yaml
Outdated
| @@ -1,4 +1,4 @@ | |||
| config_directory: './default_config' | |||
| config_directory: '../edx-mobile-config' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please don't push changes in default config values
| } | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove extra vertical space
|
@eyatsenkoperpetio please fix merge conflicts |
# Conflicts: # Core/Core/View/Base/AlertView.swift # OpenEdX/View/MainScreenView.swift
saeedbashir
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about going to user edit profile for user profile instead of opening read only user info? Thoughts?
Core/Core/View/Base/AlertView.swift
Outdated
| CoreAssets.warning.swiftUIImage.renderingMode(.template) | ||
| .foregroundColor(Theme.Colors.textPrimary) | ||
| switch type { | ||
| case .deleteVideo: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about merging this case with deleteVideo because both are using the same icon?
| @@ -26,9 +31,31 @@ public protocol DeepLinkService { | |||
| public class DeepLinkManager { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to disabled warning, Type Body Length Violation: Type body should span 300 lines or less excluding comments and whitespace: currently spans 308 lines (type_body_length)
| Task { | ||
| await navigateToScreen(with: link.type, link: link) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about moving this into else of if UIApplication.shared.applicationState == .active {
Core/Core/View/Base/AlertView.swift
Outdated
| case logOut | ||
| case leaveProfile | ||
| case deleteVideo | ||
| case viewDeepLink |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simply deepLink.
| "ALERT.LEAVE" = "Leave"; | ||
| "ALERT.KEEP_EDITING" = "Keep editing"; | ||
| "ALERT.DELETE" = "DELETE"; | ||
| "ALERT.WAITING" = "Waiting..."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've discussed this with @moiz994 and he's saying lets only show full screen loader without text waiting...
| DispatchQueue.main.asyncAfter(deadline: .now() + (isCourseOpened ? 0 : 1)) { | ||
| switch link.type { | ||
| case .courseDashboard: | ||
| self.hostCourseContainerView?.rootView.viewModel.selection = CourseTab.course.rawValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if you can use weak reference of self in block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need use weak self in this case, we don't have retain cycle
| func getNavigationController() -> UINavigationController { | ||
| navigationController | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing the access modifier of navigationController to public instead of defining a method. It's a read-only property so its not possible to change it from outside. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't need have public navigationController, I use only for deep link
| let alert = aps?[DataKeys.alert] as? [String: Any] | ||
| title = alert?[DataKeys.title] as? String | ||
| body = alert?[DataKeys.body] as? String | ||
| let aps = dictionary[DataKeys.aps.rawValue] as? [String: Any] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of Anyhashable RawStringExtractable is not useable so please remove it from DataKeys.
volodymyr-chekyrta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Please address @saeedbashir's feedback
…x#329) * chore: add router to deep link manager * chore: add deep link router * chore: add discussion threads * chore: program, discovery details, user profile * chore: disable animation for progress and refactor * chore: move deep link router to folder * chore: show user profile as sheet * chore: fix close presented screen * chore: not open again programs or discovery content * chore: improve deep link navigation * chore: improve deep link navigation * chore: improve deep link navigation * chore: check if ids isEmpty * chore: add open announcement * chore: improve deep link discussion * chore: remove empty line * chore: generate test files * chore: remove extra codes and add strings * chore: resolve PR commnets * chore: resolve PR comments * chore: avatar can be changed in "limited profile" mode * chore: make dashboard as default tab
[iOS] App navigational flow for deep links/push notifications #248
We need to implement the internal paths in the app for implementing deep links and push notifications. The Following wiki explains the implementation required.
Push Notifications And Deep Linking On Mobile
APNS Files:
edx apns.zip
How to use?
https://github.com/openedx/openedx-app-ios/assets/76485998/3e91c934-26ab-4a5f-b513-d4b8cfc38968