-
Notifications
You must be signed in to change notification settings - Fork 16
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
feat: App navigational flow for deep links/push notifications #329
Conversation
# Conflicts: # config_script/process_config.py
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
@@ -213,6 +218,8 @@ public struct AlertView: 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.
please remove extra vertical spaces
|
||
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
@@ -56,4 +56,4 @@ SPEC CHECKSUMS: | |||
|
|||
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
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
@@ -14,12 +14,13 @@ public enum AlertViewType: Equatable { | |||
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.
@@ -52,6 +52,7 @@ | |||
"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
.
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
[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