-
Notifications
You must be signed in to change notification settings - Fork 457
notif ios: Decrypt E2EE notifications #2230
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
Changes from all commits
aa8ee0a
9c78b8b
ebf111f
f1b735f
97c6b35
fb055a6
22e5397
b626bd9
842d85b
5ab0c0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,10 +13,13 @@ | |
| 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; | ||
| 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; | ||
| 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; | ||
| B32717692F6C49E5007682B1 /* IosNativeHostApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32717682F6C49E5007682B1 /* IosNativeHostApi.swift */; }; | ||
| B340EB382F5B092B007AD309 /* IosNative.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = B340EB372F5B092B007AD309 /* IosNative.g.swift */; }; | ||
| B34E9F092D776BEB0009AED2 /* Notifications.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = B34E9F082D776BEB0009AED2 /* Notifications.g.swift */; }; | ||
| B35E11A62F484E6800DE4085 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; | ||
| B378A5012F45B08F0031EFA1 /* NotificationService.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = B378A4FA2F45B08F0031EFA1 /* NotificationService.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; | ||
| B3D425322F6D40C200F9AE69 /* IosNative.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = B340EB372F5B092B007AD309 /* IosNative.g.swift */; }; | ||
| B3D425332F6D40C200F9AE69 /* IosNativeHostApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = B32717682F6C49E5007682B1 /* IosNativeHostApi.swift */; }; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line is added in this commit (same as the comment above): But that file isn't new in that commit, or touched there; it was introduced in the previous commit: Should this line have been added in that commit? What caused it to appear in this file? It also looks quite a lot like another line a few lines above: which does appear in that earlier commit. What's the effect of having both lines, instead of just the line that was added later? Should we have only one of them? |
||
| F311C174AF9C005CE4AADD72 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3EAE3F3F518B95B7BFEB4FE7 /* Pods_Runner.framework */; }; | ||
| /* End PBXBuildFile section */ | ||
|
|
||
|
|
@@ -84,6 +87,7 @@ | |
| 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; | ||
| 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | ||
| 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||
| B32717682F6C49E5007682B1 /* IosNativeHostApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IosNativeHostApi.swift; sourceTree = "<group>"; }; | ||
| B340EB372F5B092B007AD309 /* IosNative.g.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IosNative.g.swift; sourceTree = "<group>"; }; | ||
| B34E9F082D776BEB0009AED2 /* Notifications.g.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Notifications.g.swift; sourceTree = "<group>"; }; | ||
| B378A4FA2F45B08F0031EFA1 /* NotificationService.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotificationService.appex; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
|
|
@@ -212,6 +216,7 @@ | |
| 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, | ||
| 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, | ||
| 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, | ||
| B32717682F6C49E5007682B1 /* IosNativeHostApi.swift */, | ||
| B34E9F082D776BEB0009AED2 /* Notifications.g.swift */, | ||
| 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, | ||
| ); | ||
|
|
@@ -569,13 +574,16 @@ | |
| B34E9F092D776BEB0009AED2 /* Notifications.g.swift in Sources */, | ||
| 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, | ||
| B340EB382F5B092B007AD309 /* IosNative.g.swift in Sources */, | ||
| B32717692F6C49E5007682B1 /* IosNativeHostApi.swift in Sources */, | ||
| ); | ||
| runOnlyForDeploymentPostprocessing = 0; | ||
| }; | ||
| B378A4F62F45B08F0031EFA1 /* Sources */ = { | ||
| isa = PBXSourcesBuildPhase; | ||
| buildActionMask = 2147483647; | ||
| files = ( | ||
| B3D425322F6D40C200F9AE69 /* IosNative.g.swift in Sources */, | ||
| B3D425332F6D40C200F9AE69 /* IosNativeHostApi.swift in Sources */, | ||
| B35E11A62F484E6800DE4085 /* GeneratedPluginRegistrant.m in Sources */, | ||
| ); | ||
| runOnlyForDeploymentPostprocessing = 0; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import Flutter | ||
| import UIKit | ||
|
|
||
| public class IosNativeHostApiImpl: IosNativeHostApi { | ||
| func setExcludedFromBackup(filePath: String) throws { | ||
| var resourceValues = URLResourceValues() | ||
| resourceValues.isExcludedFromBackup = true | ||
|
|
||
| var url = URL(fileURLWithPath: filePath, isDirectory: false) | ||
| try url.setResourceValues(resourceValues) | ||
| } | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,12 +73,15 @@ class PushRegistration { | |
| final PushTokenKind tokenKind; | ||
| final String token; | ||
| final int timestamp; | ||
| // final String? iosAppId; // TODO(#1764) | ||
|
|
||
| @JsonKey(includeIfNull: false) | ||
| final String? iosAppId; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be easily split out into a prep commit.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, good to flag this. (Part of the benefit of a separate commit! There's now a separate commit message, making a natural space for this sort of note.) I think the ideal implementation here would avoid sending that. Not important, though, as long as the server currently does accept this.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed this by adding a
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great, glad that was easy to fix. |
||
|
|
||
| PushRegistration({ | ||
| required this.tokenKind, | ||
| required this.token, | ||
| required this.timestamp, | ||
| required this.iosAppId, | ||
| }); | ||
|
|
||
| Map<String, dynamic> toJson() => _$PushRegistrationToJson(this); | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Hmm, this line is added in this commit:
02704311e notif: Setup IosNativeHostApi Pigeon API for NotificationService headless Flutter engine
But that file isn't new (or even touched) in that commit; in fact it's already present in main, added originally in 1d03e57 (#2195).
What caused this line to appear in this particular commit?
Should this line have been present all along? What's been the effect of it not being present?
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.
Great, thanks for adding this information.
FWIW, the list of steps has more detail than I think is strictly needed here. That's fine, though; some detail is helpful.
And the crucial part is the sentence up to the comma (plus "in Xcode", which the steps imply). That's critical particularly because it lets the reader infer an answer to these questions I asked above:
(Namely: it meant those files weren't included in that service; and that was fine until we start using them there in this commit.)