-
Notifications
You must be signed in to change notification settings - Fork 415
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
Move more RMF code from iOS to BSK #2967
Conversation
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 went through the steps provided - works fine. There's one non-critical comment for your consideration.
} | ||
} | ||
|
||
override init(mapping: @escaping EventMapping<RemoteMessagingStoreError>.Mapping) { |
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's beneficial to add @available(*, unavailable, message: "Use init() instead")
so you get an immediate feedback when trying to use this function.
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.
Absolutely, great idea! Let me update it, thanks!
@@ -28,11 +28,15 @@ import RemoteMessaging | |||
import NetworkProtection | |||
import Subscription | |||
|
|||
struct RemoteMessaging { | |||
struct RemoteMessagingClient { |
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.
The RemoteMessaging struct had to be renamed to avoid name clashing with RemoteMessaging BSK module. This wasn't the case until we added RemoteMessaging.bundle
in the BSK module, which confused the compiler.
import Foundation | ||
import RemoteMessaging | ||
|
||
public class RemoteMessagingStoreErrorHandling: EventMapping<RemoteMessagingStoreError> { |
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 class intercepts error events emitted by RemoteMessagingStore and fires pixels as needed.
} | ||
} | ||
|
||
override init(mapping: @escaping EventMapping<RemoteMessagingStoreError>.Mapping) { |
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.
Absolutely, great idea! Let me update it, thanks!
# By Diego Rey Mendez (1) and others # Via GitHub * main: Improve prerequisite checks for VPN start (#2970) Move more RMF code from iOS to BSK (#2967) Remove unneeded pixel after investigation (#2972) Add quality signal for bookmarks database (#2964) # Conflicts: # DuckDuckGo.xcodeproj/project.pbxproj # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Task/Issue URL: https://app.asana.com/0/1201621708115095/1207573461751430/f
CC: @amddg44
Description:
This change moves reusable parts of the Remote Messaging Framework code over from the iOS repository.
The moved parts are: storage class, request class, Core Data model and storage unit tests.
Steps to test this PR:
These steps are supposed to ensure that database doesn't get corrupted as a result of moving RMF code to BSK:
RemoteMessagingRequest.swift
, updateendpoint
to returnhttps://www.jsonblob.com/api/1252947611702124544
dominik/rmf-bsk
.RemoteMessagingClient.swift
to the same value as in step 2.Copy Testing:
’
rather than'
Orientation Testing:
Device Testing:
OS Testing:
Theme Testing:
Internal references:
Software Engineering Expectations
Technical Design Template